arr-summary/templates/library.html
Barely Removable 59beb9490f
All checks were successful
Deploy / deploy (push) Successful in 24s
Fix design-review findings: self-linking nav, colour reuse, badge clash
From a frontend-design skill review of all pages, after last session's
chrome changes (top nav, all-tabs nav, header download row):

- The top/closing fastext nav now mutes the entry matching the current
  page (.fastext-here) instead of rendering a link to the page you're
  already on.
- Colour in fastext is reserved for the four entries that still carry
  a real keyboard shortcut (r/g/y/c); the other four render in plain
  ink instead of reusing k-red/k-green/k-yellow/k-cyan for a
  destination they don't semantically mean (e.g. Requests no longer
  shows in the app's own off-air red).
- Discover's badge slot meant "critic score" on its RT tiles and
  "release year" on its new search tiles at the same time. Search
  results (Library and Discover) now fold year/held-state into the
  sub-line instead, leaving the badge exclusively for critic score.
- System's Transmission rows now carry a small ↗ glyph, since they
  silently changed from in-app navigation to opening each service's
  own UI in a new tab with no visual cue.
- SABnzbd polling drops from 5s to 20s on pages that only show the
  header's download figure (everywhere but System/Activity, which
  keep 5s for their own live figures) — a number idle 95% of the time
  doesn't need second-level freshness sitewide.
- DESIGN.md's fastext description, now-current per this session's nav
  changes.
2026-08-30 09:11:59 -07:00

82 lines
3.1 KiB
HTML

{% extends "_shell.html" %}
{% from "_macros.html" import service_error, tile %}
{% block title %}P102 Library{% endblock %}
{% block content %}
<h1 class="tt-dh bloom tt-masthead">LIBRARY</h1>
{#- Search sits at the top because arriving here with a title in mind is
the common case. It posts to the same lookup the old page used. -#}
<form class="tt-search" action="{{ request.script_root }}/library" method="get" role="search">
<label class="visually-hidden" for="q">Search the library</label>
<input class="tt-input" type="search" id="q" name="q" value="{{ request.args.get('q', '') }}"
placeholder="TITLE" autocomplete="off" spellcheck="false">
<button class="tt-btn" type="submit">Search</button>
</form>
{% if search_results is not none %}
<div class="tt-field">
<span>Results</span>
<span class="tt-field-meta">{{ search_results | length }} match{{ 'es' if search_results | length != 1 else '' }}</span>
</div>
{% if search_results %}
<div class="tt-tiles">
{% for it in search_results %}
{{ tile(it.title, it.kind ~ (' · ' ~ it.year if it.year else ''), it.poster) }}
{% endfor %}
</div>
{% else %}
<p class="tt-empty">No matches for &ldquo;{{ q }}&rdquo;.</p>
{% endif %}
{% endif %}
<div class="tt-field">
<span>Holdings</span>
<span class="tt-field-meta">
{%- if sonarr.status == 'ok' %}{{ sonarr.total_series }} shows{% endif -%}
{%- if sonarr.status == 'ok' and radarr.status == 'ok' %} &middot; {% endif -%}
{%- if radarr.status == 'ok' %}{{ radarr.total_movies }} films{% endif -%}
</span>
</div>
<div class="tt-figs">
{% if sonarr.status == 'ok' %}
<div class="tt-fig">
<div class="tt-dh tt-fig-v">{{ sonarr.total_series }}</div>
<div class="tt-fig-l">Shows</div>
</div>
<div class="tt-fig">
<div class="tt-dh tt-fig-v {{ 'alert' if sonarr.missing_episodes else 'ok' }}">{{ sonarr.missing_episodes }}</div>
<div class="tt-fig-l">Missing eps</div>
</div>
{% endif %}
{% if radarr.status == 'ok' %}
<div class="tt-fig">
<div class="tt-dh tt-fig-v">{{ radarr.total_movies }}</div>
<div class="tt-fig-l">Films</div>
</div>
<div class="tt-fig">
<div class="tt-dh tt-fig-v {{ 'alert' if radarr.missing_movies else 'ok' }}">{{ radarr.missing_movies }}</div>
<div class="tt-fig-l">Missing films</div>
</div>
{% endif %}
</div>
{% if sonarr.status != 'ok' %}
<div class="tt-field crit"><span>Sonarr</span><span class="tt-field-meta">off air</span></div>
{{ service_error('Sonarr', sonarr.error) }}
{% endif %}
{% if radarr.status != 'ok' %}
<div class="tt-field crit"><span>Radarr</span><span class="tt-field-meta">off air</span></div>
{{ service_error('Radarr', radarr.error) }}
{% endif %}
{% if not q and recently_added %}
<div class="tt-field"><span>Newest In</span></div>
<div class="tt-tiles">
{% for it in recently_added %}
{{ tile(it.title, it.sub, it.poster, it.ago) }}
{% endfor %}
</div>
{% endif %}
{% endblock %}