Drop webPath and webVersionPath in JavaScript

This commit is contained in:
the-djmaze 2022-05-11 21:15:58 +02:00
parent e4bc027aef
commit 17de4268b0
2 changed files with 4 additions and 6 deletions

View file

@ -5,7 +5,7 @@ const
HASH_PREFIX = '#/',
SERVER_PREFIX = './?',
VERSION = Settings.app('version'),
VERSION_PREFIX = () => Settings.app('webVersionPath') || 'snappymail/v/' + VERSION + '/',
VERSION_PREFIX = 'snappymail/v/' + VERSION + '/',
adminPath = () => rl.adminArea() && !Settings.app('adminHostUse'),
@ -68,17 +68,17 @@ 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') || '';
prefix = '';
}
return prefix + 'themes/' + encodeURI(theme) + '/images/preview.png';