mirror of
https://github.com/zadam/trilium.git
synced 2026-01-06 15:32:24 +01:00
cosmetic cleanup, mostly in encryption
This commit is contained in:
@@ -16,7 +16,7 @@ const eventLog = (function() {
|
||||
const result = await $.ajax({
|
||||
url: baseApiUrl + 'event-log',
|
||||
type: 'GET',
|
||||
error: () => error("Error getting event log.")
|
||||
error: () => showError("Error getting event log.")
|
||||
});
|
||||
|
||||
listEl.html('');
|
||||
|
||||
@@ -27,7 +27,7 @@ const noteHistory = (function() {
|
||||
historyItems = await $.ajax({
|
||||
url: baseApiUrl + 'notes-history/' + noteId,
|
||||
type: 'GET',
|
||||
error: () => error("Error getting note history.")
|
||||
error: () => showError("Error getting note history.")
|
||||
});
|
||||
|
||||
for (const item of historyItems) {
|
||||
|
||||
@@ -15,7 +15,7 @@ const recentChanges = (function() {
|
||||
const result = await $.ajax({
|
||||
url: baseApiUrl + 'recent-changes/',
|
||||
type: 'GET',
|
||||
error: () => error("Error getting recent changes.")
|
||||
error: () => showError("Error getting recent changes.")
|
||||
});
|
||||
|
||||
dialogEl.html('');
|
||||
|
||||
@@ -11,7 +11,7 @@ const recentNotes = (function() {
|
||||
$.ajax({
|
||||
url: baseApiUrl + 'recent-notes',
|
||||
type: 'GET',
|
||||
error: () => error("Error getting recent notes.")
|
||||
error: () => showError("Error getting recent notes.")
|
||||
}).then(result => {
|
||||
list = result.map(r => r.note_id);
|
||||
});
|
||||
@@ -23,7 +23,7 @@ const recentNotes = (function() {
|
||||
$.ajax({
|
||||
url: baseApiUrl + 'recent-notes/' + noteTreeId,
|
||||
type: 'PUT',
|
||||
error: () => error("Error setting recent notes.")
|
||||
error: () => showError("Error setting recent notes.")
|
||||
}).then(result => {
|
||||
list = result.map(r => r.note_id);
|
||||
});
|
||||
@@ -35,7 +35,7 @@ const recentNotes = (function() {
|
||||
$.ajax({
|
||||
url: baseApiUrl + 'recent-notes/' + noteIdToRemove,
|
||||
type: 'DELETE',
|
||||
error: () => error("Error removing note from recent notes.")
|
||||
error: () => showError("Error removing note from recent notes.")
|
||||
}).then(result => {
|
||||
list = result.map(r => r.note_id);
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ const settings = (function() {
|
||||
const settings = await $.ajax({
|
||||
url: baseApiUrl + 'settings',
|
||||
type: 'GET',
|
||||
error: () => error("Error getting settings.")
|
||||
error: () => showError("Error getting settings.")
|
||||
});
|
||||
|
||||
dialogEl.dialog({
|
||||
@@ -41,7 +41,7 @@ const settings = (function() {
|
||||
}),
|
||||
contentType: "application/json",
|
||||
success: () => {
|
||||
message("Settings change have been saved.");
|
||||
showMessage("Settings change have been saved.");
|
||||
},
|
||||
error: () => alert("Error occurred during saving settings change.")
|
||||
});
|
||||
@@ -95,10 +95,10 @@ settings.addModule((function() {
|
||||
encryption.setEncryptedDataKey(result.new_encrypted_data_key);
|
||||
}
|
||||
else {
|
||||
error(result.message);
|
||||
showError(result.message);
|
||||
}
|
||||
},
|
||||
error: () => error("Error occurred during changing password.")
|
||||
error: () => showError("Error occurred during changing password.")
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user