webui: tags field in the add-torrent modal
Comma-separated tags input with a datalist of existing tags. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
a35b93caca
commit
54ac49fa33
1 changed files with 5 additions and 0 deletions
|
|
@ -503,6 +503,10 @@ function openAddModal() {
|
|||
<input type="file" id="addFile" accept=".torrent,application/x-bittorrent" multiple />
|
||||
<div id="addFileInfo" class="dim" style="margin-top:6px;font-size:12px"></div></div>
|
||||
<div class="field"><label>Category</label><select id="addCat">${cats}</select></div>
|
||||
<div class="field"><label>Tags</label>
|
||||
<input type="text" id="addTags" placeholder="comma-separated, e.g. anime, airing"${
|
||||
state.meta.tags.length ? ` list="addTagList"` : ''} />
|
||||
${state.meta.tags.length ? `<datalist id="addTagList">${state.meta.tags.map((t) => `<option value="${f.esc(t)}">`).join('')}</datalist>` : ''}</div>
|
||||
<div class="field"><label>Save path</label>
|
||||
<input type="text" id="addPath" value="${f.esc(state.meta.preferences.save_path || '/data/downloads')}" /></div>
|
||||
<div class="checks">
|
||||
|
|
@ -515,6 +519,7 @@ function openAddModal() {
|
|||
const magnet = document.getElementById('addMagnet').value.trim();
|
||||
const common = {
|
||||
category: document.getElementById('addCat').value,
|
||||
tags: document.getElementById('addTags').value.split(',').map((s) => s.trim()).filter(Boolean),
|
||||
savePath: document.getElementById('addPath').value.trim(),
|
||||
paused: document.getElementById('addPaused').checked,
|
||||
seqDl: document.getElementById('addSeq').checked,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue