handleSelectInstance(instance.id)}
- onkeydown={e => e.key === 'Enter' && handleSelectInstance(instance.id)}
- role="button"
- tabindex="0"
- title={instance.torrent ? instance.torrent.name : `Instance ${instance.id}`}
- >
-
-
-
-
+
- {#if status === 'running'}
-
- {:else if status === 'idling'}
-
- {:else if status === 'paused'}
-
- {:else}
-
- {/if}
-
-
-
-
- {getInstanceLabel(instance)}
-
-
+
+
+ {#if status === 'running'}
+
+ {:else if status === 'idling'}
+
+ {:else if status === 'paused'}
+
+ {:else}
+
+ {/if}
+
-
- {#if !isCompact && instance.stats && instance.stats.ratio > 0}
- = 1
- ? 'bg-stat-upload/20 text-stat-upload'
- : 'bg-stat-ratio/20 text-stat-ratio'
- )}
- title="Current ratio"
- >
- {instance.stats.ratio.toFixed(2)}x
-
- {/if}
+
+
+ {getInstanceLabel(instance)}
+
+
-
- {#if !isCompact && instance.source !== 'watch_folder'}
-
- {:else if instance.source === 'watch_folder' && !isCompact}
-
-
-
-
+
+ {#if !isCompact && instance.stats && instance.stats.ratio > 0}
+ = 1
+ ? 'bg-stat-upload/20 text-stat-upload'
+ : 'bg-stat-ratio/20 text-stat-ratio'
+ )}
+ title="Current ratio"
+ >
+ {instance.stats.ratio.toFixed(2)}x
+ {/if}
+
+
+ {#if !isCompact && instance.source !== 'watch_folder'}
-
- {/if}
-
-
-
- {#if !isCompact && instance.stats && instance.isRunning}
-
-
- ↑ {formatBytesCompact(instance.stats.session_uploaded)}
-
-
- ↓ {formatBytesCompact(instance.stats.session_downloaded)}
-
- {#if instance.stats.current_upload_rate > 0}
-
- {instance.stats.current_upload_rate.toFixed(1)} KB/s
-
+ {:else if instance.source === 'watch_folder' && !isCompact}
+
+
+
+
+
+
+
{/if}
- {/if}
-
- {#if !isCompact && stopProgress && instance.isRunning}
-
-
-
= 100
- ? 'bg-stat-upload'
- : stopProgress.progress >= 75
- ? 'bg-stat-ratio'
- : 'bg-primary'
- )}
- style="width: {Math.min(100, stopProgress.progress)}%"
- >
+
+ {#if !isCompact && instance.stats && instance.isRunning}
+
+
+ ↑ {formatBytesCompact(instance.stats.session_uploaded)}
+
+
+ ↓ {formatBytesCompact(instance.stats.session_downloaded)}
+
+ {#if instance.stats.current_upload_rate > 0}
+
+ {instance.stats.current_upload_rate.toFixed(1)} KB/s
+
+ {/if}
-
- {stopProgress.progress.toFixed(0)}% to target
+ {/if}
+
+
+ {#if !isCompact && stopProgress && instance.isRunning}
+
+
+
= 100
+ ? 'bg-stat-upload'
+ : stopProgress.progress >= 75
+ ? 'bg-stat-ratio'
+ : 'bg-primary'
+ )}
+ style="width: {Math.min(100, stopProgress.progress)}%"
+ >
+
+
+ {stopProgress.progress.toFixed(0)}% to target
+
-
- {/if}
-
- {/each}
-
+ {#if isCompact}
+
+
+
+ ↑{formatRateCompact(gridStats().totalUploadRate)}
- {/if}
-
- {:else if !isWatchMode}
-
-
-
-
- Live Rates
- {#if gridStats().stateCounts['running'] > 0}
-
-
- {gridStats().stateCounts['running']} active
-
- {/if}
-
-
- ↑ {formatRate(gridStats().totalUploadRate)}
-
-
- ↓ {formatRate(gridStats().totalDownloadRate)}
+ ↓{formatRateCompact(gridStats().totalDownloadRate)}
+
+ {#if gridStats().total > 0}
+
-
+ {gridStats().total}
+
+ {/if}
-
-
- {#if gridStats().total > 0}
-
-
- Uploaded
- ↑ {formatBytes(gridStats().totalUploaded)}
-
-
-
Downloaded
-
↓ {formatBytes(gridStats().totalDownloaded)}
+
+
+
+ Live Rates
+ {#if gridStats().stateCounts['running'] > 0}
+
+
+ {gridStats().stateCounts['running']} active
+
+ {/if}
-
-
Ratio
-
= 1 ? 'text-stat-upload' : 'text-stat-ratio'
- )}
+
+ ↑ {formatRate(gridStats().totalUploadRate)}
- {gridStats().ratio.toFixed(2)}x
-
-
- Total Size
- {formatBytes(gridStats().totalSize)}
+ ↓ {formatRate(gridStats().totalDownloadRate)}
-
- Instances
- {gridStats().total}
-
- {#if gridStats().downloadingCount > 0}
+
+
+
+ {#if gridStats().total > 0}
+
- Downloading
- {gridStats().downloadingCount}Uploaded
+ ↑ {formatBytes(gridStats().totalUploaded)}
- {/if}
-
- {/if}
-
-
- {#if gridStats().total > 0}
-
-
States
- {#each stateConfig as sc (sc.key)}
- {@const count = gridStats().stateCounts[sc.key] || 0}
- {#if count > 0}
- {@const StateIcon = sc.icon}
-
+ Downloaded
+ ↓ {formatBytes(gridStats().totalDownloaded)}
-
-
-
- {sc.label}
- {count}
+
+
+ Ratio
+ = 1 ? 'text-stat-upload' : 'text-stat-ratio'
+ )}
+ >
+ {gridStats().ratio.toFixed(2)}x
+
+
+
+ Total Size
+ {formatBytes(gridStats().totalSize)}
+
+
+ Instances
+ {gridStats().total}
+
+ {#if gridStats().downloadingCount > 0}
+
+ Downloading
+ {gridStats().downloadingCount}
{/if}
- {/each}
-
- {/if}
-
-
- {#if selectionStats()}
-
-
- {selectionStats().count} selected
-
-
- Size
- {formatBytes(selectionStats().size)}
-
-
Uploaded
-
↑ {formatBytes(selectionStats().uploaded)}
+ {#if gridStats().total > 0}
+
+
States
+ {#each stateConfig as sc (sc.key)}
+ {@const count = gridStats().stateCounts[sc.key] || 0}
+ {#if count > 0}
+ {@const StateIcon = sc.icon}
+
+
+
+
+ {sc.label}
+ {count}
+
+ {/if}
+ {/each}
-
-
Downloaded
-
↓ {formatBytes(selectionStats().downloaded)}
+ {/if}
+
+
+ {#if selectionStats()}
+
+
+ {selectionStats().count} selected
+
+
+ Size
+ {formatBytes(selectionStats().size)}
+
+
+ Uploaded
+ ↑ {formatBytes(selectionStats().uploaded)}
+
+
+ Downloaded
+ ↓ {formatBytes(selectionStats().downloaded)}
+
-
- {/if}
-
- {/if}
-
- {/if}
+ {/if}
+
+ {/if}
+
+ {/if}
-
-
+
+ {#if !isOpen}
+
+
+ {/if}