From 03b0194006ba6ef70017ab4cf937e4d685ce700a Mon Sep 17 00:00:00 2001 From: theguy000 Date: Fri, 13 Mar 2026 07:20:21 +0600 Subject: [PATCH 1/9] feat(ui): implement bulk instance editing capabilities - Add createBulkInstance and removeTargetInstance to instance store. - Update grid and toolbar components to handle multi-selection bulk edit mode. - Render multiple torrent items gracefully in TorrentSelector with remove functionality. --- .gitignore | 5 + ui/src/App.svelte | 10 +- .../components/common/TorrentSelector.svelte | 85 +++++++++--- ui/src/components/grid/GridToolbar.svelte | 2 + ui/src/components/grid/GridView.svelte | 6 + ui/src/lib/instanceStore.js | 131 ++++++++++++++++++ 6 files changed, 211 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 9426e0c..f1f53f1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,11 @@ gen/ # Logs *.log +# App State +desktop-state.json +desktop-config.json +rustatio.toml + # OS .DS_Store Thumbs.db diff --git a/ui/src/App.svelte b/ui/src/App.svelte index 1e1ccd5..cc21334 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -1478,11 +1478,11 @@ statusIcon={$activeInstance?.statusIcon || null} isRunning={$activeInstance?.isRunning || false} isPaused={$activeInstance?.isPaused || false} - {startFaking} - {stopFaking} - {pauseFaking} - {resumeFaking} - {manualUpdate} + startFaking={$activeInstance?.torrent?.isBulk ? null : startFaking} + stopFaking={$activeInstance?.torrent?.isBulk ? null : stopFaking} + pauseFaking={$activeInstance?.torrent?.isBulk ? null : pauseFaking} + resumeFaking={$activeInstance?.torrent?.isBulk ? null : resumeFaking} + manualUpdate={$activeInstance?.torrent?.isBulk ? null : manualUpdate} /> {/if} diff --git a/ui/src/components/common/TorrentSelector.svelte b/ui/src/components/common/TorrentSelector.svelte index 9d620c9..c1acce5 100644 --- a/ui/src/components/common/TorrentSelector.svelte +++ b/ui/src/components/common/TorrentSelector.svelte @@ -11,7 +11,9 @@ ChevronDown, ChevronRight, Upload, + X, } from '@lucide/svelte'; + import { instanceActions } from '$lib/instanceStore.js'; let { torrent, selectTorrent, formatBytes } = $props(); @@ -94,7 +96,7 @@

- Torrent File + {torrent?.isBulk ? 'Torrent Files' : 'Torrent File'}

{torrent.name} -
- {formatBytes(torrent.total_size)} - - - {torrent.file_count || torrent.files?.length || 1} file{(torrent.file_count || - torrent.files?.length || - 1) > 1 - ? 's' - : ''} - - - {trackers.length} tracker{trackers.length !== 1 ? 's' : ''} -
+ {#if !torrent.isBulk} +
+ {formatBytes(torrent.total_size)} + + + {torrent.file_count || torrent.files?.length || 1} file{(torrent.file_count || + torrent.files?.length || + 1) > 1 + ? 's' + : ''} + + + {trackers.length} tracker{trackers.length !== 1 ? 's' : ''} +
+ {/if} - + {#if !torrent.isBulk} + + {/if} - + {#if !torrent.isBulk} +
Size
@@ -165,6 +172,7 @@
+ {/if} + + {/each} + + + {:else} + +
Info Hash @@ -255,6 +293,7 @@ {/if}
{/if} + {/if}
{/if} diff --git a/ui/src/components/grid/GridToolbar.svelte b/ui/src/components/grid/GridToolbar.svelte index 0dfdaad..580a3e7 100644 --- a/ui/src/components/grid/GridToolbar.svelte +++ b/ui/src/components/grid/GridToolbar.svelte @@ -12,6 +12,8 @@ gridInstances, filteredGridInstances, } from '$lib/gridStore.js'; + import { instanceActions } from '$lib/instanceStore.js'; + import { viewMode } from '$lib/gridStore.js'; import { Play, Square, Pause, Trash2, Upload, Search, ChevronDown } from '@lucide/svelte'; let { onImport = () => {} } = $props(); diff --git a/ui/src/components/grid/GridView.svelte b/ui/src/components/grid/GridView.svelte index 6f22e63..7d46779 100644 --- a/ui/src/components/grid/GridView.svelte +++ b/ui/src/components/grid/GridView.svelte @@ -42,6 +42,12 @@ await gridActions.resumeInstance(instance.id); break; case 'edit': { + const selected = gridActions.getSelectedIds(); + if (selected.length > 1 && selected.includes(instance.id)) { + instanceActions.createBulkInstance(selected); + viewMode.set('standard'); + break; + } const ensuredId = await instanceActions.ensureInstance(instance.id, instance); if (ensuredId) { instanceActions.selectInstance(ensuredId); diff --git a/ui/src/lib/instanceStore.js b/ui/src/lib/instanceStore.js index 92c5af1..20a8fbb 100644 --- a/ui/src/lib/instanceStore.js +++ b/ui/src/lib/instanceStore.js @@ -673,6 +673,41 @@ export const instanceActions = { // Update a specific instance updateInstance: (id, updates) => { + // Intercept bulk-edit updates + if (id === 'bulk-edit') { + const currentInstances = get(instances); + const bulkInst = currentInstances.find(i => i.id === 'bulk-edit'); + if (!bulkInst) return; + + // Ensure we don't overwrite bulk-edit internal fields (like targetIds or torrent) + const safeUpdates = { ...updates }; + delete safeUpdates.id; + delete safeUpdates.targetIds; + delete safeUpdates.torrent; + delete safeUpdates.torrentPath; + delete safeUpdates.stats; + + instances.update(insts => { + return insts.map(inst => { + if (inst.id === 'bulk-edit') { + return { ...inst, ...safeUpdates }; + } + if (bulkInst.targetIds && bulkInst.targetIds.includes(inst.id)) { + return { ...inst, ...safeUpdates }; + } + return inst; + }); + }); + + if (id === get(activeInstanceId)) { + updateActiveInstanceStore(); + } + + // Save session since we probably modified real instances + saveSession(get(instances).filter(i => i.id !== 'bulk-edit'), get(activeInstanceId)); + return; + } + // Don't update if no changes const currentInstances = get(instances); const currentInst = currentInstances.find(i => i.id === id); @@ -723,6 +758,102 @@ export const instanceActions = { return get(activeInstance); }, + // Create or update a temporary bulk edit instance + createBulkInstance: (targetIds) => { + if (!targetIds || targetIds.length === 0) return; + + const currentInstances = get(instances); + + // Filter out 'bulk-edit' just in case it's in the list + const validTargetIds = targetIds.filter(id => id !== 'bulk-edit'); + if (validTargetIds.length === 0) return; + + const firstTarget = currentInstances.find(i => i.id === validTargetIds[0]); + if (!firstTarget) return; + + // Create a new instance with 'bulk-edit' ID + // Clone properties from the first selected instance to use as defaults + const bulkInstance = createDefaultInstance('bulk-edit', firstTarget); + + // Overwrite fields specific to bulk edit + bulkInstance.targetIds = validTargetIds; + bulkInstance.torrent = { + name: `Multiple Torrents (${validTargetIds.length})`, + isBulk: true, + bulkIds: validTargetIds, + // Pass along the names for the UI to display + bulkNames: validTargetIds.map(id => { + const i = currentInstances.find(inst => inst.id === id); + return i ? (i.name || i.torrent?.name || i.torrentPath || 'Unknown Torrent') : 'Unknown Torrent'; + }) + }; + bulkInstance.torrentPath = 'Multiple Torrents'; + bulkInstance.statusMessage = 'Editing multiple instances'; + bulkInstance.statusType = 'idle'; + bulkInstance.isRunning = false; + bulkInstance.isPaused = false; + bulkInstance.stats = null; + + instances.update(insts => { + // Remove any existing bulk-edit instance + const filtered = insts.filter(inst => inst.id !== 'bulk-edit'); + return [...filtered, bulkInstance]; + }); + + // Switch view to it + activeInstanceId.set('bulk-edit'); + updateActiveInstanceStore(); + }, + + // Remove an instance from the current bulk edit selection + removeTargetInstance: (targetId) => { + const bulkId = get(activeInstanceId); + if (bulkId !== 'bulk-edit') return; // Not in bulk edit mode + + instances.update(insts => { + const bulkInst = insts.find(i => i.id === 'bulk-edit'); + if (!bulkInst || !bulkInst.targetIds) return insts; + + const updatedTargetIds = bulkInst.targetIds.filter(id => id !== targetId); + + // If less than 2 items left, bulk edit doesn't make sense, just exit back to grid + if (updatedTargetIds.length < 2) { + // We defer this view change slightly to let the store update finish + import('./gridStore.js').then(module => { + module.viewMode.set('grid'); + module.gridActions.deselectAll(); + }); + + return insts.filter(i => i.id !== 'bulk-edit'); + } + + // Update the bulk-edit instance + return insts.map(inst => { + if (inst.id === 'bulk-edit') { + // Re-generate names list + const remainingNames = updatedTargetIds.map(id => { + const i = insts.find(inst => inst.id === id); + return i ? (i.name || i.torrent?.name || i.torrentPath || 'Unknown Torrent') : 'Unknown Torrent'; + }); + + return { + ...inst, + targetIds: updatedTargetIds, + torrent: { + ...inst.torrent, + name: `Multiple Torrents (${updatedTargetIds.length})`, + bulkIds: updatedTargetIds, + bulkNames: remainingNames + } + }; + } + return inst; + }); + }); + + updateActiveInstanceStore(); + }, + // Merge a new instance from server (used for real-time sync with watch folder) // Returns true if a new instance was added, false if it already existed mergeServerInstance: serverInst => { From c04de25db1f86542123348814cd8eb7dc76c1e8d Mon Sep 17 00:00:00 2001 From: theguy000 Date: Sat, 14 Mar 2026 07:08:07 +0600 Subject: [PATCH 2/9] style(ui): apply prettier formatting --- .../components/common/TorrentSelector.svelte | 172 +++++++++--------- ui/src/lib/instanceStore.js | 23 ++- 2 files changed, 103 insertions(+), 92 deletions(-) diff --git a/ui/src/components/common/TorrentSelector.svelte b/ui/src/components/common/TorrentSelector.svelte index c1acce5..0aadd9d 100644 --- a/ui/src/components/common/TorrentSelector.svelte +++ b/ui/src/components/common/TorrentSelector.svelte @@ -96,7 +96,8 @@

- {torrent?.isBulk ? 'Torrent Files' : 'Torrent File'} + + {torrent?.isBulk ? 'Torrent Files' : 'Torrent File'}

-
-
-
Size
-
{formatBytes(torrent.total_size)}
-
-
-
Pieces
-
{torrent.num_pieces?.toLocaleString() || 'N/A'}
-
-
-
Piece Size
-
- {torrent.piece_length ? formatBytes(torrent.piece_length) : 'N/A'} +
+
+
Size
+
{formatBytes(torrent.total_size)}
-
-
-
Files
-
- {torrent.file_count || torrent.files?.length || 1} +
+
Pieces
+
{torrent.num_pieces?.toLocaleString() || 'N/A'}
+
+
+
Piece Size
+
+ {torrent.piece_length ? formatBytes(torrent.piece_length) : 'N/A'} +
+
+
+
Files
+
+ {torrent.file_count || torrent.files?.length || 1} +
-
{/if} @@ -199,7 +200,9 @@
{#each torrent.bulkIds || [] as id, index (id)} {@const name = torrent.bulkNames?.[index] || 'Unknown Torrent'} -
+
{name} @@ -221,79 +224,80 @@ {:else} -
-
- Info Hash -
- - {torrent.info_hash - ? Array.from(torrent.info_hash) - .map(b => b.toString(16).padStart(2, '0')) - .join('') - : 'N/A'} - -
- - - {#if trackers.length > 0}
- Trackers ({trackers.length}) -
-
- {#each trackers as tracker, index (tracker)} -
- {#if index === 0} - - Primary - - {:else} - #{index + 1} - {/if} - - {tracker} - -
- {/each} + Info Hash
+ + {torrent.info_hash + ? Array.from(torrent.info_hash) + .map(b => b.toString(16).padStart(2, '0')) + .join('') + : 'N/A'} +
- {/if} - - {#if torrent.files && torrent.files.length > 0} -
-
- Files ({torrent.files.length}) -
- {#if torrent.files.length <= 10} -
- {#each torrent.files as file (file.path)} -
- - {file.path?.join('/') || 'Unknown'} - - - {formatBytes(file.length)} - + + {#if trackers.length > 0} +
+
+ Trackers ({trackers.length}) +
+
+ {#each trackers as tracker, index (tracker)} +
+ {#if index === 0} + + Primary + + {:else} + #{index + 1} + {/if} + + {tracker} +
{/each}
- {:else} -
- {torrent.files.length} files (too many to display) +
+ {/if} + + + {#if torrent.files && torrent.files.length > 0} +
+
+ Files ({torrent.files.length})
- {/if} -
+ {#if torrent.files.length <= 10} +
+ {#each torrent.files as file (file.path)} +
+ + {file.path?.join('/') || 'Unknown'} + + + {formatBytes(file.length)} + +
+ {/each} +
+ {:else} +
+ {torrent.files.length} files (too many to display) +
+ {/if} +
+ {/if} {/if} - {/if} +
{/if}
diff --git a/ui/src/lib/instanceStore.js b/ui/src/lib/instanceStore.js index 20a8fbb..29a13c1 100644 --- a/ui/src/lib/instanceStore.js +++ b/ui/src/lib/instanceStore.js @@ -704,7 +704,10 @@ export const instanceActions = { } // Save session since we probably modified real instances - saveSession(get(instances).filter(i => i.id !== 'bulk-edit'), get(activeInstanceId)); + saveSession( + get(instances).filter(i => i.id !== 'bulk-edit'), + get(activeInstanceId) + ); return; } @@ -759,7 +762,7 @@ export const instanceActions = { }, // Create or update a temporary bulk edit instance - createBulkInstance: (targetIds) => { + createBulkInstance: targetIds => { if (!targetIds || targetIds.length === 0) return; const currentInstances = get(instances); @@ -784,8 +787,10 @@ export const instanceActions = { // Pass along the names for the UI to display bulkNames: validTargetIds.map(id => { const i = currentInstances.find(inst => inst.id === id); - return i ? (i.name || i.torrent?.name || i.torrentPath || 'Unknown Torrent') : 'Unknown Torrent'; - }) + return i + ? i.name || i.torrent?.name || i.torrentPath || 'Unknown Torrent' + : 'Unknown Torrent'; + }), }; bulkInstance.torrentPath = 'Multiple Torrents'; bulkInstance.statusMessage = 'Editing multiple instances'; @@ -806,7 +811,7 @@ export const instanceActions = { }, // Remove an instance from the current bulk edit selection - removeTargetInstance: (targetId) => { + removeTargetInstance: targetId => { const bulkId = get(activeInstanceId); if (bulkId !== 'bulk-edit') return; // Not in bulk edit mode @@ -833,7 +838,9 @@ export const instanceActions = { // Re-generate names list const remainingNames = updatedTargetIds.map(id => { const i = insts.find(inst => inst.id === id); - return i ? (i.name || i.torrent?.name || i.torrentPath || 'Unknown Torrent') : 'Unknown Torrent'; + return i + ? i.name || i.torrent?.name || i.torrentPath || 'Unknown Torrent' + : 'Unknown Torrent'; }); return { @@ -843,8 +850,8 @@ export const instanceActions = { ...inst.torrent, name: `Multiple Torrents (${updatedTargetIds.length})`, bulkIds: updatedTargetIds, - bulkNames: remainingNames - } + bulkNames: remainingNames, + }, }; } return inst; From bb91443f979e1285ec082b41b7bd64de37452975 Mon Sep 17 00:00:00 2001 From: theguy000 Date: Sat, 14 Mar 2026 18:36:38 +0600 Subject: [PATCH 3/9] removed unused imports --- ui/src/components/grid/GridToolbar.svelte | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/src/components/grid/GridToolbar.svelte b/ui/src/components/grid/GridToolbar.svelte index 580a3e7..0dfdaad 100644 --- a/ui/src/components/grid/GridToolbar.svelte +++ b/ui/src/components/grid/GridToolbar.svelte @@ -12,8 +12,6 @@ gridInstances, filteredGridInstances, } from '$lib/gridStore.js'; - import { instanceActions } from '$lib/instanceStore.js'; - import { viewMode } from '$lib/gridStore.js'; import { Play, Square, Pause, Trash2, Upload, Search, ChevronDown } from '@lucide/svelte'; let { onImport = () => {} } = $props(); From 79532f404551ec6e52269e765948b0947768565e Mon Sep 17 00:00:00 2001 From: theguy000 Date: Sat, 14 Mar 2026 18:58:39 +0600 Subject: [PATCH 4/9] refactor: extract _getBulkInstanceNames helper to deduplicate bulk name logic --- ui/src/lib/instanceStore.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/ui/src/lib/instanceStore.js b/ui/src/lib/instanceStore.js index 29a13c1..d4d5243 100644 --- a/ui/src/lib/instanceStore.js +++ b/ui/src/lib/instanceStore.js @@ -8,6 +8,14 @@ const isTauri = typeof window !== 'undefined' && '__TAURI_INTERNALS__' in window // Helper to convert bytes to MB (rounded to integer) const bytesToMB = bytes => Math.round((bytes || 0) / (1024 * 1024)); +// Helper to resolve display names for a list of instance IDs +function _getBulkInstanceNames(ids, instances) { + return ids.map(id => { + const i = instances.find(inst => inst.id === id); + return i ? i.name || i.torrent?.name || i.torrentPath || 'Unknown Torrent' : 'Unknown Torrent'; + }); +} + // Create default instance state function createDefaultInstance(id, defaults = {}) { return { @@ -785,12 +793,7 @@ export const instanceActions = { isBulk: true, bulkIds: validTargetIds, // Pass along the names for the UI to display - bulkNames: validTargetIds.map(id => { - const i = currentInstances.find(inst => inst.id === id); - return i - ? i.name || i.torrent?.name || i.torrentPath || 'Unknown Torrent' - : 'Unknown Torrent'; - }), + bulkNames: _getBulkInstanceNames(validTargetIds, currentInstances), }; bulkInstance.torrentPath = 'Multiple Torrents'; bulkInstance.statusMessage = 'Editing multiple instances'; @@ -836,12 +839,7 @@ export const instanceActions = { return insts.map(inst => { if (inst.id === 'bulk-edit') { // Re-generate names list - const remainingNames = updatedTargetIds.map(id => { - const i = insts.find(inst => inst.id === id); - return i - ? i.name || i.torrent?.name || i.torrentPath || 'Unknown Torrent' - : 'Unknown Torrent'; - }); + const remainingNames = _getBulkInstanceNames(updatedTargetIds, insts); return { ...inst, From 6d71857da7e450440499501736fab3d12b3e8c95 Mon Sep 17 00:00:00 2001 From: theguy000 Date: Sun, 15 Mar 2026 21:58:49 +0600 Subject: [PATCH 5/9] fix: prevent reconcileWithBackend from pruning bulk-edit temp instance --- ui/src/App.svelte | 2 +- ui/src/lib/instanceStore.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/App.svelte b/ui/src/App.svelte index cc21334..b0eb6ec 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -238,7 +238,7 @@ return; } - saveSession(insts, activeInst.id); + saveSession(insts.filter(i => i.id !== 'bulk-edit'), activeInst.id); }, 500); } }); diff --git a/ui/src/lib/instanceStore.js b/ui/src/lib/instanceStore.js index d4d5243..1cdfb93 100644 --- a/ui/src/lib/instanceStore.js +++ b/ui/src/lib/instanceStore.js @@ -926,6 +926,9 @@ export const instanceActions = { instances.update(current => { const filtered = current.filter(inst => { + // Never prune the temporary bulk-edit instance + if (inst.id === 'bulk-edit') return true; + if (backendIds.has(String(inst.id))) return true; const hasLoadedTorrent = Boolean(inst.torrent) || Boolean(inst.torrentPath); From 3b12472e217c02889bee2c485fb8d63c07475f36 Mon Sep 17 00:00:00 2001 From: theguy000 Date: Sun, 15 Mar 2026 23:28:25 +0600 Subject: [PATCH 6/9] ci: fix tauri-action version comment to match tag (action-v0.6.1) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c1acaaf..c72a85a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -499,7 +499,7 @@ jobs: echo "draft=$draft" >> "$GITHUB_OUTPUT" - name: Build Tauri App - uses: tauri-apps/tauri-action@73fb865345c54760d875b94642314f8c0c894afa # v0 + uses: tauri-apps/tauri-action@73fb865345c54760d875b94642314f8c0c894afa # action-v0.6.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} From 3ddab3483c5471a4065a8a4828fc403166a24f86 Mon Sep 17 00:00:00 2001 From: theguy000 Date: Sun, 15 Mar 2026 23:42:32 +0600 Subject: [PATCH 7/9] style: fix prettier formatting in App.svelte --- ui/src/App.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/App.svelte b/ui/src/App.svelte index b0eb6ec..3e26e0f 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -238,7 +238,10 @@ return; } - saveSession(insts.filter(i => i.id !== 'bulk-edit'), activeInst.id); + saveSession( + insts.filter(i => i.id !== 'bulk-edit'), + activeInst.id + ); }, 500); } }); From 7c7769412ba95c770b5ea935c0041bbc7ca2d4fe Mon Sep 17 00:00:00 2001 From: theguy000 Date: Mon, 16 Mar 2026 00:21:03 +0600 Subject: [PATCH 8/9] Fix: exclude bulk-edit instance from Start All operation --- ui/src/App.svelte | 2 +- ui/src/components/layout/Sidebar.svelte | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/App.svelte b/ui/src/App.svelte index 3e26e0f..77f17eb 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -1112,7 +1112,7 @@ // Start all instances with torrents loaded (bulk) async function startAllInstances() { const currentInstances = get(instances); - const instancesToStart = currentInstances.filter(inst => inst.torrent && !inst.isRunning); + const instancesToStart = currentInstances.filter(inst => inst.id !== 'bulk-edit' && inst.torrent && !inst.isRunning); if (instancesToStart.length === 0) return; diff --git a/ui/src/components/layout/Sidebar.svelte b/ui/src/components/layout/Sidebar.svelte index d30991b..78b0d24 100644 --- a/ui/src/components/layout/Sidebar.svelte +++ b/ui/src/components/layout/Sidebar.svelte @@ -52,13 +52,13 @@ // Derived state let hasMultipleInstancesWithTorrents = $derived( - $instances.filter(inst => inst.torrent).length > 1 + $instances.filter(inst => inst.id !== 'bulk-edit' && inst.torrent).length > 1 ); - let hasRunningInstances = $derived($instances.some(inst => inst.isRunning)); + let hasRunningInstances = $derived($instances.some(inst => inst.id !== 'bulk-edit' && inst.isRunning)); let hasStoppedInstancesWithTorrents = $derived( - $instances.some(inst => inst.torrent && !inst.isRunning) + $instances.some(inst => inst.id !== 'bulk-edit' && inst.torrent && !inst.isRunning) ); let hasPausedInstances = $derived($instances.some(inst => inst.isRunning && inst.isPaused)); From 1df8dac769c5ae47df61856b5f0ada2ce6e9dff6 Mon Sep 17 00:00:00 2001 From: theguy000 Date: Mon, 16 Mar 2026 00:25:00 +0600 Subject: [PATCH 9/9] chore: format code with prettier --- ui/src/App.svelte | 4 +++- ui/src/components/layout/Sidebar.svelte | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/App.svelte b/ui/src/App.svelte index 77f17eb..ca8590d 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -1112,7 +1112,9 @@ // Start all instances with torrents loaded (bulk) async function startAllInstances() { const currentInstances = get(instances); - const instancesToStart = currentInstances.filter(inst => inst.id !== 'bulk-edit' && inst.torrent && !inst.isRunning); + const instancesToStart = currentInstances.filter( + inst => inst.id !== 'bulk-edit' && inst.torrent && !inst.isRunning + ); if (instancesToStart.length === 0) return; diff --git a/ui/src/components/layout/Sidebar.svelte b/ui/src/components/layout/Sidebar.svelte index 78b0d24..1b15359 100644 --- a/ui/src/components/layout/Sidebar.svelte +++ b/ui/src/components/layout/Sidebar.svelte @@ -55,7 +55,9 @@ $instances.filter(inst => inst.id !== 'bulk-edit' && inst.torrent).length > 1 ); - let hasRunningInstances = $derived($instances.some(inst => inst.id !== 'bulk-edit' && inst.isRunning)); + let hasRunningInstances = $derived( + $instances.some(inst => inst.id !== 'bulk-edit' && inst.isRunning) + ); let hasStoppedInstancesWithTorrents = $derived( $instances.some(inst => inst.id !== 'bulk-edit' && inst.torrent && !inst.isRunning)