mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Some small cleanups and fixes
This commit is contained in:
parent
e7c7b8ed53
commit
962ddde1f3
9 changed files with 34 additions and 39 deletions
|
|
@ -6,7 +6,7 @@ const
|
|||
HASH_PREFIX = '#/',
|
||||
SERVER_PREFIX = './?',
|
||||
VERSION = Settings.app('version'),
|
||||
VERSION_PREFIX = Settings.app('webVersionPath') || 'snappymail/v/' + VERSION + '/',
|
||||
VERSION_PREFIX = () => Settings.app('webVersionPath') || 'snappymail/v/' + VERSION + '/',
|
||||
|
||||
adminPath = () => rl.adminArea() && !Settings.app('adminHostUse'),
|
||||
|
||||
|
|
@ -75,14 +75,14 @@ export const
|
|||
* @param {string} path
|
||||
* @returns {string}
|
||||
*/
|
||||
staticLink = path => VERSION_PREFIX + 'static/' + path,
|
||||
staticLink = path => VERSION_PREFIX() + 'static/' + path,
|
||||
|
||||
/**
|
||||
* @param {string} theme
|
||||
* @returns {string}
|
||||
*/
|
||||
themePreviewLink = theme => {
|
||||
let prefix = VERSION_PREFIX;
|
||||
let prefix = VERSION_PREFIX();
|
||||
if ('@custom' === theme.slice(-7)) {
|
||||
theme = theme.slice(0, theme.length - 7).trim();
|
||||
prefix = Settings.app('webPath') || '';
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export const
|
|||
/* // Without deprecated 'unescape':
|
||||
b64EncodeJSON = data => btoa(encodeURIComponent(JSON.stringify(data)).replace(
|
||||
/%([0-9A-F]{2})/g, (match, p1) => String.fromCharCode('0x' + p1)
|
||||
)),
|
||||
)),
|
||||
*/
|
||||
b64EncodeJSONSafe = data => b64EncodeJSON(data).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''),
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { MessageFlagsCache, addRequestedMessage } from 'Common/Cache';
|
||||
import { Notification } from 'Common/Enums';
|
||||
import { MessageSetAction, ComposeType/*, FolderType*/ } from 'Common/EnumsUser';
|
||||
import { doc, createElement, elementById } from 'Common/Globals';
|
||||
import { plainToHtml } from 'Common/Html';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue