131 lines
4.7 KiB
HTML
131 lines
4.7 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Pricing — Admin</title>
|
||
<style>
|
||
body{
|
||
font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
|
||
background:#111827;
|
||
color:#f3f4f6;
|
||
margin:0;
|
||
padding:1rem;
|
||
line-height:1.5;
|
||
}
|
||
.container{max-width:800px;margin:0 auto;}
|
||
h1{color:#60a5fa;margin-top:0;}
|
||
h2{color:#93c5fd;font-size:1.1rem;margin-top:1.5rem;}
|
||
a{color:#93c5fd;}
|
||
.topbar{float:right;display:flex;gap:.75rem;align-items:center;}
|
||
label{display:block;margin-top:.8rem;font-weight:600;font-size:.9rem;}
|
||
input[type="text"]{
|
||
width:100%;
|
||
padding:.6rem;
|
||
border-radius:.5rem;
|
||
border:1px solid #374151;
|
||
background:#111827;
|
||
color:#f3f4f6;
|
||
font:inherit;
|
||
}
|
||
.price-row{
|
||
display:grid;
|
||
grid-template-columns:1fr 1fr;
|
||
gap:.75rem;
|
||
}
|
||
button{
|
||
margin-top:1rem;
|
||
padding:.7rem 1rem;
|
||
border:none;
|
||
border-radius:.5rem;
|
||
background:#3b82f6;
|
||
color:#fff;
|
||
font-weight:700;
|
||
cursor:pointer;
|
||
}
|
||
button.secondary{background:#4b5563;}
|
||
.flash{
|
||
padding:.8rem;
|
||
background:#064e3b;
|
||
border-radius:.5rem;
|
||
margin-bottom:1rem;
|
||
}
|
||
.flash.error{background:#450a0a;}
|
||
.hint{font-size:.85rem;color:#9ca3af;margin-top:.25rem;}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<div class="topbar">
|
||
<a href="{{ url_for('admin_dashboard') }}">Dashboard</a>
|
||
<a href="{{ url_for('admin_sales') }}">Sales</a>
|
||
<a href="{{ url_for('admin_settings') }}">Settings</a>
|
||
<a href="{{ url_for('admin_logout') }}" style="color:#f87171">Log out</a>
|
||
</div>
|
||
|
||
<h1>Pricing</h1>
|
||
|
||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||
{% for category, message in messages %}
|
||
<div class="flash {{ category }}">{{ message }}</div>
|
||
{% endfor %}
|
||
{% endwith %}
|
||
|
||
<div class="section" style="background:#1f2937;padding:1rem;border-radius:.5rem;margin-bottom:1rem">
|
||
<h2 style="margin-top:0">MusicGPT Costs (USD)</h2>
|
||
<div class="price-row">
|
||
<div>
|
||
<p class="hint" style="margin:0">Songs generated</p>
|
||
<p style="font-size:1.25rem;font-weight:700;margin:.25rem 0">{{ cost_totals.song_count }}</p>
|
||
</div>
|
||
<div>
|
||
<p class="hint" style="margin:0">Completed A/B pairs</p>
|
||
<p style="font-size:1.25rem;font-weight:700;margin:.25rem 0">{{ cost_totals.completed_pairs }}</p>
|
||
</div>
|
||
<div>
|
||
<p class="hint" style="margin:0">Music cost total</p>
|
||
<p style="font-size:1.25rem;font-weight:700;margin:.25rem 0">${{ "%.4f"|format(cost_totals.total_cost) }}</p>
|
||
</div>
|
||
<div>
|
||
<p class="hint" style="margin:0">Stems cost total</p>
|
||
<p style="font-size:1.25rem;font-weight:700;margin:.25rem 0">${{ "%.4f"|format(cost_totals.stems_total) }}</p>
|
||
</div>
|
||
</div>
|
||
<p class="hint" style="margin-top:.5rem">Per-song cost approx. $0.035–$0.06 USD on Pro plan depending on model.</p>
|
||
</div>
|
||
|
||
<form method="POST">
|
||
<h2>Standard Items</h2>
|
||
<p class="hint">Leave blank to hide a price. Enter numbers only or include currency symbols as you prefer.</p>
|
||
|
||
<label for="one_song">One Song</label>
|
||
<input type="text" id="one_song" name="one_song" value="{{ fixed.one_song }}" placeholder="e.g. 25.00">
|
||
|
||
<label for="both_songs">Both Songs</label>
|
||
<input type="text" id="both_songs" name="both_songs" value="{{ fixed.both_songs }}" placeholder="e.g. 40.00">
|
||
|
||
<label for="wav_per_song">WAV files / song</label>
|
||
<input type="text" id="wav_per_song" name="wav_per_song" value="{{ fixed.wav_per_song }}" placeholder="e.g. 10.00">
|
||
|
||
<label for="stems_per_song">STEM files / song</label>
|
||
<input type="text" id="stems_per_song" name="stems_per_song" value="{{ fixed.stems_per_song }}" placeholder="e.g. 25.00">
|
||
|
||
<h2>Custom Items</h2>
|
||
{% for c in customs %}
|
||
<div class="price-row">
|
||
<div>
|
||
<label for="custom_name_{{ loop.index }}">Item {{ loop.index }} name</label>
|
||
<input type="text" id="custom_name_{{ loop.index }}" name="custom_name_{{ loop.index }}" value="{{ c.name }}" placeholder="e.g. Rush delivery">
|
||
</div>
|
||
<div>
|
||
<label for="custom_price_{{ loop.index }}">Item {{ loop.index }} price</label>
|
||
<input type="text" id="custom_price_{{ loop.index }}" name="custom_price_{{ loop.index }}" value="{{ c.price }}" placeholder="e.g. 15.00">
|
||
</div>
|
||
</div>
|
||
{% endfor %}
|
||
|
||
<button type="submit">Save Pricing</button>
|
||
</form>
|
||
</div>
|
||
</body>
|
||
</html>
|