mirror of
https://github.com/zadam/trilium.git
synced 2024-11-14 03:40:27 +08:00
22 lines
No EOL
521 B
JavaScript
22 lines
No EOL
521 B
JavaScript
"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.");
|
|
} |