From 917b259e922e574b876a8778d35ebccb04222e84 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 13 Apr 2021 21:54:07 +0200 Subject: [PATCH] add new sync status "unknown" to differentiate from "can't connect", #1844 --- src/public/app/widgets/sync_status.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/public/app/widgets/sync_status.js b/src/public/app/widgets/sync_status.js index a4633b683..0aaa28bc5 100644 --- a/src/public/app/widgets/sync_status.js +++ b/src/public/app/widgets/sync_status.js @@ -46,6 +46,11 @@ const TPL = `
+ + + @@ -83,8 +88,7 @@ export default class SyncStatusWidget extends BasicWidget { ws.subscribeToMessages(message => this.processMessage(message)); - // extra window doesn't know the status of the sync so it's better to hide it - this.syncState = appContext.isMainWindow ? 'disconnected' : 'unknown'; + this.syncState = 'unknown'; this.allChangesPushed = false; } @@ -144,9 +148,9 @@ export default class SyncStatusWidget extends BasicWidget { this.allChangesPushed = lastSyncedPush === ws.getMaxKnownEntityChangeSyncId(); } - if (this.syncState === 'in-progress') { - this.showIcon('in-progress'); - } else if (this.syncState !== 'unknown') { + if (this.syncState === 'unknown') { + this.showIcon('unknown'); + } else { this.showIcon(this.syncState + '-' + (this.allChangesPushed ? 'no-changes' : 'with-changes')); } }