Files
sdb2-extension-chrome/options.html
JSC b06655ff11
All checks were successful
Create Release / build-and-release (push) Successful in 6s
Update API base URL to 'http://goyave' in background, options, and popup scripts
2025-10-07 13:49:47 +02:00

194 lines
4.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SDB Audio Extractor - Options</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 600px;
margin: 40px auto;
padding: 20px;
line-height: 1.6;
}
.header {
text-align: center;
margin-bottom: 40px;
}
.logo {
font-size: 32px;
font-weight: bold;
color: #333;
margin-bottom: 10px;
}
.subtitle {
color: #666;
font-size: 16px;
}
.form-group {
margin-bottom: 25px;
}
label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: #333;
}
input[type="text"], input[type="url"] {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 14px;
box-sizing: border-box;
}
input[type="text"]:focus, input[type="url"]:focus {
outline: none;
border-color: #007bff;
box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
.help-text {
font-size: 12px;
color: #666;
margin-top: 5px;
}
.save-btn {
background: #007bff;
color: white;
border: none;
padding: 12px 24px;
border-radius: 6px;
font-size: 16px;
cursor: pointer;
margin-right: 10px;
}
.save-btn:hover {
background: #0056b3;
}
.save-btn:disabled {
background: #ccc;
cursor: not-allowed;
}
.test-btn {
background: #28a745;
color: white;
border: none;
padding: 12px 24px;
border-radius: 6px;
font-size: 16px;
cursor: pointer;
}
.test-btn:hover {
background: #1e7e34;
}
.test-btn:disabled {
background: #ccc;
cursor: not-allowed;
}
.status {
margin: 20px 0;
padding: 12px;
border-radius: 6px;
font-size: 14px;
}
.status.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.status.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
.status.loading {
background: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
}
.instructions {
background: #f8f9fa;
padding: 20px;
border-radius: 8px;
margin-bottom: 30px;
border-left: 4px solid #007bff;
}
.instructions h3 {
margin-top: 0;
color: #333;
}
.instructions ol {
margin: 15px 0;
padding-left: 20px;
}
.instructions li {
margin-bottom: 8px;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<div class="header">
<div class="logo">🎵 SDB Audio Extractor</div>
<div class="subtitle">Configuration</div>
</div>
<div class="instructions">
<h3>Setup Instructions</h3>
<ol>
<li>Log into your SDB soundboard application</li>
<li>Go to your account settings</li>
<li>Generate an API token</li>
<li>Copy the token and paste it below</li>
<li>Make sure your API base URL is correct (usually http://goyave)</li>
<li>Click "Test Connection" to verify everything works</li>
</ol>
</div>
<form id="options-form">
<div class="form-group">
<label for="api-token">API Token *</label>
<input type="text" id="api-token" placeholder="Enter your SDB API token" required>
<div class="help-text">This token is used to authenticate with your SDB backend API</div>
</div>
<div class="form-group">
<label for="api-base-url">API Base URL</label>
<input type="url" id="api-base-url" placeholder="http://goyave">
<div class="help-text">The base URL of your SDB backend API (default: http://goyave)</div>
</div>
<button type="submit" class="save-btn" id="save-btn">Save Settings</button>
<button type="button" class="test-btn" id="test-btn">Test Connection</button>
</form>
<div id="status" class="status hidden"></div>
<script src="options.js"></script>
</body>
</html>