mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
Improved AbstractScreen properties
Improved settings screens Views: * sDefaultScope & sCurrentScope to sub-class keyScope * drop viewModelVisible * rename viewModelTemplateID to templateID * rename viewModelPosition to viewType
This commit is contained in:
parent
11f69ef9e4
commit
8be4c384bb
27 changed files with 136 additions and 196 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import ko from 'ko';
|
||||
import { Settings } from 'Common/Globals';
|
||||
|
||||
export class AboutAdminSettings {
|
||||
export class AboutAdminSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.version = ko.observable(Settings.app('version'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
|||
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
export class BrandingAdminSettings {
|
||||
export class BrandingAdminSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.title = ko.observable(SettingsGet('Title')).idleTrigger();
|
||||
this.loadingDesc = ko.observable(SettingsGet('LoadingDescription')).idleTrigger();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
import Remote from 'Remote/Admin/Fetch';
|
||||
import { decorateKoCommands } from 'Knoin/Knoin';
|
||||
|
||||
export class ContactsAdminSettings {
|
||||
export class ContactsAdminSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import Remote from 'Remote/Admin/Fetch';
|
|||
import { DomainPopupView } from 'View/Popup/Domain';
|
||||
import { DomainAliasPopupView } from 'View/Popup/DomainAlias';
|
||||
|
||||
export class DomainsAdminSettings {
|
||||
export class DomainsAdminSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.domains = DomainAdminStore;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import { ThemeStore } from 'Stores/Theme';
|
|||
import { LanguageStore } from 'Stores/Language';
|
||||
import LanguagesPopupView from 'View/Popup/Languages';
|
||||
|
||||
export class GeneralAdminSettings {
|
||||
export class GeneralAdminSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.language = LanguageStore.language;
|
||||
this.languages = LanguageStore.languages;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { settingsSaveHelperSimpleFunction, addObservablesTo, addSubscribablesTo
|
|||
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
export class LoginAdminSettings {
|
||||
export class LoginAdminSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
addObservablesTo(this, {
|
||||
determineUserLanguage: !!SettingsGet('DetermineUserLanguage'),
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { PluginPopupView } from 'View/Popup/Plugin';
|
|||
import { SettingsGet } from 'Common/Globals';
|
||||
import { addComputablesTo } from 'Common/Utils';
|
||||
|
||||
export class PackagesAdminSettings {
|
||||
export class PackagesAdminSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.packagesError = ko.observable('');
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import Remote from 'Remote/Admin/Fetch';
|
|||
|
||||
import { decorateKoCommands } from 'Knoin/Knoin';
|
||||
|
||||
export class SecurityAdminSettings {
|
||||
export class SecurityAdminSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.weakPassword = rl.app.weakPassword;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { showScreenPopup } from 'Knoin/Knoin';
|
|||
import { AccountPopupView } from 'View/Popup/Account';
|
||||
import { IdentityPopupView } from 'View/Popup/Identity';
|
||||
|
||||
export class AccountsUserSettings {
|
||||
export class AccountsUserSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.allowAdditionalAccount = Settings.capa(Capa.AdditionalAccounts);
|
||||
this.allowIdentities = Settings.capa(Capa.Identities);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { SettingsGet } from 'Common/Globals';
|
|||
import { ContactUserStore } from 'Stores/User/Contact';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
export class ContactsUserSettings {
|
||||
export class ContactsUserSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.contactsAutosave = ko.observable(!!SettingsGet('ContactsAutosave'));
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { showScreenPopup } from 'Knoin/Knoin';
|
|||
|
||||
import { SieveScriptPopupView } from 'View/Popup/SieveScript';
|
||||
|
||||
export class FiltersUserSettings {
|
||||
export class FiltersUserSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.scripts = SieveUserStore.scripts;
|
||||
this.loading = ko.observable(false).extend({ debounce: 200 });
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import { showScreenPopup } from 'Knoin/Knoin';
|
|||
import { FolderCreatePopupView } from 'View/Popup/FolderCreate';
|
||||
import { FolderSystemPopupView } from 'View/Popup/FolderSystem';
|
||||
|
||||
export class FoldersUserSettings {
|
||||
export class FoldersUserSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.displaySpecSetting = FolderUserStore.displaySpecSetting;
|
||||
this.folderList = FolderUserStore.folderList;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import Remote from 'Remote/User/Fetch';
|
|||
import { IdentityPopupView } from 'View/Popup/Identity';
|
||||
import { LanguagesPopupView } from 'View/Popup/Languages';
|
||||
|
||||
export class GeneralUserSettings {
|
||||
export class GeneralUserSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.language = LanguageStore.language;
|
||||
this.languages = LanguageStore.languages;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { AddOpenPgpKeyPopupView } from 'View/Popup/AddOpenPgpKey';
|
|||
import { NewOpenPgpKeyPopupView } from 'View/Popup/NewOpenPgpKey';
|
||||
import { ViewOpenPgpKeyPopupView } from 'View/Popup/ViewOpenPgpKey';
|
||||
|
||||
export class OpenPgpUserSettings {
|
||||
export class OpenPgpUserSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.openpgpkeys = PgpUserStore.openpgpkeys;
|
||||
this.openpgpkeysPublic = PgpUserStore.openpgpkeysPublic;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { SettingsUserStore } from 'Stores/User/Settings';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
export class SecurityUserSettings {
|
||||
export class SecurityUserSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.capaAutoLogout = Settings.capa(Capa.AutoLogout);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { ThemeStore } from 'Stores/Theme';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
export class ThemesUserSettings {
|
||||
export class ThemesUserSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
this.theme = ThemeStore.theme;
|
||||
this.themes = ThemeStore.themes;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue