mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-23 04:35:02 +08:00
20 lines
713 B
JavaScript
20 lines
713 B
JavaScript
![]() |
import server from "../../services/server.js";
|
||
|
import infoService from "../../services/info.js";
|
||
|
|
||
|
export default class NoteRevisionsOptions {
|
||
|
constructor() {
|
||
|
this.$form = $("#note-revision-snapshot-time-interval-form");
|
||
|
this.$timeInterval = $("#note-revision-snapshot-time-interval-in-seconds");
|
||
|
|
||
|
this.$form.submit(() => {
|
||
|
const opts = { 'noteRevisionSnapshotTimeInterval': this.$timeInterval.val() };
|
||
|
server.put('options', opts).then(() => infoService.showMessage("Options change have been saved."));
|
||
|
|
||
|
return false;
|
||
|
});
|
||
|
}
|
||
|
|
||
|
optionsLoaded(options) {
|
||
|
this.$timeInterval.val(options['noteRevisionSnapshotTimeInterval']);
|
||
|
}
|
||
|
}
|