mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Drop webPath and webVersionPath in JavaScript
This commit is contained in:
parent
e4bc027aef
commit
17de4268b0
2 changed files with 4 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ const
|
||||||
HASH_PREFIX = '#/',
|
HASH_PREFIX = '#/',
|
||||||
SERVER_PREFIX = './?',
|
SERVER_PREFIX = './?',
|
||||||
VERSION = Settings.app('version'),
|
VERSION = Settings.app('version'),
|
||||||
VERSION_PREFIX = () => Settings.app('webVersionPath') || 'snappymail/v/' + VERSION + '/',
|
VERSION_PREFIX = 'snappymail/v/' + VERSION + '/',
|
||||||
|
|
||||||
adminPath = () => rl.adminArea() && !Settings.app('adminHostUse'),
|
adminPath = () => rl.adminArea() && !Settings.app('adminHostUse'),
|
||||||
|
|
||||||
|
|
@ -68,17 +68,17 @@ export const
|
||||||
* @param {string} path
|
* @param {string} path
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
staticLink = path => VERSION_PREFIX() + 'static/' + path,
|
staticLink = path => VERSION_PREFIX + 'static/' + path,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} theme
|
* @param {string} theme
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
themePreviewLink = theme => {
|
themePreviewLink = theme => {
|
||||||
let prefix = VERSION_PREFIX();
|
let prefix = VERSION_PREFIX;
|
||||||
if ('@custom' === theme.slice(-7)) {
|
if ('@custom' === theme.slice(-7)) {
|
||||||
theme = theme.slice(0, theme.length - 7).trim();
|
theme = theme.slice(0, theme.length - 7).trim();
|
||||||
prefix = Settings.app('webPath') || '';
|
prefix = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return prefix + 'themes/' + encodeURI(theme) + '/images/preview.png';
|
return prefix + 'themes/' + encodeURI(theme) + '/images/preview.png';
|
||||||
|
|
|
||||||
|
|
@ -663,8 +663,6 @@ class Actions
|
||||||
return \array_merge(array(
|
return \array_merge(array(
|
||||||
'version' => APP_VERSION,
|
'version' => APP_VERSION,
|
||||||
'admin' => $bAdmin,
|
'admin' => $bAdmin,
|
||||||
'webPath' => Utils::WebPath(),
|
|
||||||
'webVersionPath' => Utils::WebVersionPath(),
|
|
||||||
'token' => $oConfig->Get('security', 'csrf_protection', false) ? Utils::GetCsrfToken() : '',
|
'token' => $oConfig->Get('security', 'csrf_protection', false) ? Utils::GetCsrfToken() : '',
|
||||||
'inIframe' => (bool)$oConfig->Get('labs', 'in_iframe', false),
|
'inIframe' => (bool)$oConfig->Get('labs', 'in_iframe', false),
|
||||||
'allowHtmlEditorBitiButtons' => (bool)$oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),
|
'allowHtmlEditorBitiButtons' => (bool)$oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue