mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 15:25:51 +01:00
refactoring utils into module
This commit is contained in:
@@ -4,14 +4,14 @@ async function syncNow() {
|
||||
const result = await server.post('sync/now');
|
||||
|
||||
if (result.success) {
|
||||
showMessage("Sync finished successfully.");
|
||||
utils.showMessage("Sync finished successfully.");
|
||||
}
|
||||
else {
|
||||
if (result.message.length > 50) {
|
||||
result.message = result.message.substr(0, 50);
|
||||
}
|
||||
|
||||
showError("Sync failed: " + result.message);
|
||||
utils.showError("Sync failed: " + result.message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,5 +20,5 @@ $("#sync-now-button").click(syncNow);
|
||||
async function forceNoteSync(noteId) {
|
||||
const result = await server.post('sync/force-note-sync/' + noteId);
|
||||
|
||||
showMessage("Note added to sync queue.");
|
||||
utils.showMessage("Note added to sync queue.");
|
||||
}
|
||||
Reference in New Issue
Block a user