mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +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
|
|
@ -10,13 +10,13 @@ import SettingsStore from 'Stores/User/Settings';
|
|||
import FolderStore from 'Stores/User/Folder';
|
||||
import MessageStore from 'Stores/User/Message';
|
||||
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
import { view, ViewType, showScreenPopup, setHash } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
||||
const Settings = rl.settings;
|
||||
|
||||
@view({
|
||||
name: 'View/User/MailBox/FolderList',
|
||||
type: ViewType.Left,
|
||||
|
|
@ -60,7 +60,7 @@ class FolderListMailBoxUserView extends AbstractViewNext {
|
|||
onBuild(dom) {
|
||||
const qs = s => dom.querySelector(s),
|
||||
eqs = (ev, s) => ev.target.closestWithin(s, dom),
|
||||
isMobile = Settings.appSettingsGet('mobile'),
|
||||
isMobile = Settings.app('mobile'),
|
||||
fSelectFolder = (el, event, starred) => {
|
||||
const isMove = moveAction();
|
||||
if (isMobile) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ import SettingsStore from 'Stores/User/Settings';
|
|||
import FolderStore from 'Stores/User/Folder';
|
||||
import MessageStore from 'Stores/User/Message';
|
||||
|
||||
import * as Settings from 'Storage/Settings';
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
|
@ -44,6 +43,7 @@ import { view, command, ViewType, showScreenPopup, setHash, popupVisibility } fr
|
|||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
||||
const
|
||||
Settings = rl.settings,
|
||||
canBeMovedHelper = (self) => self.canBeMoved(),
|
||||
ifvisible = window.ifvisible;
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
this.iGoToUpUpOrDownDownTimeout = 0;
|
||||
|
||||
this.mobile = !!Settings.appSettingsGet('mobile');
|
||||
this.mobile = !!Settings.app('mobile');
|
||||
this.newMoveToFolder = AppStore.newMoveToFolder;
|
||||
|
||||
this.allowReload = !!Settings.capa(Capa.Reload);
|
||||
|
|
@ -944,7 +944,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
initUploaderForAppend() {
|
||||
if (!Settings.appSettingsGet('allowAppendMessage') || !this.dragOverArea()) {
|
||||
if (!Settings.app('allowAppendMessage') || !this.dragOverArea()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ import FolderStore from 'Stores/User/Folder';
|
|||
import MessageStore from 'Stores/User/Message';
|
||||
|
||||
import * as Local from 'Storage/Client';
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Promises from 'Promises/User/Ajax';
|
||||
|
|
@ -48,6 +47,8 @@ import { getApp } from 'Helper/Apps/User';
|
|||
import { view, command, ViewType, showScreenPopup, createCommand } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
||||
const Settings = rl.settings;
|
||||
|
||||
@view({
|
||||
name: 'View/User/MailBox/MessageView',
|
||||
type: ViewType.Right,
|
||||
|
|
@ -87,10 +88,10 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
this.allowMessageActions = !!Settings.capa(Capa.MessageActions);
|
||||
this.allowMessageListActions = !!Settings.capa(Capa.MessageListActions);
|
||||
|
||||
this.logoImg = (Settings.settingsGet('UserLogoMessage')||'').trim();
|
||||
this.logoIframe = (Settings.settingsGet('UserIframeMessage')||'').trim();
|
||||
this.logoImg = (Settings.get('UserLogoMessage')||'').trim();
|
||||
this.logoIframe = (Settings.get('UserIframeMessage')||'').trim();
|
||||
|
||||
this.mobile = !!Settings.appSettingsGet('mobile');
|
||||
this.mobile = !!Settings.app('mobile');
|
||||
|
||||
this.attachmentsActions = AppStore.attachmentsActions;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue