Show sync counts only when non-zero
Hide upload/download counts in the drawer footer when both are zero; show each arrow count individually only if its value is greater than zero. This avoids displaying redundant “↑0 ↓0” and ensures a cleaner, more informative sync status line when only one direction has activity.
This commit is contained in:
parent
0ae0705331
commit
44ac2bc5b3
|
|
@ -335,7 +335,7 @@
|
|||
class="inline-block h-2 w-2 rounded-full {app.syncing ? 'animate-pulse bg-primary' : app.syncStatus === 'synced' || app.syncStatus === 'idle' ? 'bg-green-500' : app.syncStatus === 'error' ? 'bg-red-500' : 'bg-gray-400'}"
|
||||
></span>
|
||||
<span class="flex-1 text-xs opacity-60">
|
||||
{app.syncing ? "Syncing..." : app.syncStatus === "synced" || app.syncStatus === "idle" ? "Synced" : app.syncStatus === "error" ? "Sync error" : "Offline"}{#if !app.syncing && app.lastSyncResult} ↑{app.lastSyncResult.uploaded} ↓{app.lastSyncResult.downloaded}{/if}
|
||||
{app.syncing ? "Syncing..." : app.syncStatus === "synced" || app.syncStatus === "idle" ? "Synced" : app.syncStatus === "error" ? "Sync error" : "Offline"}{#if !app.syncing && app.lastSyncResult && (app.lastSyncResult.uploaded > 0 || app.lastSyncResult.downloaded > 0)} {#if app.lastSyncResult.uploaded > 0}↑{app.lastSyncResult.uploaded}{/if}{#if app.lastSyncResult.uploaded > 0 && app.lastSyncResult.downloaded > 0} {/if}{#if app.lastSyncResult.downloaded > 0}↓{app.lastSyncResult.downloaded}{/if}{/if}
|
||||
</span>
|
||||
<!-- Manual sync button -->
|
||||
<button
|
||||
|
|
|
|||
Loading…
Reference in a new issue