Веб-UI: основной идентификатор карточек — download.id вместо infohash

В карточке списка и шапке /download/{id} показываем и копируем download.id
(ULID) — тот же ключ, что в логах (download_id), удобно грепать. Infohash
остаётся в блоке «Информация о торренте». Поиск по списку расширен: матчит
любой идентификатор (download.id ИЛИ infohash), плюс название/контекст.
Удалены осиротевшие поля Infohash/InfohashShort и хелпер shortenHash.

Дельта web-ui влита в спеки, change заархивирован.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
av
2026-07-04 09:47:27 +03:00
co-authored by Claude Opus 4.8
parent 80e725eb9a
commit 9ed732e49e
12 changed files with 220 additions and 64 deletions
+3 -5
View File
@@ -34,7 +34,7 @@
<form class="search" method="get" action="/">
<span class="ico"></span>
<input class="input" type="search" name="q" value="{{.Query}}"
placeholder="Поиск по названию или infohash…">
placeholder="Поиск по названию, id или infohash…">
{{if ne .Filter "all"}}<input type="hidden" name="f" value="{{.Filter}}">{{end}}
{{if .ShowAll}}<input type="hidden" name="all" value="1">{{end}}
</form>
@@ -56,12 +56,10 @@
<div class="card-top">
<div>
<div class="card-title"><a href="/download/{{.ID}}" style="color:inherit">{{.Title}}</a></div>
{{if .Infohash}}
<div class="hash-row">
<span class="hash">{{.InfohashShort}}</span>
<button class="copy-btn" type="button" onclick="copyHash(this,'{{.Infohash}}')">⧉ копировать</button>
<span class="hash">{{.ID}}</span>
<button class="copy-btn" type="button" onclick="copyHash(this,'{{.ID}}')">⧉ копировать</button>
</div>
{{end}}
</div>
{{template "status_badge" .State}}
</div>