mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
This version uses Rollup instead of WebPack.
Due to that the code is smaller and has changes to prevent Circular Dependencies
This commit is contained in:
parent
5e63ade9dd
commit
ad8fd8879b
49 changed files with 595 additions and 577 deletions
|
|
@ -6,6 +6,9 @@ import { showScreenPopup } from 'Knoin/Knoin';
|
|||
import DomainStore from 'Stores/Admin/Domain';
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import { DomainPopupView } from 'View/Popup/Domain';
|
||||
import { DomainAliasPopupView } from 'View/Popup/DomainAlias';
|
||||
|
||||
export class DomainsAdminSettings {
|
||||
constructor() {
|
||||
this.domains = DomainStore.domains;
|
||||
|
|
@ -19,11 +22,11 @@ export class DomainsAdminSettings {
|
|||
}
|
||||
|
||||
createDomain() {
|
||||
showScreenPopup(require('View/Popup/Domain'));
|
||||
showScreenPopup(DomainPopupView);
|
||||
}
|
||||
|
||||
createDomainAlias() {
|
||||
showScreenPopup(require('View/Popup/DomainAlias'));
|
||||
showScreenPopup(DomainAliasPopupView);
|
||||
}
|
||||
|
||||
deleteDomain(domain) {
|
||||
|
|
@ -47,7 +50,7 @@ export class DomainsAdminSettings {
|
|||
|
||||
onDomainLoadRequest(sResult, oData) {
|
||||
if (StorageResultType.Success === sResult && oData && oData.Result) {
|
||||
showScreenPopup(require('View/Popup/Domain'), [oData.Result]);
|
||||
showScreenPopup(DomainPopupView, [oData.Result]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@ import {
|
|||
pInt,
|
||||
settingsSaveHelperSimpleFunction,
|
||||
changeTheme,
|
||||
convertThemeName,
|
||||
convertLangName
|
||||
convertThemeName
|
||||
} from 'Common/Utils';
|
||||
|
||||
import { SaveSettingsStep } from 'Common/Enums';
|
||||
import { reload as translatorReload } from 'Common/Translator';
|
||||
import { reload as translatorReload, convertLangName } from 'Common/Translator';
|
||||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
|
|
@ -19,6 +18,7 @@ import ThemeStore from 'Stores/Theme';
|
|||
import LanguageStore from 'Stores/Language';
|
||||
import AppAdminStore from 'Stores/Admin/App';
|
||||
import CapaAdminStore from 'Stores/Admin/Capa';
|
||||
import LanguagesPopupView from 'View/Popup/Languages';
|
||||
|
||||
const settingsGet = rl.settings.get;
|
||||
|
||||
|
|
@ -167,11 +167,11 @@ export class GeneralAdminSettings {
|
|||
}
|
||||
|
||||
selectLanguage() {
|
||||
showScreenPopup(require('View/Popup/Languages'), [this.language, this.languages(), LanguageStore.userLanguage()]);
|
||||
showScreenPopup(LanguagesPopupView, [this.language, this.languages(), LanguageStore.userLanguage()]);
|
||||
}
|
||||
|
||||
selectLanguageAdmin() {
|
||||
showScreenPopup(require('View/Popup/Languages'), [
|
||||
showScreenPopup(LanguagesPopupView, [
|
||||
this.languageAdmin,
|
||||
this.languagesAdmin(),
|
||||
LanguageStore.userLanguageAdmin()
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import PluginStore from 'Stores/Admin/Plugin';
|
|||
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import { PluginPopupView } from 'View/Popup/Plugin';
|
||||
|
||||
export class PluginsAdminSettings {
|
||||
constructor() {
|
||||
this.enabledPlugins = ko.observable(!!rl.settings.get('EnabledPlugins'));
|
||||
|
|
@ -54,7 +56,7 @@ export class PluginsAdminSettings {
|
|||
|
||||
onPluginLoadRequest(result, data) {
|
||||
if (StorageResultType.Success === result && data && data.Result) {
|
||||
showScreenPopup(require('View/Popup/Plugin'), [data.Result]);
|
||||
showScreenPopup(PluginPopupView, [data.Result]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ import Remote from 'Remote/User/Fetch';
|
|||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import { AccountPopupView } from 'View/Popup/Account';
|
||||
import { IdentityPopupView } from 'View/Popup/Identity';
|
||||
|
||||
export class AccountsUserSettings {
|
||||
constructor() {
|
||||
this.allowAdditionalAccount = rl.settings.capa(Capa.AdditionalAccounts);
|
||||
|
|
@ -21,21 +24,21 @@ export class AccountsUserSettings {
|
|||
}
|
||||
|
||||
addNewAccount() {
|
||||
showScreenPopup(require('View/Popup/Account'));
|
||||
showScreenPopup(AccountPopupView);
|
||||
}
|
||||
|
||||
editAccount(account) {
|
||||
if (account && account.canBeEdit()) {
|
||||
showScreenPopup(require('View/Popup/Account'), [account]);
|
||||
showScreenPopup(AccountPopupView, [account]);
|
||||
}
|
||||
}
|
||||
|
||||
addNewIdentity() {
|
||||
showScreenPopup(require('View/Popup/Identity'));
|
||||
showScreenPopup(IdentityPopupView);
|
||||
}
|
||||
|
||||
editIdentity(identity) {
|
||||
showScreenPopup(require('View/Popup/Identity'), [identity]);
|
||||
showScreenPopup(IdentityPopupView, [identity]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ import { SieveScriptModel } from 'Model/SieveScript';
|
|||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import { SieveScriptPopupView } from 'View/Popup/SieveScript';
|
||||
|
||||
export class FiltersUserSettings {
|
||||
constructor() {
|
||||
this.scripts = SieveStore.scripts;
|
||||
|
|
@ -60,11 +62,11 @@ export class FiltersUserSettings {
|
|||
}
|
||||
|
||||
addScript() {
|
||||
showScreenPopup(require('View/Popup/SieveScript'), [new SieveScriptModel()]);
|
||||
showScreenPopup(SieveScriptPopupView, [new SieveScriptModel()]);
|
||||
}
|
||||
|
||||
editScript(script) {
|
||||
showScreenPopup(require('View/Popup/SieveScript'), [script]);
|
||||
showScreenPopup(SieveScriptPopupView, [script]);
|
||||
}
|
||||
|
||||
deleteScript(script) {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ import Remote from 'Remote/User/Fetch';
|
|||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import { FolderCreatePopupView } from 'View/Popup/FolderCreate';
|
||||
import { FolderSystemPopupView } from 'View/Popup/FolderSystem';
|
||||
|
||||
export class FoldersUserSettings {
|
||||
constructor() {
|
||||
this.displaySpecSetting = FolderStore.displaySpecSetting;
|
||||
|
|
@ -79,11 +82,11 @@ export class FoldersUserSettings {
|
|||
}
|
||||
|
||||
createFolder() {
|
||||
showScreenPopup(require('View/Popup/FolderCreate'));
|
||||
showScreenPopup(FolderCreatePopupView);
|
||||
}
|
||||
|
||||
systemFolder() {
|
||||
showScreenPopup(require('View/Popup/FolderSystem'));
|
||||
showScreenPopup(FolderSystemPopupView);
|
||||
}
|
||||
|
||||
deleteFolder(folderToRemove) {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import { MESSAGES_PER_PAGE_VALUES } from 'Common/Consts';
|
|||
import { SaveSettingsStep } from 'Common/Enums';
|
||||
import { EditorDefaultType, Layout } from 'Common/EnumsUser';
|
||||
|
||||
import { settingsSaveHelperSimpleFunction, convertLangName } from 'Common/Utils';
|
||||
import { settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
||||
|
||||
import { i18n, trigger as translatorTrigger, reload as translatorReload } from 'Common/Translator';
|
||||
import { i18n, trigger as translatorTrigger, reload as translatorReload, convertLangName } from 'Common/Translator';
|
||||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
|
|
@ -20,6 +20,9 @@ import MessageStore from 'Stores/User/Message';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { IdentityPopupView } from 'View/Popup/Identity';
|
||||
import { LanguagesPopupView } from 'View/Popup/Languages';
|
||||
|
||||
export class GeneralUserSettings {
|
||||
constructor() {
|
||||
this.language = LanguageStore.language;
|
||||
|
|
@ -87,7 +90,7 @@ export class GeneralUserSettings {
|
|||
editMainIdentity() {
|
||||
const identity = this.identityMain();
|
||||
if (identity) {
|
||||
showScreenPopup(require('View/Popup/Identity'), [identity]);
|
||||
showScreenPopup(IdentityPopupView, [identity]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -161,6 +164,6 @@ export class GeneralUserSettings {
|
|||
}
|
||||
|
||||
selectLanguage() {
|
||||
showScreenPopup(require('View/Popup/Languages'), [this.language, this.languages(), LanguageStore.userLanguage()]);
|
||||
showScreenPopup(LanguagesPopupView, [this.language, this.languages(), LanguageStore.userLanguage()]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ import Remote from 'Remote/User/Fetch';
|
|||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import { AddOpenPgpKeyPopupView } from 'View/Popup/AddOpenPgpKey';
|
||||
import { NewOpenPgpKeyPopupView } from 'View/Popup/NewOpenPgpKey';
|
||||
import { ViewOpenPgpKeyPopupView } from 'View/Popup/ViewOpenPgpKey';
|
||||
|
||||
export class OpenPgpUserSettings {
|
||||
constructor() {
|
||||
this.openpgpkeys = PgpStore.openpgpkeys;
|
||||
|
|
@ -21,16 +25,16 @@ export class OpenPgpUserSettings {
|
|||
}
|
||||
|
||||
addOpenPgpKey() {
|
||||
showScreenPopup(require('View/Popup/AddOpenPgpKey'));
|
||||
showScreenPopup(AddOpenPgpKeyPopupView);
|
||||
}
|
||||
|
||||
generateOpenPgpKey() {
|
||||
showScreenPopup(require('View/Popup/NewOpenPgpKey'));
|
||||
showScreenPopup(NewOpenPgpKeyPopupView);
|
||||
}
|
||||
|
||||
viewOpenPgpKey(openPgpKey) {
|
||||
if (openPgpKey) {
|
||||
showScreenPopup(require('View/Popup/ViewOpenPgpKey'), [openPgpKey]);
|
||||
showScreenPopup(ViewOpenPgpKeyPopupView, [openPgpKey]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ import SettinsStore from 'Stores/User/Settings';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { TwoFactorConfigurationPopupView } from 'View/Popup/TwoFactorConfiguration';
|
||||
|
||||
export class SecurityUserSettings {
|
||||
constructor() {
|
||||
this.capaAutoLogout = rl.settings.capa(Capa.AutoLogout);
|
||||
|
|
@ -34,7 +36,7 @@ export class SecurityUserSettings {
|
|||
}
|
||||
|
||||
configureTwoFactor() {
|
||||
showScreenPopup(require('View/Popup/TwoFactorConfiguration'));
|
||||
showScreenPopup(TwoFactorConfigurationPopupView);
|
||||
}
|
||||
|
||||
onBuild() {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import Remote from 'Remote/User/Fetch';
|
|||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import { TemplatePopupView } from 'View/Popup/Template';
|
||||
|
||||
export class TemplatesUserSettings {
|
||||
constructor() {
|
||||
this.templates = TemplateStore.templates;
|
||||
|
|
@ -20,12 +22,12 @@ export class TemplatesUserSettings {
|
|||
}
|
||||
|
||||
addNewTemplate() {
|
||||
showScreenPopup(require('View/Popup/Template'));
|
||||
showScreenPopup(TemplatePopupView);
|
||||
}
|
||||
|
||||
editTemplate(oTemplateItem) {
|
||||
if (oTemplateItem) {
|
||||
showScreenPopup(require('View/Popup/Template'), [oTemplateItem]);
|
||||
showScreenPopup(TemplatePopupView, [oTemplateItem]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue