mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 15:25:51 +01:00
moved all sources to src directory
This commit is contained in:
22
src/public/javascripts/sync.js
Normal file
22
src/public/javascripts/sync.js
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
async function syncNow() {
|
||||
const result = await server.post('sync/now');
|
||||
|
||||
if (result.success) {
|
||||
showMessage("Sync finished successfully.");
|
||||
}
|
||||
else {
|
||||
if (result.message.length > 50) {
|
||||
result.message = result.message.substr(0, 50);
|
||||
}
|
||||
|
||||
showError("Sync failed: " + result.message);
|
||||
}
|
||||
}
|
||||
|
||||
async function forceNoteSync(noteId) {
|
||||
const result = await server.post('sync/force-note-sync/' + noteId);
|
||||
|
||||
showMessage("Note added to sync queue.");
|
||||
}
|
||||
Reference in New Issue
Block a user