mirror of
https://github.com/HyPnoTiiK/stream-fusion.git
synced 2026-08-04 18:19:07 +00:00
Introduce a comprehensive settings management system that allows runtime configuration through a new admin interface. The system includes: - Database-backed settings with Redis caching for performance - Settings registry defining types, defaults, and categories - New admin UI with navigation cards and dedicated sub-pages for each category (general, cache, indexers, proxy, system, TMDB) - Shared view logic for consistent GET/POST handling across sub-pages - Automatic seeding of defaults and application of overrides at startup - Validation and type coercion for setting values The previous static configuration page has been replaced with a modular, category-based interface that provides better organization and extensibility for future configuration needs.
51 lines
2.3 KiB
HTML
51 lines
2.3 KiB
HTML
{% extends "base.html" %}
|
|
{% from "_config_macros.html" import render_field, save_button, save_feedback, save_script, config_breadcrumb %}
|
|
{% block title %}TMDB — Configuration — StreamFusion Admin{% endblock %}
|
|
{% block page_title %}Configuration — TMDB{% endblock %}
|
|
|
|
{% block extra_head %}
|
|
<style>
|
|
.cfg-card { border: 1px solid var(--bs-border-color); border-radius: 10px; background: var(--bs-secondary-bg); overflow: hidden; margin-bottom: 1.25rem; }
|
|
.cfg-card-header { padding: 13px 20px; border-bottom: 1px solid var(--bs-border-color); font-weight: 600; font-size: 0.875rem; display: flex; align-items: center; gap: 8px; }
|
|
.cfg-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; border-bottom: 1px solid var(--bs-border-color); gap: 12px; font-size: 0.83rem; min-height: 40px; }
|
|
.cfg-row:last-child { border-bottom: none; }
|
|
.cfg-label { color: var(--bs-secondary-color); flex-shrink: 0; }
|
|
.cfg-value { font-weight: 500; text-align: right; }
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{{ config_breadcrumb('TMDB') }}
|
|
{{ save_feedback() }}
|
|
|
|
<form id="cfg-form" method="POST">
|
|
|
|
<div class="cfg-card">
|
|
<div class="cfg-card-header"><i class="bi bi-film text-warning"></i> Paramètres TMDB</div>
|
|
{% for defn in registry_sections.get('tmdb', []) %}
|
|
{{ render_field(defn, effective) }}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<!-- Clé API TMDB — lecture seule -->
|
|
<div class="cfg-card">
|
|
<div class="cfg-card-header"><i class="bi bi-shield-lock text-secondary"></i> Variables d'environnement (lecture seule)</div>
|
|
<div class="cfg-row">
|
|
<span class="cfg-label">TMDB_API_KEY</span>
|
|
<span class="cfg-value">
|
|
{% if cfg_readonly.tmdb.api_key_set %}
|
|
<span class="badge bg-success"><i class="bi bi-check-circle-fill me-1"></i>Configurée</span>
|
|
{% else %}
|
|
<span class="badge bg-secondary">Non configurée</span>
|
|
{% endif %}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
{{ save_button(url_for('config_tmdb_reset')(request)) }}
|
|
</form>
|
|
{% endblock %}
|
|
|
|
{% block extra_scripts %}
|
|
{{ save_script('cfg-form', url_for('config_tmdb_post')(request), url_for('config_tmdb_reset')(request)) }}
|
|
{% endblock %}
|