Files
alembic/app/templates/credentials/index.html
T
andrew 9a116f3da4 Credential enable/disable + descriptions, artist casing settings page, playlist compare view
Credentials page now shows a fact-checked one-line description per
service and marks Spotify/Soulseek/Navidrome as Required (no toggle --
they're load-bearing for every playlist sync). The four optional
integrations (Bandcamp, AzuraCast, Qobuz, Telegram) get a real on/off
switch: Bandcamp pauses its scheduled job (same mechanism as the Jobs
page), the other three just remove their rendered credential file, which
the scripts that read them already treat as "not configured, skip" --
no script changes needed. Disabled optional scopes also drop off the
dashboard's credential status row.

New Settings > Artist Casing page to view/add/remove entries in
artist-canonical.list without shelling in -- adding a name that already
matches case-insensitively replaces its casing in place instead of
duplicating.

Playlist detail page's status section is now two side-by-side columns:
the original Spotify tracklist on the left, and a tabbed Downloaded /
Waiting-to-download view on the right (client-side tabs via Alpine),
both with an internal scroll area so long playlists don't pull the
columns out of sync. Uses the existing status_service reconciliation
(sldl index + beets + quarantine) -- no backend changes needed there.
2026-07-09 10:52:08 -06:00

62 lines
2.8 KiB
HTML

{% extends "settings/_layout.html" %}
{% block settings_title %}Credentials{% endblock %}
{% block settings_content %}
<h2 style="margin-top:0;">Credentials</h2>
<p class="muted" style="margin-top:-0.75rem;">Write-only: values are encrypted at rest and never sent back to the browser. Leave a field blank to keep it unchanged.</p>
<div class="cred-grid">
{% for scope, fields in scope_fields.items() %}
{% set is_core = scope in core_scopes %}
{% set is_enabled = enabled.get(scope, True) %}
<div class="cred-scope {{ 'cred-disabled' if not is_core and not is_enabled else '' }}">
<div class="panel">
<div class="cred-scope-header">
<div>
<h2>
{{ scope }}
{% if is_core %}
<span class="badge badge-info" title="Needed for the core pipeline to work">Required</span>
{% elif configured.get(scope) %}
<span class="badge badge-success">Configured</span>
{% else %}
<span class="badge badge-muted">Not configured</span>
{% endif %}
</h2>
<p class="muted cred-desc">{{ scope_descriptions.get(scope, "") }}</p>
</div>
{% if not is_core %}
<form method="post" action="/settings/credentials/{{ scope }}/toggle" class="inline">
<label class="switch" title="{{ 'Disable' if is_enabled else 'Enable' }} {{ scope }}">
<input type="checkbox" {{ "checked" if is_enabled else "" }} onchange="this.form.submit()">
<span class="switch-track"><span class="switch-thumb"></span></span>
</label>
</form>
{% endif %}
</div>
{% if not is_core and not is_enabled %}
<p class="cred-disabled-note">Disabled — its scheduled automation is paused (or, for buy-link sources, its rendered credential file is removed) until you turn this back on. Saved values below are kept.</p>
{% endif %}
<form method="post" action="/settings/credentials/{{ scope }}">
{% for field in fields %}
<div class="field wide">
<label for="{{ scope }}_{{ field }}">
{{ field }}
{% if field in configured.get(scope, []) %}<span class="badge badge-success" style="margin-left:0.5rem;">set</span>{% endif %}
</label>
{% if field in ("cookies_txt",) %}
<textarea id="{{ scope }}_{{ field }}" name="{{ field }}" rows="6" placeholder="leave blank to keep current"></textarea>
{% else %}
<input type="password" id="{{ scope }}_{{ field }}" name="{{ field }}" placeholder="leave blank to keep current" autocomplete="off">
{% endif %}
</div>
{% endfor %}
<button type="submit" class="btn">Save {{ scope }}</button>
</form>
</div>
</div>
{% endfor %}
</div>
{% endblock %}