Files
spotizerr-dev/templates/config.html
cool.gitter.choco da5fda432a damn
2025-02-09 19:44:45 -06:00

120 lines
4.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Configuration - Spotizerr</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/config/config.css') }}" />
<link rel="stylesheet" href="{{ url_for('static', filename='css/queue/queue.css') }}">
</head>
<body>
<div class="config-container">
<header class="config-header">
<h1>Configuration</h1>
<a href="/" class="back-button">&larr; Back to App</a>
<!-- Added queue icon button to toggle the download queue -->
<button
id="queueIcon"
class="queue-icon"
aria-label="Download queue"
aria-controls="downloadQueue"
aria-expanded="false"
>
<img src="{{ url_for('static', filename='images/queue.svg') }}" alt="Queue" />
</button>
</header>
<div class="account-config">
<!-- Your account config section remains unchanged -->
<div class="config-item">
<label>Active Spotify Account:</label>
<select id="spotifyAccountSelect"></select>
</div>
<div class="config-item">
<label>Spotify Quality:</label>
<select id="spotifyQualitySelect">
<option value="NORMAL">OGG 96</option>
<option value="HIGH">OGG 160</option>
<option value="VERY_HIGH">OGG 320 (premium)</option>
</select>
</div>
<div class="config-item">
<label>Active Deezer Account:</label>
<select id="deezerAccountSelect"></select>
</div>
<div class="config-item">
<label>Deezer Quality:</label>
<select id="deezerQualitySelect">
<option value="MP3_128">MP3 128</option>
<option value="MP3_320">MP3 320 (sometimes premium)</option>
<option value="FLAC">FLAC (premium)</option>
</select>
</div>
<div class="config-item">
<label>Download Fallback:</label>
<label class="switch">
<input type="checkbox" id="fallbackToggle" />
<span class="slider"></span>
</label>
</div>
<div class="config-item">
<label>Real time downloading:</label>
<label class="switch">
<input type="checkbox" id="realTimeToggle" />
<span class="slider"></span>
</label>
</div>
<div class="form-group">
<label for="maxConcurrentDownloads">Max Concurrent Downloads:</label>
<input type="number" id="maxConcurrentDownloads" min="1" value="3">
</div>
<!-- New Formatting Options -->
<div class="config-item">
<label>Custom Directory Format:</label>
<input
type="text"
id="customDirFormat"
placeholder="e.g. %artist%/%album%"
/>
</div>
<div class="config-item">
<label>Custom Track Format:</label>
<input
type="text"
id="customTrackFormat"
placeholder="e.g. %tracknum% - %music%"
/>
</div>
</div>
<div class="service-tabs">
<button class="tab-button active" data-service="spotify">Spotify</button>
<button class="tab-button" data-service="deezer">Deezer</button>
</div>
<div class="credentials-list"></div>
<div class="credentials-form">
<h2>Credentials Management</h2>
<form id="credentialForm">
<div class="form-group">
<label>Name:</label>
<input type="text" id="credentialName" required />
</div>
<div id="serviceFields"></div>
<button type="submit" class="save-btn">Save Credentials</button>
</form>
<div id="configError" class="error"></div>
</div>
</div>
<!--
Do not include any hard-coded download queue markup here.
The shared queue.js module will create the queue sidebar dynamically.
-->
<!-- Load config.js as a module so you can import queue.js -->
<script type="module" src="{{ url_for('static', filename='js/config.js') }}"></script>
</body>
</html>