mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
history snaphost time interval is now configurable in settings
This commit is contained in:
@@ -4,6 +4,7 @@ function displaySettings() {
|
||||
type: 'GET',
|
||||
success: function (result) {
|
||||
$("#encryptionTimeoutInSeconds").val(result['encryption_session_timeout']);
|
||||
$("#historySnapshotTimeIntervalInSeconds").val(result['history_snapshot_time_interval']);
|
||||
},
|
||||
error: () => alert("Error getting settings.")
|
||||
});
|
||||
@@ -78,5 +79,25 @@ $("#encryptionTimeoutForm").submit(() => {
|
||||
error: () => alert("Error occurred during changing encryption timeout.")
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#historySnapshotTimeIntervalForm").submit(() => {
|
||||
const historySnapshotTimeInterval = $("#historySnapshotTimeIntervalInSeconds").val();
|
||||
|
||||
$.ajax({
|
||||
url: baseUrl + 'settings',
|
||||
type: 'POST',
|
||||
data: JSON.stringify({
|
||||
name: 'history_snapshot_time_interval',
|
||||
value: historySnapshotTimeInterval
|
||||
}),
|
||||
contentType: "application/json",
|
||||
success: function () {
|
||||
alert("History snapshot time interval has been changed.");
|
||||
},
|
||||
error: () => alert("Error occurred during changing history snapshot time interval.")
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
Reference in New Issue
Block a user