mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
rl.setWindowTitle() to rl.setTitle()
This commit is contained in:
parent
951ba62621
commit
089f016633
7 changed files with 11 additions and 12 deletions
11
dev/boot.js
11
dev/boot.js
|
|
@ -1,13 +1,11 @@
|
|||
(doc => {
|
||||
|
||||
navigator.cookieEnabled || doc.location.replace('./?/NoCookie');
|
||||
|
||||
const
|
||||
eId = id => doc.getElementById('rl-'+id),
|
||||
app = eId('app'),
|
||||
admin = app && '1' == app.dataset.admin,
|
||||
layout = doc.cookie.match(/(^|;) ?rllayout=([^;]+)/) || '',
|
||||
badBrowser = () => doc.location.replace('./?/BadBrowser'),
|
||||
redirect = path => doc.location.replace('./?/'+path),
|
||||
|
||||
showError = msg => {
|
||||
let div = eId('loading-error');
|
||||
|
|
@ -30,7 +28,8 @@ const
|
|||
});
|
||||
};
|
||||
|
||||
[].flat || badBrowser();
|
||||
navigator.cookieEnabled || redirect('NoCookie');
|
||||
[].flat || redirect('BadBrowser');
|
||||
|
||||
let RL_APP_DATA = {};
|
||||
|
||||
|
|
@ -45,13 +44,13 @@ window.rl = {
|
|||
app: name => RL_APP_DATA.System[name]
|
||||
},
|
||||
|
||||
setWindowTitle: title =>
|
||||
setTitle: title =>
|
||||
doc.title = (title || '') + (RL_APP_DATA.Title ? (title ? ' - ' : '') + RL_APP_DATA.Title : ''),
|
||||
|
||||
initData: appData => {
|
||||
RL_APP_DATA = appData;
|
||||
const url = appData.StaticLibsJs,
|
||||
cb = () => rl.app ? rl.app.bootstart() : badBrowser();
|
||||
cb = () => rl.app.bootstart();
|
||||
loadScript(url)
|
||||
.then(() => loadScript(url.replace('/libs.', `/${admin?'admin':'app'}.`)))
|
||||
.then(() => appData.PluginsLink ? loadScript(appData.PluginsLink) : Promise.resolve())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue