mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
Improve building process (add gpg2 sign task)
Remove long hash names Add --pro and --sign parameters
This commit is contained in:
parent
161ddc9920
commit
8967bc3817
6 changed files with 88 additions and 99 deletions
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
import window from 'window';
|
||||
import JSON from 'JSON';
|
||||
import {isUnd} from 'Common/Utils';
|
||||
import {isStorageSupported} from 'Storage/RainLoop';
|
||||
import {CLIENT_SIDE_STORAGE_INDEX_NAME} from 'Common/Consts';
|
||||
|
|
@ -26,7 +25,7 @@ class LocalStorageDriver
|
|||
try
|
||||
{
|
||||
const storageValue = this.s.getItem(CLIENT_SIDE_STORAGE_INDEX_NAME) || null;
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||
storageResult = null === storageValue ? null : window.JSON.parse(storageValue);
|
||||
}
|
||||
catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
|
|
@ -34,7 +33,7 @@ class LocalStorageDriver
|
|||
|
||||
try
|
||||
{
|
||||
this.s.setItem(CLIENT_SIDE_STORAGE_INDEX_NAME, JSON.stringify(storageResult));
|
||||
this.s.setItem(CLIENT_SIDE_STORAGE_INDEX_NAME, window.JSON.stringify(storageResult));
|
||||
return true;
|
||||
}
|
||||
catch (e) {} // eslint-disable-line no-empty
|
||||
|
|
@ -56,7 +55,7 @@ class LocalStorageDriver
|
|||
{
|
||||
const
|
||||
storageValue = this.s.getItem(CLIENT_SIDE_STORAGE_INDEX_NAME) || null,
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||
storageResult = null === storageValue ? null : window.JSON.parse(storageValue);
|
||||
|
||||
return (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
import window from 'window';
|
||||
import JSON from 'JSON';
|
||||
|
||||
const STORAGE_KEY = '__rlA';
|
||||
const TIME_KEY = '__rlT';
|
||||
|
|
@ -42,9 +41,9 @@ const __get = (key) => {
|
|||
{
|
||||
result = SESS_STORAGE.getItem(key) || null;
|
||||
}
|
||||
else if (WIN_STORAGE && JSON)
|
||||
else if (WIN_STORAGE && window.JSON)
|
||||
{
|
||||
const data = WIN_STORAGE.name && '{' === WIN_STORAGE.name.toString().substr(0, 1) ? JSON.parse(WIN_STORAGE.name.toString()) : null;
|
||||
const data = WIN_STORAGE.name && '{' === WIN_STORAGE.name.toString().substr(0, 1) ? window.JSON.parse(WIN_STORAGE.name.toString()) : null;
|
||||
result = data ? (data[key] || null) : null;
|
||||
}
|
||||
|
||||
|
|
@ -57,13 +56,13 @@ const __set = (key, value) => {
|
|||
{
|
||||
SESS_STORAGE.setItem(key, value);
|
||||
}
|
||||
else if (WIN_STORAGE && JSON)
|
||||
else if (WIN_STORAGE && window.JSON)
|
||||
{
|
||||
let data = WIN_STORAGE.name && '{' === WIN_STORAGE.name.toString().substr(0, 1) ? JSON.parse(WIN_STORAGE.name.toString()) : null;
|
||||
let data = WIN_STORAGE.name && '{' === WIN_STORAGE.name.toString().substr(0, 1) ? window.JSON.parse(WIN_STORAGE.name.toString()) : null;
|
||||
data = data || {};
|
||||
data[key] = value;
|
||||
|
||||
WIN_STORAGE.name = JSON.stringify(data);
|
||||
WIN_STORAGE.name = window.JSON.stringify(data);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue