mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	fix sync status in-progress
This commit is contained in:
		
							parent
							
								
									cecce1df20
								
							
						
					
					
						commit
						4ff40ba14f
					
				| @ -3,7 +3,6 @@ import toastService from "../services/toast.js"; | |||||||
| import ws from "../services/ws.js"; | import ws from "../services/ws.js"; | ||||||
| import options from "../services/options.js"; | import options from "../services/options.js"; | ||||||
| import syncService from "../services/sync.js"; | import syncService from "../services/sync.js"; | ||||||
| import appContext from "../services/app_context.js"; |  | ||||||
| 
 | 
 | ||||||
| const TPL = ` | const TPL = ` | ||||||
| <div class="sync-status-widget"> | <div class="sync-status-widget"> | ||||||
| @ -108,7 +107,7 @@ export default class SyncStatusWidget extends BasicWidget { | |||||||
| 
 | 
 | ||||||
|     showIcon(className) { |     showIcon(className) { | ||||||
|         if (!options.get('syncServerHost')) { |         if (!options.get('syncServerHost')) { | ||||||
|             this.$widget.hide(); |             this.toggleInt(false); | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| @ -148,8 +147,8 @@ export default class SyncStatusWidget extends BasicWidget { | |||||||
|             this.allChangesPushed = lastSyncedPush === ws.getMaxKnownEntityChangeSyncId(); |             this.allChangesPushed = lastSyncedPush === ws.getMaxKnownEntityChangeSyncId(); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (this.syncState === 'unknown') { |         if (['unknown', 'in-progress'].includes(this.syncState)) { | ||||||
|             this.showIcon('unknown'); |             this.showIcon(this.syncState); | ||||||
|         } else { |         } else { | ||||||
|             this.showIcon(this.syncState + '-' + (this.allChangesPushed ? 'no-changes' : 'with-changes')); |             this.showIcon(this.syncState + '-' + (this.allChangesPushed ? 'no-changes' : 'with-changes')); | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam