From a35b93cacacb45120bd9d076cb957e2c42550920 Mon Sep 17 00:00:00 2001 From: ookami125 Date: Sun, 21 Jun 2026 23:34:50 -0400 Subject: [PATCH] webui: add an "Uncategorized" option to category selectors Add-torrent and set-category dropdowns default to Uncategorized so a category is no longer forced; set-category preselects the current one. Co-Authored-By: Claude Opus 4.8 --- public/js/app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 70b7b6c..d012c50 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -494,7 +494,8 @@ async function confirmDelete(hashes) { /* ---------- add torrent modal ---------- */ function openAddModal() { - const cats = state.meta.categories.map((c) => ``).join(''); + const cats = '' + + state.meta.categories.map((c) => ``).join(''); openModal('Add torrent', `
@@ -689,7 +690,10 @@ function onRowContext(e, hash) { } function promptCategory() { - const opts = state.meta.categories.map((c) => ``).join(''); + const cur = state.snapshot?.torrents?.find((t) => t.hash === [...state.selected][0])?.category || ''; + const sel = (v) => (v === cur ? ' selected' : ''); + const opts = `` + + state.meta.categories.map((c) => ``).join(''); openModal('Set category', `

Need a new one? Use + next to “Categories” in the sidebar.

`,