mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Enable AbstractViewSettings
This commit is contained in:
parent
92cec80b73
commit
97bc3ef585
20 changed files with 149 additions and 212 deletions
|
|
@ -48,12 +48,6 @@ export const
|
||||||
*/
|
*/
|
||||||
b64EncodeJSONSafe = data => b64EncodeJSON(data).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''),
|
b64EncodeJSONSafe = data => b64EncodeJSON(data).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''),
|
||||||
|
|
||||||
settingsSaveHelperSimpleFunction = (koTrigger, context) =>
|
|
||||||
iError => {
|
|
||||||
koTrigger.call(context, iError ? SaveSettingsStep.FalseResult : SaveSettingsStep.TrueResult);
|
|
||||||
setTimeout(() => koTrigger.call(context, SaveSettingsStep.Idle), 1000);
|
|
||||||
},
|
|
||||||
|
|
||||||
changeTheme = (value, themeTrigger = ()=>0) => {
|
changeTheme = (value, themeTrigger = ()=>0) => {
|
||||||
const themeStyle = elementById('app-theme-style'),
|
const themeStyle = elementById('app-theme-style'),
|
||||||
clearTimer = () => {
|
clearTimer = () => {
|
||||||
|
|
|
||||||
2
dev/External/ko.js
vendored
2
dev/External/ko.js
vendored
|
|
@ -18,7 +18,7 @@ export const
|
||||||
|
|
||||||
addObservablesTo = (target, observables) =>
|
addObservablesTo = (target, observables) =>
|
||||||
forEachObjectEntry(observables, (key, value) =>
|
forEachObjectEntry(observables, (key, value) =>
|
||||||
target[key] = /*isArray(value) ? ko.observableArray(value) :*/ ko.observable(value) ),
|
target[key] || (target[key] = /*isArray(value) ? ko.observableArray(value) :*/ ko.observable(value)) ),
|
||||||
|
|
||||||
addComputablesTo = (target, computables) =>
|
addComputablesTo = (target, computables) =>
|
||||||
forEachObjectEntry(computables, (key, fn) => target[key] = koComputable(fn)),
|
forEachObjectEntry(computables, (key, fn) => target[key] = koComputable(fn)),
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ import { Scope } from 'Common/Enums';
|
||||||
import { keyScope, Settings, leftPanelDisabled } from 'Common/Globals';
|
import { keyScope, Settings, leftPanelDisabled } from 'Common/Globals';
|
||||||
import { ViewType, showScreenPopup } from 'Knoin/Knoin';
|
import { ViewType, showScreenPopup } from 'Knoin/Knoin';
|
||||||
|
|
||||||
|
import { SaveSettingsStep } from 'Common/Enums';
|
||||||
|
import { SettingsGet } from 'Common/Globals';
|
||||||
|
|
||||||
class AbstractView {
|
class AbstractView {
|
||||||
constructor(templateID, type)
|
constructor(templateID, type)
|
||||||
{
|
{
|
||||||
|
|
@ -117,16 +120,37 @@ export class AbstractViewRight extends AbstractView
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
export class AbstractViewSettings
|
export class AbstractViewSettings
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
onBuild(viewModelDom) {}
|
onBuild(viewModelDom) {}
|
||||||
onBeforeShow() {}
|
onBeforeShow() {}
|
||||||
onShow() {}
|
onShow() {}
|
||||||
onHide() {}
|
onHide() {}
|
||||||
viewModelDom
|
viewModelDom
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
|
addSetting(name, valueCb)
|
||||||
|
{
|
||||||
|
let prop = name = name[0].toLowerCase() + name.slice(1),
|
||||||
|
trigger = prop + 'Trigger';
|
||||||
|
addObservablesTo(this, {
|
||||||
|
[prop]: SettingsGet(name),
|
||||||
|
[trigger]: SaveSettingsStep.Idle,
|
||||||
|
});
|
||||||
|
addSubscribablesTo(this, {
|
||||||
|
[prop]: (value => {
|
||||||
|
this[trigger](SaveSettingsStep.Animate);
|
||||||
|
valueCb && valueCb(value);
|
||||||
|
rl.app.Remote.saveSetting(name, value,
|
||||||
|
iError => {
|
||||||
|
this[trigger](iError ? SaveSettingsStep.FalseResult : SaveSettingsStep.TrueResult);
|
||||||
|
setTimeout(() => this[trigger](SaveSettingsStep.Idle), 1000);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}).debounce(999),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class AbstractViewLogin extends AbstractViewCenter {
|
export class AbstractViewLogin extends AbstractViewCenter {
|
||||||
constructor(templateID) {
|
constructor(templateID) {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,15 @@ class RemoteAdminFetch extends AbstractFetchRemote {
|
||||||
this.request('AdminSettingsUpdate', fCallback, oData);
|
this.request('AdminSettingsUpdate', fCallback, oData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} key
|
||||||
|
* @param {?scalar} value
|
||||||
|
* @param {?Function} fCallback
|
||||||
|
*/
|
||||||
|
saveSetting(key, value, fCallback) {
|
||||||
|
this.saveConfig({[key]: value}, fCallback);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new RemoteAdminFetch();
|
export default new RemoteAdminFetch();
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,10 @@
|
||||||
import { SaveSettingsStep } from 'Common/Enums';
|
import { AbstractViewSettings } from 'Knoin/AbstractViews';
|
||||||
import { SettingsGet } from 'Common/Globals';
|
|
||||||
import { settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
|
||||||
import { addObservablesTo, addSubscribablesTo } from 'External/ko';
|
|
||||||
|
|
||||||
import Remote from 'Remote/Admin/Fetch';
|
export class BrandingAdminSettings extends AbstractViewSettings {
|
||||||
|
|
||||||
export class BrandingAdminSettings /*extends AbstractViewSettings*/ {
|
|
||||||
constructor() {
|
constructor() {
|
||||||
addObservablesTo(this, {
|
super();
|
||||||
title: SettingsGet('Title'),
|
this.addSetting('Title');
|
||||||
loadingDesc: SettingsGet('LoadingDescription'),
|
this.addSetting('LoadingDescription');
|
||||||
faviconUrl: SettingsGet('FaviconUrl'),
|
this.addSetting('FaviconUrl');
|
||||||
|
|
||||||
titleTrigger: SaveSettingsStep.Idle,
|
|
||||||
loadingDescTrigger: SaveSettingsStep.Idle,
|
|
||||||
faviconUrlTrigger: SaveSettingsStep.Idle
|
|
||||||
});
|
|
||||||
|
|
||||||
addSubscribablesTo(this, {
|
|
||||||
title: (value =>
|
|
||||||
Remote.saveConfig({
|
|
||||||
Title: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.titleTrigger, this))
|
|
||||||
).debounce(999),
|
|
||||||
|
|
||||||
loadingDesc: (value =>
|
|
||||||
Remote.saveConfig({
|
|
||||||
LoadingDescription: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.loadingDescTrigger, this))
|
|
||||||
).debounce(999),
|
|
||||||
|
|
||||||
faviconUrl: (value =>
|
|
||||||
Remote.saveConfig({
|
|
||||||
FaviconUrl: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.faviconUrlTrigger, this))
|
|
||||||
).debounce(999)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,30 @@
|
||||||
import ko from 'ko';
|
import ko from 'ko';
|
||||||
|
|
||||||
import { SaveSettingsStep } from 'Common/Enums';
|
|
||||||
import { SettingsGet } from 'Common/Globals';
|
import { SettingsGet } from 'Common/Globals';
|
||||||
import {
|
import { defaultOptionsAfterRender } from 'Common/Utils';
|
||||||
settingsSaveHelperSimpleFunction,
|
|
||||||
defaultOptionsAfterRender
|
|
||||||
} from 'Common/Utils';
|
|
||||||
import { addObservablesTo, addSubscribablesTo } from 'External/ko';
|
import { addObservablesTo, addSubscribablesTo } from 'External/ko';
|
||||||
|
|
||||||
import Remote from 'Remote/Admin/Fetch';
|
import Remote from 'Remote/Admin/Fetch';
|
||||||
import { decorateKoCommands } from 'Knoin/Knoin';
|
import { decorateKoCommands } from 'Knoin/Knoin';
|
||||||
|
import { AbstractViewSettings } from 'Knoin/AbstractViews';
|
||||||
|
|
||||||
export class ContactsAdminSettings /*extends AbstractViewSettings*/ {
|
export class ContactsAdminSettings extends AbstractViewSettings {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
super();
|
||||||
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
|
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
|
||||||
|
|
||||||
|
this.addSetting('ContactsPdoDsn');
|
||||||
|
this.addSetting('ContactsPdoUser');
|
||||||
|
this.addSetting('ContactsPdoPassword');
|
||||||
|
this.addSetting('ContactsPdoType', () => {
|
||||||
|
this.testContactsSuccess(false);
|
||||||
|
this.testContactsError(false);
|
||||||
|
this.testContactsErrorMessage('');
|
||||||
|
});
|
||||||
|
|
||||||
addObservablesTo(this, {
|
addObservablesTo(this, {
|
||||||
enableContacts: !!SettingsGet('ContactsEnable'),
|
enableContacts: !!SettingsGet('ContactsEnable'),
|
||||||
contactsSync: !!SettingsGet('ContactsSync'),
|
contactsSync: !!SettingsGet('ContactsSync'),
|
||||||
contactsType: SettingsGet('ContactsPdoType'),
|
|
||||||
|
|
||||||
pdoDsn: SettingsGet('ContactsPdoDsn'),
|
|
||||||
pdoUser: SettingsGet('ContactsPdoUser'),
|
|
||||||
pdoPassword: SettingsGet('ContactsPdoPassword'),
|
|
||||||
|
|
||||||
pdoDsnTrigger: SaveSettingsStep.Idle,
|
|
||||||
pdoUserTrigger: SaveSettingsStep.Idle,
|
|
||||||
pdoPasswordTrigger: SaveSettingsStep.Idle,
|
|
||||||
contactsTypeTrigger: SaveSettingsStep.Idle,
|
|
||||||
|
|
||||||
testing: false,
|
testing: false,
|
||||||
testContactsSuccess: false,
|
testContactsSuccess: false,
|
||||||
|
|
@ -53,16 +50,16 @@ export class ContactsAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
|
|
||||||
this.mainContactsType = ko
|
this.mainContactsType = ko
|
||||||
.computed({
|
.computed({
|
||||||
read: this.contactsType,
|
read: this.contactsPdoType,
|
||||||
write: value => {
|
write: value => {
|
||||||
if (value !== this.contactsType()) {
|
if (value !== this.contactsPdoType()) {
|
||||||
if (supportedTypes.includes(value)) {
|
if (supportedTypes.includes(value)) {
|
||||||
this.contactsType(value);
|
this.contactsPdoType(value);
|
||||||
} else if (types.length) {
|
} else if (types.length) {
|
||||||
this.contactsType('');
|
this.contactsPdoType('');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.contactsType.valueHasMutated();
|
this.contactsPdoType.valueHasMutated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -77,35 +74,11 @@ export class ContactsAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
contactsSync: value =>
|
contactsSync: value =>
|
||||||
Remote.saveConfig({
|
Remote.saveConfig({
|
||||||
ContactsSync: value ? 1 : 0
|
ContactsSync: value ? 1 : 0
|
||||||
}),
|
})
|
||||||
|
|
||||||
contactsType: value => {
|
|
||||||
this.testContactsSuccess(false);
|
|
||||||
this.testContactsError(false);
|
|
||||||
this.testContactsErrorMessage('');
|
|
||||||
Remote.saveConfig({
|
|
||||||
ContactsPdoType: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.contactsTypeTrigger, this))
|
|
||||||
},
|
|
||||||
|
|
||||||
pdoDsn: value =>
|
|
||||||
Remote.saveConfig({
|
|
||||||
ContactsPdoDsn: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.pdoDsnTrigger, this)),
|
|
||||||
|
|
||||||
pdoUser: value =>
|
|
||||||
Remote.saveConfig({
|
|
||||||
ContactsPdoUser: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.pdoUserTrigger, this)),
|
|
||||||
|
|
||||||
pdoPassword: value =>
|
|
||||||
Remote.saveConfig({
|
|
||||||
ContactsPdoPassword: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.pdoPasswordTrigger, this))
|
|
||||||
})
|
})
|
||||||
|
|
||||||
decorateKoCommands(this, {
|
decorateKoCommands(this, {
|
||||||
testContactsCommand: self => self.pdoDsn() && self.pdoUser()
|
testContactsCommand: self => self.contactsPdoDsn() && self.contactsPdoUser()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -134,10 +107,10 @@ export class ContactsAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
|
|
||||||
this.testing(false);
|
this.testing(false);
|
||||||
}, {
|
}, {
|
||||||
ContactsPdoType: this.contactsType(),
|
ContactsPdoType: this.contactsPdoType(),
|
||||||
ContactsPdoDsn: this.pdoDsn(),
|
ContactsPdoDsn: this.contactsPdoDsn(),
|
||||||
ContactsPdoUser: this.pdoUser(),
|
ContactsPdoUser: this.contactsPdo(),
|
||||||
ContactsPdoPassword: this.pdoPassword()
|
ContactsPdoPassword: this.contactsPdoPassword()
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ import ko from 'ko';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isArray,
|
isArray,
|
||||||
pInt,
|
|
||||||
settingsSaveHelperSimpleFunction,
|
|
||||||
changeTheme,
|
changeTheme,
|
||||||
convertThemeName
|
convertThemeName
|
||||||
} from 'Common/Utils';
|
} from 'Common/Utils';
|
||||||
|
|
@ -14,6 +12,7 @@ import { Capa, SaveSettingsStep } from 'Common/Enums';
|
||||||
import { Settings, SettingsGet, SettingsCapa } from 'Common/Globals';
|
import { Settings, SettingsGet, SettingsCapa } from 'Common/Globals';
|
||||||
import { translatorReload, convertLangName } from 'Common/Translator';
|
import { translatorReload, convertLangName } from 'Common/Translator';
|
||||||
|
|
||||||
|
import { AbstractViewSettings } from 'Knoin/AbstractViews';
|
||||||
import { showScreenPopup } from 'Knoin/Knoin';
|
import { showScreenPopup } from 'Knoin/Knoin';
|
||||||
|
|
||||||
import Remote from 'Remote/Admin/Fetch';
|
import Remote from 'Remote/Admin/Fetch';
|
||||||
|
|
@ -22,8 +21,10 @@ import { ThemeStore } from 'Stores/Theme';
|
||||||
import { LanguageStore } from 'Stores/Language';
|
import { LanguageStore } from 'Stores/Language';
|
||||||
import { LanguagesPopupView } from 'View/Popup/Languages';
|
import { LanguagesPopupView } from 'View/Popup/Languages';
|
||||||
|
|
||||||
export class GeneralAdminSettings /*extends AbstractViewSettings*/ {
|
export class GeneralAdminSettings extends AbstractViewSettings {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
this.language = LanguageStore.language;
|
this.language = LanguageStore.language;
|
||||||
this.languages = LanguageStore.languages;
|
this.languages = LanguageStore.languages;
|
||||||
|
|
||||||
|
|
@ -37,10 +38,9 @@ export class GeneralAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
this.themes = ThemeStore.themes;
|
this.themes = ThemeStore.themes;
|
||||||
|
|
||||||
addObservablesTo(this, {
|
addObservablesTo(this, {
|
||||||
allowLanguagesOnSettings: !!SettingsGet('AllowLanguagesOnSettings'),
|
allowLanguagesOnSettings: SettingsGet('AllowLanguagesOnSettings'),
|
||||||
newMoveToFolder: !!SettingsGet('NewMoveToFolder'),
|
newMoveToFolder: SettingsGet('NewMoveToFolder'),
|
||||||
attachmentLimitTrigger: SaveSettingsStep.Idle,
|
attachmentLimitTrigger: SaveSettingsStep.Idle,
|
||||||
languageTrigger: SaveSettingsStep.Idle,
|
|
||||||
themeTrigger: SaveSettingsStep.Idle,
|
themeTrigger: SaveSettingsStep.Idle,
|
||||||
capaThemes: SettingsCapa(Capa.Themes),
|
capaThemes: SettingsCapa(Capa.Themes),
|
||||||
capaUserBackground: SettingsCapa(Capa.UserBackground),
|
capaUserBackground: SettingsCapa(Capa.UserBackground),
|
||||||
|
|
@ -58,10 +58,14 @@ export class GeneralAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
this.mainAttachmentLimit = ko
|
this.attachmentLimit = ko
|
||||||
.observable(pInt(SettingsGet('AttachmentLimit')) / (1024 * 1024))
|
.observable(SettingsGet('AttachmentLimit') / (1024 * 1024))
|
||||||
.extend({ debounce: 500 });
|
.extend({ debounce: 500 });
|
||||||
|
|
||||||
|
this.addSetting('Language');
|
||||||
|
this.addSetting('AttachmentLimit');
|
||||||
|
this.addSetting('Theme', value => changeTheme(value, this.themeTrigger));
|
||||||
|
|
||||||
this.uploadData = SettingsGet('PhpUploadSizes');
|
this.uploadData = SettingsGet('PhpUploadSizes');
|
||||||
this.uploadDataDesc =
|
this.uploadDataDesc =
|
||||||
this.uploadData && (this.uploadData.upload_max_filesize || this.uploadData.post_max_size)
|
this.uploadData && (this.uploadData.upload_max_filesize || this.uploadData.post_max_size)
|
||||||
|
|
@ -86,20 +90,9 @@ export class GeneralAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
this.languageAdminTrigger(saveSettingsStep);
|
this.languageAdminTrigger(saveSettingsStep);
|
||||||
setTimeout(() => this.languageAdminTrigger(SaveSettingsStep.Idle), 1000);
|
setTimeout(() => this.languageAdminTrigger(SaveSettingsStep.Idle), 1000);
|
||||||
},
|
},
|
||||||
fSaveBoolHelper = key =>
|
fSaveHelper = key => value => Remote.saveSetting(key, value);
|
||||||
value => Remote.saveConfig({[key]: value ? 1 : 0});
|
|
||||||
|
|
||||||
addSubscribablesTo(this, {
|
addSubscribablesTo(this, {
|
||||||
mainAttachmentLimit: value =>
|
|
||||||
Remote.saveConfig({
|
|
||||||
AttachmentLimit: pInt(value)
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.attachmentLimitTrigger, this)),
|
|
||||||
|
|
||||||
language: value =>
|
|
||||||
Remote.saveConfig({
|
|
||||||
Language: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.languageTrigger, this)),
|
|
||||||
|
|
||||||
languageAdmin: value => {
|
languageAdmin: value => {
|
||||||
this.languageAdminTrigger(SaveSettingsStep.Animate);
|
this.languageAdminTrigger(SaveSettingsStep.Animate);
|
||||||
translatorReload(true, value)
|
translatorReload(true, value)
|
||||||
|
|
@ -109,26 +102,19 @@ export class GeneralAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
theme: value => {
|
capaAdditionalAccounts: fSaveHelper('CapaAdditionalAccounts'),
|
||||||
changeTheme(value, this.themeTrigger);
|
|
||||||
Remote.saveConfig({
|
|
||||||
Theme: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.themeTrigger, this));
|
|
||||||
},
|
|
||||||
|
|
||||||
capaAdditionalAccounts: fSaveBoolHelper('CapaAdditionalAccounts'),
|
capaIdentities: fSaveHelper('CapaIdentities'),
|
||||||
|
|
||||||
capaIdentities: fSaveBoolHelper('CapaIdentities'),
|
capaAttachmentThumbnails: fSaveHelper('CapaAttachmentThumbnails'),
|
||||||
|
|
||||||
capaAttachmentThumbnails: fSaveBoolHelper('CapaAttachmentThumbnails'),
|
capaThemes: fSaveHelper('CapaThemes'),
|
||||||
|
|
||||||
capaThemes: fSaveBoolHelper('CapaThemes'),
|
capaUserBackground: fSaveHelper('CapaUserBackground'),
|
||||||
|
|
||||||
capaUserBackground: fSaveBoolHelper('CapaUserBackground'),
|
allowLanguagesOnSettings: fSaveHelper('AllowLanguagesOnSettings'),
|
||||||
|
|
||||||
allowLanguagesOnSettings: fSaveBoolHelper('AllowLanguagesOnSettings'),
|
newMoveToFolder: fSaveHelper('NewMoveToFolder')
|
||||||
|
|
||||||
newMoveToFolder: fSaveBoolHelper('NewMoveToFolder')
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
import { SaveSettingsStep } from 'Common/Enums';
|
|
||||||
import { Settings, SettingsGet } from 'Common/Globals';
|
import { Settings, SettingsGet } from 'Common/Globals';
|
||||||
import { settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
|
||||||
import { addObservablesTo, addSubscribablesTo } from 'External/ko';
|
import { addObservablesTo, addSubscribablesTo } from 'External/ko';
|
||||||
|
import { AbstractViewSettings } from 'Knoin/AbstractViews';
|
||||||
import Remote from 'Remote/Admin/Fetch';
|
import Remote from 'Remote/Admin/Fetch';
|
||||||
|
|
||||||
export class LoginAdminSettings /*extends AbstractViewSettings*/ {
|
export class LoginAdminSettings extends AbstractViewSettings {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.addSetting('LoginDefaultDomain');
|
||||||
|
|
||||||
addObservablesTo(this, {
|
addObservablesTo(this, {
|
||||||
determineUserLanguage: !!SettingsGet('DetermineUserLanguage'),
|
determineUserLanguage: !!SettingsGet('DetermineUserLanguage'),
|
||||||
determineUserDomain: !!SettingsGet('DetermineUserDomain'),
|
determineUserDomain: !!SettingsGet('DetermineUserDomain'),
|
||||||
allowLanguagesOnLogin: !!SettingsGet('AllowLanguagesOnLogin'),
|
allowLanguagesOnLogin: !!SettingsGet('AllowLanguagesOnLogin'),
|
||||||
hideSubmitButton: !!Settings.app('hideSubmitButton'),
|
hideSubmitButton: !!Settings.app('hideSubmitButton'),
|
||||||
defaultDomain: SettingsGet('LoginDefaultDomain'),
|
|
||||||
defaultDomainTrigger: SaveSettingsStep.Idle
|
|
||||||
});
|
});
|
||||||
|
|
||||||
addSubscribablesTo(this, {
|
addSubscribablesTo(this, {
|
||||||
|
|
@ -35,13 +35,7 @@ export class LoginAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
hideSubmitButton: value =>
|
hideSubmitButton: value =>
|
||||||
Remote.saveConfig({
|
Remote.saveConfig({
|
||||||
hideSubmitButton: value ? 1 : 0
|
hideSubmitButton: value ? 1 : 0
|
||||||
}),
|
})
|
||||||
|
|
||||||
defaultDomain: (value =>
|
|
||||||
Remote.saveConfig({
|
|
||||||
LoginDefaultDomain: value.trim()
|
|
||||||
}, settingsSaveHelperSimpleFunction(this.defaultDomainTrigger, this))
|
|
||||||
).debounce(999)
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export class FoldersUserSettings /*extends AbstractViewSettings*/ {
|
||||||
|
|
||||||
this.folderForEdit = ko.observable(null).extend({ toggleSubscribeProperty: [this, 'edited'] });
|
this.folderForEdit = ko.observable(null).extend({ toggleSubscribeProperty: [this, 'edited'] });
|
||||||
|
|
||||||
SettingsUserStore.hideUnsubscribed.subscribe(value => Remote.saveSetting('HideUnsubscribed', value ? 1 : 0));
|
SettingsUserStore.hideUnsubscribed.subscribe(value => Remote.saveSetting('HideUnsubscribed', value));
|
||||||
}
|
}
|
||||||
|
|
||||||
folderEditOnEnter(folder) {
|
folderEditOnEnter(folder) {
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,11 @@ import ko from 'ko';
|
||||||
import { SaveSettingsStep } from 'Common/Enums';
|
import { SaveSettingsStep } from 'Common/Enums';
|
||||||
import { EditorDefaultType, Layout } from 'Common/EnumsUser';
|
import { EditorDefaultType, Layout } from 'Common/EnumsUser';
|
||||||
import { Settings, SettingsGet } from 'Common/Globals';
|
import { Settings, SettingsGet } from 'Common/Globals';
|
||||||
import { isArray, settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
import { isArray } from 'Common/Utils';
|
||||||
import { addObservablesTo, addSubscribablesTo, addComputablesTo } from 'External/ko';
|
import { addSubscribablesTo, addComputablesTo } from 'External/ko';
|
||||||
import { i18n, trigger as translatorTrigger, translatorReload, convertLangName } from 'Common/Translator';
|
import { i18n, trigger as translatorTrigger, translatorReload, convertLangName } from 'Common/Translator';
|
||||||
|
|
||||||
|
import { AbstractViewSettings } from 'Knoin/AbstractViews';
|
||||||
import { showScreenPopup } from 'Knoin/Knoin';
|
import { showScreenPopup } from 'Knoin/Knoin';
|
||||||
|
|
||||||
import { AppUserStore } from 'Stores/User/App';
|
import { AppUserStore } from 'Stores/User/App';
|
||||||
|
|
@ -22,8 +23,10 @@ import Remote from 'Remote/User/Fetch';
|
||||||
import { IdentityPopupView } from 'View/Popup/Identity';
|
import { IdentityPopupView } from 'View/Popup/Identity';
|
||||||
import { LanguagesPopupView } from 'View/Popup/Languages';
|
import { LanguagesPopupView } from 'View/Popup/Languages';
|
||||||
|
|
||||||
export class GeneralUserSettings /*extends AbstractViewSettings*/ {
|
export class GeneralUserSettings extends AbstractViewSettings {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
this.language = LanguageStore.language;
|
this.language = LanguageStore.language;
|
||||||
this.languages = LanguageStore.languages;
|
this.languages = LanguageStore.languages;
|
||||||
this.messageReadDelay = SettingsUserStore.messageReadDelay;
|
this.messageReadDelay = SettingsUserStore.messageReadDelay;
|
||||||
|
|
@ -48,14 +51,7 @@ export class GeneralUserSettings /*extends AbstractViewSettings*/ {
|
||||||
this.replySameFolder = SettingsUserStore.replySameFolder;
|
this.replySameFolder = SettingsUserStore.replySameFolder;
|
||||||
this.allowLanguagesOnSettings = !!SettingsGet('AllowLanguagesOnSettings');
|
this.allowLanguagesOnSettings = !!SettingsGet('AllowLanguagesOnSettings');
|
||||||
|
|
||||||
this.languageTrigger = ko.observable(SaveSettingsStep.Idle).extend({ debounce: 100 });
|
this.languageTrigger = ko.observable(SaveSettingsStep.Idle);
|
||||||
|
|
||||||
addObservablesTo(this, {
|
|
||||||
mppTrigger: SaveSettingsStep.Idle,
|
|
||||||
messageReadDelayTrigger: SaveSettingsStep.Idle,
|
|
||||||
editorDefaultTypeTrigger: SaveSettingsStep.Idle,
|
|
||||||
layoutTrigger: SaveSettingsStep.Idle
|
|
||||||
});
|
|
||||||
|
|
||||||
this.identities = IdentityUserStore;
|
this.identities = IdentityUserStore;
|
||||||
|
|
||||||
|
|
@ -92,59 +88,51 @@ export class GeneralUserSettings /*extends AbstractViewSettings*/ {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.addSetting('EditorDefaultType');
|
||||||
|
this.addSetting('MessageReadDelay');
|
||||||
|
this.addSetting('MessagesPerPage');
|
||||||
|
this.addSetting('Layout', () => MessagelistUserStore([]));
|
||||||
|
|
||||||
const fReloadLanguageHelper = (saveSettingsStep) => () => {
|
const fReloadLanguageHelper = (saveSettingsStep) => () => {
|
||||||
this.languageTrigger(saveSettingsStep);
|
this.languageTrigger(saveSettingsStep);
|
||||||
setTimeout(() => this.languageTrigger(SaveSettingsStep.Idle), 1000);
|
setTimeout(() => this.languageTrigger(SaveSettingsStep.Idle), 1000);
|
||||||
};
|
},
|
||||||
|
fSaveHelper = key => value => Remote.saveSetting(key, value);
|
||||||
|
|
||||||
addSubscribablesTo(this, {
|
addSubscribablesTo(this, {
|
||||||
language: value => {
|
language: value => {
|
||||||
this.languageTrigger(SaveSettingsStep.Animate);
|
this.languageTrigger(SaveSettingsStep.Animate);
|
||||||
translatorReload(false, value)
|
translatorReload(false, value)
|
||||||
.then(fReloadLanguageHelper(SaveSettingsStep.TrueResult),
|
.then(fReloadLanguageHelper(SaveSettingsStep.TrueResult), fReloadLanguageHelper(SaveSettingsStep.FalseResult))
|
||||||
fReloadLanguageHelper(SaveSettingsStep.FalseResult))
|
|
||||||
.then(() => Remote.saveSetting('Language', value));
|
.then(() => Remote.saveSetting('Language', value));
|
||||||
},
|
},
|
||||||
|
|
||||||
editorDefaultType: value => Remote.saveSetting('EditorDefaultType', value,
|
viewHTML: fSaveHelper('ViewHTML'),
|
||||||
settingsSaveHelperSimpleFunction(this.editorDefaultTypeTrigger, this)),
|
showImages: fSaveHelper('ShowImages'),
|
||||||
|
|
||||||
messageReadDelay: value => Remote.saveSetting('MessageReadDelay', value,
|
|
||||||
settingsSaveHelperSimpleFunction(this.messageReadDelayTrigger, this)),
|
|
||||||
|
|
||||||
messagesPerPage: value => Remote.saveSetting('MPP', value,
|
|
||||||
settingsSaveHelperSimpleFunction(this.mppTrigger, this)),
|
|
||||||
|
|
||||||
viewHTML: value => Remote.saveSetting('ViewHTML', value ? 1 : 0),
|
|
||||||
showImages: value => Remote.saveSetting('ShowImages', value ? 1 : 0),
|
|
||||||
|
|
||||||
removeColors: value => {
|
removeColors: value => {
|
||||||
let dom = MessageUserStore.bodiesDom();
|
let dom = MessageUserStore.bodiesDom();
|
||||||
if (dom) {
|
if (dom) {
|
||||||
dom.innerHTML = '';
|
dom.innerHTML = '';
|
||||||
}
|
}
|
||||||
Remote.saveSetting('RemoveColors', value ? 1 : 0);
|
Remote.saveSetting('RemoveColors', value);
|
||||||
},
|
},
|
||||||
|
|
||||||
useCheckboxesInList: value => Remote.saveSetting('UseCheckboxesInList', value ? 1 : 0),
|
useCheckboxesInList: fSaveHelper('UseCheckboxesInList'),
|
||||||
|
|
||||||
enableDesktopNotification: value => Remote.saveSetting('DesktopNotifications', value ? 1 : 0),
|
enableDesktopNotification: fSaveHelper('DesktopNotifications'),
|
||||||
|
|
||||||
enableSoundNotification: value => Remote.saveSetting('SoundNotification', value ? 1 : 0),
|
enableSoundNotification: fSaveHelper('SoundNotification'),
|
||||||
notificationSound: value => {
|
notificationSound: value => {
|
||||||
Remote.saveSetting('NotificationSound', value);
|
Remote.saveSetting('NotificationSound', value);
|
||||||
Settings.set('NotificationSound', value);
|
Settings.set('NotificationSound', value);
|
||||||
},
|
},
|
||||||
|
|
||||||
replySameFolder: value => Remote.saveSetting('ReplySameFolder', value ? 1 : 0),
|
replySameFolder: fSaveHelper('ReplySameFolder'),
|
||||||
|
|
||||||
useThreads: value => {
|
useThreads: value => {
|
||||||
MessagelistUserStore([]);
|
MessagelistUserStore([]);
|
||||||
Remote.saveSetting('UseThreads', value ? 1 : 0);
|
Remote.saveSetting('UseThreads', value);
|
||||||
},
|
|
||||||
|
|
||||||
layout: value => {
|
|
||||||
MessagelistUserStore([]);
|
|
||||||
Remote.saveSetting('Layout', value, settingsSaveHelperSimpleFunction(this.layoutTrigger, this));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export class OpenPgpUserSettings /*extends AbstractViewSettings*/ {
|
||||||
|
|
||||||
this.allowDraftAutosave = SettingsUserStore.allowDraftAutosave;
|
this.allowDraftAutosave = SettingsUserStore.allowDraftAutosave;
|
||||||
|
|
||||||
this.allowDraftAutosave.subscribe(value => Remote.saveSetting('AllowDraftAutosave', value ? 1 : 0))
|
this.allowDraftAutosave.subscribe(value => Remote.saveSetting('AllowDraftAutosave', value))
|
||||||
}
|
}
|
||||||
|
|
||||||
addOpenPgpKey() {
|
addOpenPgpKey() {
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,20 @@
|
||||||
import ko from 'ko';
|
|
||||||
import { koComputable } from 'External/ko';
|
import { koComputable } from 'External/ko';
|
||||||
|
|
||||||
import { pInt, settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
import { Capa } from 'Common/Enums';
|
||||||
import { Capa, SaveSettingsStep } from 'Common/Enums';
|
|
||||||
import { SettingsCapa } from 'Common/Globals';
|
import { SettingsCapa } from 'Common/Globals';
|
||||||
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
|
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
|
||||||
|
|
||||||
|
import { AbstractViewSettings } from 'Knoin/AbstractViews';
|
||||||
|
|
||||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||||
|
|
||||||
import Remote from 'Remote/User/Fetch';
|
export class SecurityUserSettings extends AbstractViewSettings {
|
||||||
|
|
||||||
export class SecurityUserSettings /*extends AbstractViewSettings*/ {
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
this.capaAutoLogout = SettingsCapa(Capa.AutoLogout);
|
this.capaAutoLogout = SettingsCapa(Capa.AutoLogout);
|
||||||
|
|
||||||
this.autoLogout = SettingsUserStore.autoLogout;
|
this.autoLogout = SettingsUserStore.autoLogout;
|
||||||
this.autoLogoutTrigger = ko.observable(SaveSettingsStep.Idle);
|
|
||||||
|
|
||||||
let i18nLogout = (key, params) => i18n('SETTINGS_SECURITY/AUTOLOGIN_' + key, params);
|
let i18nLogout = (key, params) => i18n('SETTINGS_SECURITY/AUTOLOGIN_' + key, params);
|
||||||
this.autoLogoutOptions = koComputable(() => {
|
this.autoLogoutOptions = koComputable(() => {
|
||||||
|
|
@ -33,10 +32,7 @@ export class SecurityUserSettings /*extends AbstractViewSettings*/ {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.capaAutoLogout) {
|
if (this.capaAutoLogout) {
|
||||||
this.autoLogout.subscribe(value => Remote.saveSetting(
|
this.addSetting('AutoLogout');
|
||||||
'AutoLogout', pInt(value),
|
|
||||||
settingsSaveHelperSimpleFunction(this.autoLogoutTrigger, this)
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -856,13 +856,16 @@ class Actions
|
||||||
if ($oConfig->Get('webmail', 'allow_languages_on_settings', true)) {
|
if ($oConfig->Get('webmail', 'allow_languages_on_settings', true)) {
|
||||||
$sLanguage = (string) $oSettings->GetConf('Language', $sLanguage);
|
$sLanguage = (string) $oSettings->GetConf('Language', $sLanguage);
|
||||||
}
|
}
|
||||||
|
if (!$oSettings->GetConf('MessagesPerPage')) {
|
||||||
|
$oSettings->SetConf('MessagesPerPage', $oSettings->GetConf('MPP', $aResult['MessagesPerPage']));
|
||||||
|
}
|
||||||
|
|
||||||
$aResult['EditorDefaultType'] = (string)$oSettings->GetConf('EditorDefaultType', $aResult['EditorDefaultType']);
|
$aResult['EditorDefaultType'] = (string)$oSettings->GetConf('EditorDefaultType', $aResult['EditorDefaultType']);
|
||||||
$aResult['ViewHTML'] = (bool)$oSettings->GetConf('ViewHTML', $aResult['ViewHTML']);
|
$aResult['ViewHTML'] = (bool)$oSettings->GetConf('ViewHTML', $aResult['ViewHTML']);
|
||||||
$aResult['ShowImages'] = (bool)$oSettings->GetConf('ShowImages', $aResult['ShowImages']);
|
$aResult['ShowImages'] = (bool)$oSettings->GetConf('ShowImages', $aResult['ShowImages']);
|
||||||
$aResult['RemoveColors'] = (bool)$oSettings->GetConf('RemoveColors', $aResult['RemoveColors']);
|
$aResult['RemoveColors'] = (bool)$oSettings->GetConf('RemoveColors', $aResult['RemoveColors']);
|
||||||
$aResult['ContactsAutosave'] = (bool)$oSettings->GetConf('ContactsAutosave', $aResult['ContactsAutosave']);
|
$aResult['ContactsAutosave'] = (bool)$oSettings->GetConf('ContactsAutosave', $aResult['ContactsAutosave']);
|
||||||
$aResult['MessagesPerPage'] = (int)$oSettings->GetConf('MPP', $aResult['MessagesPerPage']);
|
$aResult['MessagesPerPage'] = (int)$oSettings->GetConf('MessagesPerPage', $aResult['MessagesPerPage']);
|
||||||
$aResult['MessageReadDelay'] = (int)$oSettings->GetConf('MessageReadDelay', $aResult['MessageReadDelay']);
|
$aResult['MessageReadDelay'] = (int)$oSettings->GetConf('MessageReadDelay', $aResult['MessageReadDelay']);
|
||||||
$aResult['SoundNotification'] = (bool)$oSettings->GetConf('SoundNotification', $aResult['SoundNotification']);
|
$aResult['SoundNotification'] = (bool)$oSettings->GetConf('SoundNotification', $aResult['SoundNotification']);
|
||||||
$aResult['NotificationSound'] = (string)$oSettings->GetConf('NotificationSound', $aResult['NotificationSound']);
|
$aResult['NotificationSound'] = (string)$oSettings->GetConf('NotificationSound', $aResult['NotificationSound']);
|
||||||
|
|
|
||||||
|
|
@ -918,13 +918,13 @@ trait Admin
|
||||||
$sValue = $mStringCallback($sValue);
|
$sValue = $mStringCallback($sValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oConfig->Set($sConfigSector, $sConfigName, (string)$sValue);
|
$oConfig->Set($sConfigSector, $sConfigName, $sValue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'dummy':
|
case 'dummy':
|
||||||
$sValue = (string)$this->GetActionParam('ContactsPdoPassword', APP_DUMMY);
|
$sValue = (string) $this->GetActionParam($sParamName, APP_DUMMY);
|
||||||
if (APP_DUMMY !== $sValue) {
|
if (APP_DUMMY !== $sValue) {
|
||||||
$oConfig->Set($sConfigSector, $sConfigName, (string)$sValue);
|
$oConfig->Set($sConfigSector, $sConfigName, $sValue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -934,7 +934,7 @@ trait Admin
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bool':
|
case 'bool':
|
||||||
$oConfig->Set($sConfigSector, $sConfigName, '1' === (string)$sValue);
|
$oConfig->Set($sConfigSector, $sConfigName, !empty($sValue) && 'false' !== $sValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ trait User
|
||||||
$oSettingsLocal->SetConf('Theme', $this->ValidateTheme($oConfig->Get('webmail', 'theme', 'Default')));
|
$oSettingsLocal->SetConf('Theme', $this->ValidateTheme($oConfig->Get('webmail', 'theme', 'Default')));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setSettingsFromParams($oSettings, 'MPP', 'int', function ($iValue) {
|
$this->setSettingsFromParams($oSettings, 'MessagesPerPage', 'int', function ($iValue) {
|
||||||
return \min(50, \max(10, $iValue));
|
return \min(50, \max(10, $iValue));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -556,7 +556,7 @@ trait User
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bool':
|
case 'bool':
|
||||||
$oSettings->SetConf($sConfigName, !empty($sValue));
|
$oSettings->SetConf($sConfigName, !empty($sValue) && 'false' !== $sValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
<div data-bind="component: {
|
<div data-bind="component: {
|
||||||
name: 'Input',
|
name: 'Input',
|
||||||
params: {
|
params: {
|
||||||
value: loadingDesc,
|
value: loadingDescription,
|
||||||
trigger: loadingDescTrigger,
|
trigger: loadingDescriptionTrigger,
|
||||||
size: 5
|
size: 5
|
||||||
}
|
}
|
||||||
}"></div>
|
}"></div>
|
||||||
|
|
|
||||||
|
|
@ -28,32 +28,32 @@
|
||||||
params: {
|
params: {
|
||||||
options: contactsTypesOptions,
|
options: contactsTypesOptions,
|
||||||
value: mainContactsType,
|
value: mainContactsType,
|
||||||
trigger: contactsTypeTrigger,
|
trigger: contactsPdoTypeTrigger,
|
||||||
optionsText: 'name',
|
optionsText: 'name',
|
||||||
optionsValue: 'id'
|
optionsValue: 'id'
|
||||||
}
|
}
|
||||||
}"></div>
|
}"></div>
|
||||||
</div>
|
</div>
|
||||||
<div data-bind="visible: 'sqlite' !== contactsType()">
|
<div data-bind="visible: 'sqlite' !== contactsPdoType()">
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="TAB_CONTACTS/LABEL_STORAGE_DSN"></label>
|
<label data-i18n="TAB_CONTACTS/LABEL_STORAGE_DSN"></label>
|
||||||
<div>
|
<div>
|
||||||
<input type="text" class="span6" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
<input type="text" class="span6" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
data-bind="value: pdoDsn, saveTrigger: pdoDsnTrigger" placeholder="mysql:host=127.0.0.1;port=3306;dbname=snappymail">
|
data-bind="value: contactsPdoDsn, saveTrigger: contactsPdoDsnTrigger" placeholder="mysql:host=127.0.0.1;port=3306;dbname=snappymail">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="TAB_CONTACTS/LABEL_STORAGE_USER"></label>
|
<label data-i18n="TAB_CONTACTS/LABEL_STORAGE_USER"></label>
|
||||||
<div>
|
<div>
|
||||||
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
data-bind="value: pdoUser, saveTrigger: pdoUserTrigger">
|
data-bind="value: contactsPdoUser, saveTrigger: contactsPdoUserTrigger">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="TAB_CONTACTS/LABEL_STORAGE_PASSWORD"></label>
|
<label data-i18n="TAB_CONTACTS/LABEL_STORAGE_PASSWORD"></label>
|
||||||
<div>
|
<div>
|
||||||
<input type="password" autocomplete="current-password" autocorrect="off" autocapitalize="off" spellcheck="false"
|
<input type="password" autocomplete="current-password" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
data-bind="value: pdoPassword, saveTrigger: pdoPasswordTrigger">
|
data-bind="value: contactsPdoPassword, saveTrigger: contactsPdoPasswordTrigger">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div data-bind="visible: 'sqlite' === contactsType()">
|
<div data-bind="visible: 'sqlite' === contactsPdoType()">
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<div class="alert">
|
<div class="alert">
|
||||||
<h4 data-i18n="TAB_CONTACTS/ALERT_NOTICE"></h4>
|
<h4 data-i18n="TAB_CONTACTS/ALERT_NOTICE"></h4>
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="TAB_GENERAL/LABEL_ATTACHMENT_SIZE_LIMIT"></label>
|
<label data-i18n="TAB_GENERAL/LABEL_ATTACHMENT_SIZE_LIMIT"></label>
|
||||||
<div>
|
<div>
|
||||||
<input type="number" min="1" step="1" class="span1" data-bind="textInput: mainAttachmentLimit">
|
<input type="number" min="1" step="1" class="span1" data-bind="textInput: attachmentLimit">
|
||||||
|
|
||||||
<span data-i18n="MB"></span>
|
<span data-i18n="MB"></span>
|
||||||
<span data-bind="saveTrigger: attachmentLimitTrigger"></span>
|
<span data-bind="saveTrigger: attachmentLimitTrigger"></span>
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
<div data-bind="component: {
|
<div data-bind="component: {
|
||||||
name: 'Input',
|
name: 'Input',
|
||||||
params: {
|
params: {
|
||||||
value: defaultDomain,
|
value: loginDefaultDomain,
|
||||||
trigger: defaultDomainTrigger,
|
trigger: loginDefaultDomainTrigger,
|
||||||
size: 3
|
size: 3
|
||||||
}
|
}
|
||||||
}"></div>
|
}"></div>
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<div>
|
<div>
|
||||||
<input type="number" min="10" max="50" step="1" class="span1" data-bind="textInput: messagesPerPage">
|
<input type="number" min="10" max="50" step="1" class="span1" data-bind="textInput: messagesPerPage">
|
||||||
|
|
||||||
<span data-bind="saveTrigger: mppTrigger"></span>
|
<span data-bind="saveTrigger: messagesPerPageTrigger"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
<div>
|
<div>
|
||||||
<input type="number" min="0" step="1" class="span1" data-bind="textInput: messageReadDelay">
|
<input type="number" min="0" step="1" class="span1" data-bind="textInput: messageReadDelay">
|
||||||
|
|
||||||
<span data-i18n="SETTINGS_GENERAL/SECONDS"></label>
|
<span data-i18n="SETTINGS_GENERAL/SECONDS"></span>
|
||||||
<span data-bind="saveTrigger: messageReadDelayTrigger"></span>
|
<span data-bind="saveTrigger: messageReadDelayTrigger"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue