mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Better Remote.saveAdminConfig() and better idleTrigger for them
This commit is contained in:
parent
2588e5b328
commit
3b40f86c33
11 changed files with 76 additions and 81 deletions
|
|
@ -71,12 +71,12 @@ export class ContactsAdminSettings /*extends AbstractViewSettings*/ {
|
|||
|
||||
addSubscribablesTo(this, {
|
||||
enableContacts: value =>
|
||||
Remote.saveAdminConfig(null, {
|
||||
Remote.saveConfig({
|
||||
ContactsEnable: value ? 1 : 0
|
||||
}),
|
||||
|
||||
contactsSync: value =>
|
||||
Remote.saveAdminConfig(null, {
|
||||
Remote.saveConfig({
|
||||
ContactsSync: value ? 1 : 0
|
||||
}),
|
||||
|
||||
|
|
@ -84,25 +84,25 @@ export class ContactsAdminSettings /*extends AbstractViewSettings*/ {
|
|||
this.testContactsSuccess(false);
|
||||
this.testContactsError(false);
|
||||
this.testContactsErrorMessage('');
|
||||
Remote.saveAdminConfig(settingsSaveHelperSimpleFunction(this.contactsTypeTrigger, this), {
|
||||
Remote.saveConfig({
|
||||
ContactsPdoType: value.trim()
|
||||
})
|
||||
}, settingsSaveHelperSimpleFunction(this.contactsTypeTrigger, this))
|
||||
},
|
||||
|
||||
pdoDsn: value =>
|
||||
Remote.saveAdminConfig(settingsSaveHelperSimpleFunction(this.pdoDsnTrigger, this), {
|
||||
Remote.saveConfig({
|
||||
ContactsPdoDsn: value.trim()
|
||||
}),
|
||||
}, settingsSaveHelperSimpleFunction(this.pdoDsnTrigger, this)),
|
||||
|
||||
pdoUser: value =>
|
||||
Remote.saveAdminConfig(settingsSaveHelperSimpleFunction(this.pdoUserTrigger, this), {
|
||||
Remote.saveConfig({
|
||||
ContactsPdoUser: value.trim()
|
||||
}),
|
||||
}, settingsSaveHelperSimpleFunction(this.pdoUserTrigger, this)),
|
||||
|
||||
pdoPassword: value =>
|
||||
Remote.saveAdminConfig(settingsSaveHelperSimpleFunction(this.pdoPasswordTrigger, this), {
|
||||
Remote.saveConfig({
|
||||
ContactsPdoPassword: value.trim()
|
||||
})
|
||||
}, settingsSaveHelperSimpleFunction(this.pdoPasswordTrigger, this))
|
||||
})
|
||||
|
||||
decorateKoCommands(this, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue