Show relevant error msg in desktop app, e.g when can't connect to server

This commit is contained in:
Debanjum Singh Solanky
2024-01-09 22:32:06 +05:30
parent 43423432ce
commit af9ceb00a0
2 changed files with 11 additions and 8 deletions

View File

@@ -158,7 +158,7 @@ window.updateStateAPI.onUpdateState((event, state) => {
nextSyncTime = new Date();
nextSyncTime.setMinutes(Math.ceil((nextSyncTime.getMinutes() + 1) / 10) * 10);
if (state.completed == false) {
syncStatusElement.innerHTML = `Sync was unsuccessful at ${currentTime.toLocaleTimeString()}. Contact team@khoj.dev to report this issue.`;
if (state.error) syncStatusElement.innerHTML = state.error;
return;
}
const options = { hour: '2-digit', minute: '2-digit' };