mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 07:15:51 +01:00
rename info service to toast service
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import server from './server.js';
|
||||
import infoService from "./info.js";
|
||||
import toastService from "./toast.js";
|
||||
|
||||
async function syncNow() {
|
||||
const result = await server.post('sync/now');
|
||||
|
||||
if (result.success) {
|
||||
infoService.showMessage("Sync finished successfully.");
|
||||
toastService.showMessage("Sync finished successfully.");
|
||||
}
|
||||
else {
|
||||
if (result.message.length > 50) {
|
||||
result.message = result.message.substr(0, 50);
|
||||
}
|
||||
|
||||
infoService.showError("Sync failed: " + result.message);
|
||||
toastService.showError("Sync failed: " + result.message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ $("#sync-now-button").click(syncNow);
|
||||
async function forceNoteSync(noteId) {
|
||||
await server.post('sync/force-note-sync/' + noteId);
|
||||
|
||||
infoService.showMessage("Note added to sync queue.");
|
||||
toastService.showMessage("Note added to sync queue.");
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user