feat: printer card - URI, model, state reasons, marker levels; add zoraxy/kiosk/hostapd/dnsmasq to services dashboard; fix settings.html truncated template
This commit is contained in:
@@ -143,6 +143,53 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Infos URI / modèle -->
|
||||
<div style="font-size:.8rem;color:var(--text-muted);display:flex;flex-direction:column;gap:.2rem">
|
||||
{% if p.uri %}<span>🔌 <code style="font-size:.78rem">{{ p.uri }}</code></span>{% endif %}
|
||||
{% if p.model %}<span>🖨 {{ p.model }}</span>{% endif %}
|
||||
{% if p.location %}<span>📍 {{ p.location }}</span>{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Erreurs / raisons CUPS -->
|
||||
{% if p.reasons %}
|
||||
<div style="display:flex;flex-direction:column;gap:.3rem">
|
||||
{% for reason in p.reasons %}
|
||||
<div style="background:rgba(192,0,0,.12);border:1px solid rgba(192,0,0,.25);border-radius:6px;padding:.3rem .65rem;font-size:.82rem;color:#e05050">
|
||||
{{ reason }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Niveaux encre/ruban -->
|
||||
{% if p.markers %}
|
||||
<div style="display:flex;flex-direction:column;gap:.35rem">
|
||||
{% for m in p.markers %}
|
||||
{% set lvl = m.level | int %}
|
||||
<div style="font-size:.8rem">
|
||||
<div style="display:flex;justify-content:space-between;margin-bottom:.15rem">
|
||||
<span style="color:var(--text-muted)">🎨 {{ m.name }}</span>
|
||||
<span style="color:{{ '#e05050' if lvl < 10 else '#e07b00' if lvl < 25 else '#4caf50' }}">
|
||||
{% if lvl < 0 %}N/A{% else %}{{ lvl }}%{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% if lvl >= 0 %}
|
||||
<div style="background:rgba(255,255,255,.1);border-radius:4px;height:5px;overflow:hidden">
|
||||
<div style="width:{{ [lvl, 100] | min }}%;height:100%;background:{{ '#e05050' if lvl < 10 else '#e07b00' if lvl < 25 else '#4caf50' }};border-radius:4px;transition:width .3s"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Stats impressions -->
|
||||
<div style="display:flex;gap:.75rem;font-size:.82rem">
|
||||
<span style="color:#4caf50">✅ {{ p.stats_done or 0 }} imprimé{{ 's' if (p.stats_done or 0) > 1 else '' }}</span>
|
||||
{% if p.stats_error %}<span style="color:#e05050">❌ {{ p.stats_error }} erreur{{ 's' if p.stats_error > 1 else '' }}</span>{% endif %}
|
||||
{% if p.stats_cancelled %}<span style="color:#888">✕ {{ p.stats_cancelled }} annulé{{ 's' if p.stats_cancelled > 1 else '' }}</span>{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Actions imprimante -->
|
||||
<div class="printer-actions">
|
||||
{% if p.state == 'disabled' %}
|
||||
|
||||
Reference in New Issue
Block a user