mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Correct "Options change have been saved." (#2436)
This commit is contained in:
parent
97f7fe7b18
commit
4ceba8cc6e
@ -50,21 +50,21 @@ export default class BackupOptions {
|
|||||||
|
|
||||||
this.$dailyBackupEnabled.on('change', () => {
|
this.$dailyBackupEnabled.on('change', () => {
|
||||||
const opts = { 'dailyBackupEnabled': this.$dailyBackupEnabled.is(":checked") ? "true" : "false" };
|
const opts = { 'dailyBackupEnabled': this.$dailyBackupEnabled.is(":checked") ? "true" : "false" };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$weeklyBackupEnabled.on('change', () => {
|
this.$weeklyBackupEnabled.on('change', () => {
|
||||||
const opts = { 'weeklyBackupEnabled': this.$weeklyBackupEnabled.is(":checked") ? "true" : "false" };
|
const opts = { 'weeklyBackupEnabled': this.$weeklyBackupEnabled.is(":checked") ? "true" : "false" };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$monthlyBackupEnabled.on('change', () => {
|
this.$monthlyBackupEnabled.on('change', () => {
|
||||||
const opts = { 'monthlyBackupEnabled': this.$monthlyBackupEnabled.is(":checked") ? "true" : "false" };
|
const opts = { 'monthlyBackupEnabled': this.$monthlyBackupEnabled.is(":checked") ? "true" : "false" };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
@ -121,14 +121,14 @@ export default class ProtectedSessionOptions {
|
|||||||
|
|
||||||
this.$spellCheckEnabled.on('change', () => {
|
this.$spellCheckEnabled.on('change', () => {
|
||||||
const opts = { 'spellCheckEnabled': this.$spellCheckEnabled.is(":checked") ? "true" : "false" };
|
const opts = { 'spellCheckEnabled': this.$spellCheckEnabled.is(":checked") ? "true" : "false" };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$spellCheckLanguageCode.on('change', () => {
|
this.$spellCheckLanguageCode.on('change', () => {
|
||||||
const opts = { 'spellCheckLanguageCode': this.$spellCheckLanguageCode.val() };
|
const opts = { 'spellCheckLanguageCode': this.$spellCheckLanguageCode.val() };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -147,7 +147,7 @@ export default class ProtectedSessionOptions {
|
|||||||
const eraseEntitiesAfterTimeInSeconds = this.$eraseEntitiesAfterTimeInSeconds.val();
|
const eraseEntitiesAfterTimeInSeconds = this.$eraseEntitiesAfterTimeInSeconds.val();
|
||||||
|
|
||||||
server.put('options', { 'eraseEntitiesAfterTimeInSeconds': eraseEntitiesAfterTimeInSeconds }).then(() => {
|
server.put('options', { 'eraseEntitiesAfterTimeInSeconds': eraseEntitiesAfterTimeInSeconds }).then(() => {
|
||||||
toastService.showMessage("Options change have been saved.");
|
toastService.showMessage("Options changed have been saved.");
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -166,7 +166,7 @@ export default class ProtectedSessionOptions {
|
|||||||
const protectedSessionTimeout = this.$protectedSessionTimeout.val();
|
const protectedSessionTimeout = this.$protectedSessionTimeout.val();
|
||||||
|
|
||||||
server.put('options', { 'protectedSessionTimeout': protectedSessionTimeout }).then(() => {
|
server.put('options', { 'protectedSessionTimeout': protectedSessionTimeout }).then(() => {
|
||||||
toastService.showMessage("Options change have been saved.");
|
toastService.showMessage("Options changed have been saved.");
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -176,7 +176,7 @@ export default class ProtectedSessionOptions {
|
|||||||
|
|
||||||
this.$noteRevisionsTimeInterval.on('change', () => {
|
this.$noteRevisionsTimeInterval.on('change', () => {
|
||||||
const opts = { 'noteRevisionSnapshotTimeInterval': this.$noteRevisionsTimeInterval.val() };
|
const opts = { 'noteRevisionSnapshotTimeInterval': this.$noteRevisionsTimeInterval.val() };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -186,14 +186,14 @@ export default class ProtectedSessionOptions {
|
|||||||
|
|
||||||
this.$imageMaxWidthHeight.on('change', () => {
|
this.$imageMaxWidthHeight.on('change', () => {
|
||||||
const opts = { 'imageMaxWidthHeight': this.$imageMaxWidthHeight.val() };
|
const opts = { 'imageMaxWidthHeight': this.$imageMaxWidthHeight.val() };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$imageJpegQuality.on('change', () => {
|
this.$imageJpegQuality.on('change', () => {
|
||||||
const opts = { 'imageJpegQuality': this.$imageJpegQuality.val() };
|
const opts = { 'imageJpegQuality': this.$imageJpegQuality.val() };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -202,7 +202,7 @@ export default class ProtectedSessionOptions {
|
|||||||
|
|
||||||
this.$autoReadonlySizeText.on('change', () => {
|
this.$autoReadonlySizeText.on('change', () => {
|
||||||
const opts = { 'autoReadonlySizeText': this.$autoReadonlySizeText.val() };
|
const opts = { 'autoReadonlySizeText': this.$autoReadonlySizeText.val() };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -211,7 +211,7 @@ export default class ProtectedSessionOptions {
|
|||||||
|
|
||||||
this.$autoReadonlySizeCode.on('change', () => {
|
this.$autoReadonlySizeCode.on('change', () => {
|
||||||
const opts = { 'autoReadonlySizeCode': this.$autoReadonlySizeText.val() };
|
const opts = { 'autoReadonlySizeCode': this.$autoReadonlySizeText.val() };
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -231,7 +231,7 @@ export default class ProtectedSessionOptions {
|
|||||||
const isChecked = this.$enableImageCompression.prop("checked");
|
const isChecked = this.$enableImageCompression.prop("checked");
|
||||||
const opts = { 'compressImages': isChecked ? 'true' : 'false' };
|
const opts = { 'compressImages': isChecked ? 'true' : 'false' };
|
||||||
|
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
this.setImageCompression(isChecked);
|
this.setImageCompression(isChecked);
|
||||||
})
|
})
|
||||||
|
@ -74,7 +74,7 @@ export default class SyncOptions {
|
|||||||
'syncProxy': this.$syncProxy.val()
|
'syncProxy': this.$syncProxy.val()
|
||||||
};
|
};
|
||||||
|
|
||||||
server.put('options', opts).then(() => toastService.showMessage("Options change have been saved."));
|
server.put('options', opts).then(() => toastService.showMessage("Options changed have been saved."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user