mirror of
https://github.com/zadam/trilium.git
synced 2025-01-01 04:41:46 +08:00
report missing sync configuration when clicking on Test sync
This commit is contained in:
parent
9b425025c9
commit
3af27845b5
2 changed files with 7 additions and 2 deletions
|
@ -247,7 +247,7 @@ addTabHandler((function() {
|
|||
infoService.showMessage(result.message);
|
||||
}
|
||||
else {
|
||||
infoService.showError("Sync server handshake failed, error: " + result.error);
|
||||
infoService.showError("Sync server handshake failed, error: " + result.message);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -8,9 +8,14 @@ const sqlInit = require('../../services/sql_init');
|
|||
const optionService = require('../../services/options');
|
||||
const contentHashService = require('../../services/content_hash');
|
||||
const log = require('../../services/log');
|
||||
const syncOptions = require('../../services/sync_options');
|
||||
|
||||
async function testSync() {
|
||||
try {
|
||||
if (!await syncOptions.isSyncSetup()) {
|
||||
return { success: false, message: "Sync server host is not configured. Please configure sync first." };
|
||||
}
|
||||
|
||||
await syncService.login();
|
||||
|
||||
// login was successful so we'll kick off sync now
|
||||
|
@ -22,7 +27,7 @@ async function testSync() {
|
|||
catch (e) {
|
||||
return {
|
||||
success: false,
|
||||
error: e.message
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue