mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
Improved boot.js with existing global window.rl
Put dev/Storage/Settings.js in boots.js global rl.settings
This commit is contained in:
parent
f90dbcc84b
commit
aeb5275648
57 changed files with 284 additions and 380 deletions
|
|
@ -2,15 +2,13 @@ import { AbstractScreen } from 'Knoin/AbstractScreen';
|
|||
|
||||
import { LoginUserView } from 'View/User/Login';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
class LoginUserScreen extends AbstractScreen {
|
||||
constructor() {
|
||||
super('login', [LoginUserView]);
|
||||
}
|
||||
|
||||
onShow() {
|
||||
getApp().setWindowTitle('');
|
||||
rl.setWindowTitle();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ import { pString, pInt } from 'Common/Utils';
|
|||
import { getFolderFromCacheList, getFolderFullNameRaw, getFolderInboxName } from 'Common/Cache';
|
||||
import { i18n } from 'Common/Translator';
|
||||
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
||||
import AppStore from 'Stores/User/App';
|
||||
import AccountStore from 'Stores/User/Account';
|
||||
import SettingsStore from 'Stores/User/Settings';
|
||||
|
|
@ -23,6 +21,8 @@ import { warmUpScreenPopup } from 'Knoin/Knoin';
|
|||
|
||||
import { AbstractScreen } from 'Knoin/AbstractScreen';
|
||||
|
||||
const Settings = rl.settings;
|
||||
|
||||
class MailBoxUserScreen extends AbstractScreen {
|
||||
constructor() {
|
||||
super('mailbox', [
|
||||
|
|
@ -40,11 +40,11 @@ class MailBoxUserScreen extends AbstractScreen {
|
|||
let foldersInboxUnreadCount = FolderStore.foldersInboxUnreadCount();
|
||||
const email = AccountStore.email();
|
||||
|
||||
if (Settings.appSettingsGet('listPermanentFiltered')) {
|
||||
if (Settings.app('listPermanentFiltered')) {
|
||||
foldersInboxUnreadCount = 0;
|
||||
}
|
||||
|
||||
getApp().setWindowTitle(
|
||||
rl.setWindowTitle(
|
||||
(email
|
||||
? '' + (0 < foldersInboxUnreadCount ? '(' + foldersInboxUnreadCount + ') ' : ' ') + email + ' - '
|
||||
: ''
|
||||
|
|
@ -61,7 +61,7 @@ class MailBoxUserScreen extends AbstractScreen {
|
|||
AppStore.focusedState(Focused.None);
|
||||
AppStore.focusedState(Focused.MessageList);
|
||||
|
||||
if (Settings.appSettingsGet('mobile')) {
|
||||
if (Settings.app('mobile')) {
|
||||
leftPanelDisabled(true);
|
||||
}
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ class MailBoxUserScreen extends AbstractScreen {
|
|||
* @returns {void}
|
||||
*/
|
||||
onBuild() {
|
||||
if (!bMobileDevice && !Settings.appSettingsGet('mobile')) {
|
||||
if (!bMobileDevice && !Settings.app('mobile')) {
|
||||
setTimeout(() =>
|
||||
getApp().initHorizontalLayoutResizer(ClientSideKeyName.MessageListSize)
|
||||
, 1);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { initOnStartOrLangChange, i18n } from 'Common/Translator';
|
|||
import AppStore from 'Stores/User/App';
|
||||
import AccountStore from 'Stores/User/Account';
|
||||
|
||||
import * as Settings from 'Storage/Settings';
|
||||
import { addSettingsViewModel } from 'Knoin/Knoin';
|
||||
|
||||
import { AbstractSettingsScreen } from 'Screen/AbstractSettings';
|
||||
|
|
@ -25,7 +24,7 @@ import { SystemDropDownSettingsUserView } from 'View/User/Settings/SystemDropDow
|
|||
import { MenuSettingsUserView } from 'View/User/Settings/Menu';
|
||||
import { PaneSettingsUserView } from 'View/User/Settings/Pane';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
const Settings = rl.settings;
|
||||
|
||||
class SettingsUserScreen extends AbstractSettingsScreen {
|
||||
constructor() {
|
||||
|
|
@ -113,14 +112,14 @@ class SettingsUserScreen extends AbstractSettingsScreen {
|
|||
keyScope(KeyState.Settings);
|
||||
leftPanelType('');
|
||||
|
||||
if (Settings.appSettingsGet('mobile')) {
|
||||
if (Settings.app('mobile')) {
|
||||
leftPanelDisabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
setSettingsTitle() {
|
||||
const sEmail = AccountStore.email();
|
||||
getApp().setWindowTitle((sEmail ? sEmail + ' - ' : '') + this.sSettingsTitle);
|
||||
rl.setWindowTitle((sEmail ? sEmail + ' - ' : '') + this.sSettingsTitle);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue