Веб-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:
@@ -23,8 +23,8 @@
|
||||
<div class="review-title" style="font-size:var(--fs-xl)">{{.Title}}</div>
|
||||
<div class="hash-row" style="margin-top:9px">
|
||||
{{template "status_badge" .State}}
|
||||
{{if .Infohash}}<span class="hash">{{.InfohashShort}}</span>
|
||||
<button class="copy-btn" type="button" onclick="copyHash(this,'{{.Infohash}}')">⧉ копировать</button>{{end}}
|
||||
<span class="hash">{{.ID}}</span>
|
||||
<button class="copy-btn" type="button" onclick="copyHash(this,'{{.ID}}')">⧉ копировать</button>
|
||||
</div>
|
||||
{{if .Note}}<p class="muted" style="margin:var(--sp-2) 0 0">{{.Note}}</p>{{end}}
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user