mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Improve Settings handling
This commit is contained in:
parent
e7b1ce7509
commit
34b25eedea
39 changed files with 160 additions and 150 deletions
|
|
@ -20,8 +20,8 @@ export class AbstractSystemDropDownUserView extends AbstractViewRight {
|
|||
constructor(name) {
|
||||
super(name, 'SystemDropDown');
|
||||
|
||||
this.allowSettings = !!Settings.capa(Capa.Settings);
|
||||
this.allowHelp = !!Settings.capa(Capa.Help);
|
||||
this.allowSettings = Settings.capa(Capa.Settings);
|
||||
this.allowHelp = Settings.capa(Capa.Help);
|
||||
|
||||
this.currentAudio = AppStore.currentAudio;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import Remote from 'Remote/User/Fetch';
|
|||
import { decorateKoCommands, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewCenter } from 'Knoin/AbstractViews';
|
||||
|
||||
import { Settings } from 'Common/Globals';
|
||||
import { Settings, SettingsGet } from 'Common/Globals';
|
||||
|
||||
import { LanguagesPopupView } from 'View/Popup/Languages';
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ class LoginUserView extends AbstractViewCenter {
|
|||
this.hideSubmitButton = Settings.app('hideSubmitButton');
|
||||
|
||||
this.addObservables({
|
||||
loadingDesc: Settings.get('LoadingDescription'),
|
||||
loadingDesc: SettingsGet('LoadingDescription'),
|
||||
|
||||
email: '',
|
||||
password: '',
|
||||
|
|
@ -73,7 +73,7 @@ class LoginUserView extends AbstractViewCenter {
|
|||
|
||||
this.formError = ko.observable(false).extend({ falseTimeout: 500 });
|
||||
|
||||
this.allowLanguagesOnLogin = !!Settings.get('AllowLanguagesOnLogin');
|
||||
this.allowLanguagesOnLogin = !!SettingsGet('AllowLanguagesOnLogin');
|
||||
|
||||
this.language = LanguageStore.language;
|
||||
this.languages = LanguageStore.languages;
|
||||
|
|
@ -109,8 +109,8 @@ class LoginUserView extends AbstractViewCenter {
|
|||
signMeType: iValue => this.signMe(LoginSignMeType.DefaultOn === iValue)
|
||||
});
|
||||
|
||||
if (Settings.get('AdditionalLoginError') && !this.submitError()) {
|
||||
this.submitError(Settings.get('AdditionalLoginError'));
|
||||
if (SettingsGet('AdditionalLoginError') && !this.submitError()) {
|
||||
this.submitError(SettingsGet('AdditionalLoginError'));
|
||||
}
|
||||
|
||||
decorateKoCommands(this, {
|
||||
|
|
@ -207,7 +207,7 @@ class LoginUserView extends AbstractViewCenter {
|
|||
|
||||
onBuild() {
|
||||
const signMeLocal = Local.get(ClientSideKeyName.LastSignMe),
|
||||
signMe = (Settings.get('SignMe') || 'unused').toLowerCase();
|
||||
signMe = (SettingsGet('SignMe') || 'unused').toLowerCase();
|
||||
|
||||
switch (signMe) {
|
||||
case LoginSignMeTypeAsString.DefaultOff:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import {
|
|||
|
||||
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||
|
||||
import { doc, leftPanelDisabled, moveAction, Settings } from 'Common/Globals';
|
||||
import { doc, leftPanelDisabled, moveAction, Settings, SettingsGet } from 'Common/Globals';
|
||||
|
||||
import { computedPaginatorHelper, showMessageComposer } from 'Common/UtilsUser';
|
||||
import { FileInfo } from 'Common/File';
|
||||
|
|
@ -60,7 +60,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
this.iGoToUpUpOrDownDownTimeout = 0;
|
||||
|
||||
this.newMoveToFolder = !!Settings.get('NewMoveToFolder');
|
||||
this.newMoveToFolder = !!SettingsGet('NewMoveToFolder');
|
||||
|
||||
this.allowReload = Settings.capa(Capa.Reload);
|
||||
this.allowSearch = Settings.capa(Capa.Search);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue