Move status and MusicGPT info into album cover panel on admin request page
This commit is contained in:
parent
af91664ed0
commit
1eae83baaa
1 changed files with 34 additions and 21 deletions
|
|
@ -129,6 +129,14 @@
|
|||
}
|
||||
.approved-box{font-size:1.2rem;font-weight:bold;color:#fbbf24;}
|
||||
.status-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;}
|
||||
.media-status{
|
||||
display:flex;
|
||||
align-items:flex-start;
|
||||
gap:1rem;
|
||||
flex-wrap:wrap;
|
||||
}
|
||||
.cover-col{flex-shrink:0;}
|
||||
.status-col{flex:1;min-width:200px;}
|
||||
.history-list{
|
||||
margin:0;
|
||||
padding:0;
|
||||
|
|
@ -162,29 +170,34 @@
|
|||
<div class="container">
|
||||
<p><a href="{{ url_for('admin_dashboard') }}">← Dashboard</a></p>
|
||||
<h1>Request #{{ req.id }} — {{ req.name }}</h1>
|
||||
<div class="status-row">
|
||||
<p style="margin:0"><strong>Status:</strong> <span class="status-badge">{{ statuses[req.status] }}</span></p>
|
||||
{% if req.musicgpt_status %}
|
||||
<p style="margin:0"><strong>MusicGPT:</strong> <span class="status-badge {% if req.musicgpt_status == 'COMPLETED' %}ok{% elif req.musicgpt_status in ('FAILED','ERROR','CANCELLED') %}missing{% endif %}">{{ req.musicgpt_status }}</span>
|
||||
{% if req.musicgpt_cost is not none %}({{ format_musicgpt_cost(req.musicgpt_cost) }}){% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if req.status != 'cancelled' %}
|
||||
<form method="POST" onsubmit="return confirm('Are you sure you want to cancel request #{{ req.id }}?')" style="margin:0">
|
||||
<input type="hidden" name="action" value="cancel_request">
|
||||
<button type="submit" class="danger" style="margin:0">Cancel Request</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if req.album_cover_url %}
|
||||
<div class="section" style="text-align:center">
|
||||
<img src="{{ req.album_cover_url }}" alt="Album cover" style="max-width:160px;border-radius:.5rem">
|
||||
{% if not deliver_album_cover %}
|
||||
<p class="copy-hint">Album cover is hidden from the customer preview/delivery because delivery is disabled in settings.</p>
|
||||
{% endif %}
|
||||
<!-- Album cover + status info panel -->
|
||||
<div class="section">
|
||||
<div class="media-status">
|
||||
{% if req.album_cover_url %}
|
||||
<div class="cover-col">
|
||||
<img src="{{ req.album_cover_url }}" alt="Album cover" style="max-width:160px;border-radius:.5rem;display:block;">
|
||||
{% if not deliver_album_cover %}
|
||||
<p class="copy-hint" style="margin:.25rem 0 0 0;max-width:160px;">Album cover is hidden from the customer preview/delivery because delivery is disabled in settings.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="status-col">
|
||||
<p style="margin:0"><strong>Status:</strong> <span class="status-badge">{{ statuses[req.status] }}</span></p>
|
||||
{% if req.musicgpt_status %}
|
||||
<p style="margin:.5rem 0 0 0"><strong>MusicGPT:</strong> <span class="status-badge {% if req.musicgpt_status == 'COMPLETED' %}ok{% elif req.musicgpt_status in ('FAILED','ERROR','CANCELLED') %}missing{% endif %}">{{ req.musicgpt_status }}</span>
|
||||
{% if req.musicgpt_cost is not none %}({{ format_musicgpt_cost(req.musicgpt_cost) }}){% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if req.status != 'cancelled' %}
|
||||
<form method="POST" onsubmit="return confirm('Are you sure you want to cancel request #{{ req.id }}?')" style="margin:.75rem 0 0 0">
|
||||
<input type="hidden" name="action" value="cancel_request">
|
||||
<button type="submit" class="danger" style="margin:0">Cancel Request</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% for category, message in messages %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue