nzb-sabnzbd-extension/popup.html
2026-06-13 09:14:37 +02:00

227 lines
4.5 KiB
HTML

<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8" />
<title>NZB → SABnzbd</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
width: 320px;
font-family: 'Segoe UI', system-ui, sans-serif;
background: #0f0f1a;
color: #e2e2f0;
}
.header {
background: linear-gradient(135deg, #1a1a3e 0%, #0f0f1a 100%);
padding: 20px 20px 16px;
border-bottom: 1px solid #2a2a4a;
display: flex;
align-items: center;
gap: 12px;
}
.logo {
width: 36px;
height: 36px;
background: linear-gradient(135deg, #7ee8a2, #3abde0);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
flex-shrink: 0;
}
.header-text h1 {
font-size: 15px;
font-weight: 700;
color: #fff;
letter-spacing: 0.02em;
}
.header-text p {
font-size: 11px;
color: #7a7a9a;
margin-top: 2px;
}
.body {
padding: 20px;
display: flex;
flex-direction: column;
gap: 16px;
}
.field {
display: flex;
flex-direction: column;
gap: 6px;
}
label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #7a7a9a;
}
input {
background: #1a1a2e;
border: 1px solid #2a2a4a;
border-radius: 6px;
color: #e2e2f0;
font-size: 13px;
padding: 9px 12px;
outline: none;
transition: border-color 0.15s;
width: 100%;
}
input:focus {
border-color: #7ee8a2;
}
input::placeholder {
color: #3a3a5a;
}
.hint {
font-size: 11px;
color: #4a4a6a;
margin-top: 2px;
}
.divider {
height: 1px;
background: #1a1a2e;
}
.btn-row {
display: flex;
gap: 8px;
}
button {
flex: 1;
padding: 10px;
border-radius: 6px;
border: none;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.15s;
}
#saveBtn {
background: linear-gradient(135deg, #7ee8a2, #3abde0);
color: #0f0f1a;
}
#saveBtn:hover {
opacity: 0.9;
transform: translateY(-1px);
}
#testBtn {
background: #1a1a2e;
color: #7a7a9a;
border: 1px solid #2a2a4a;
}
#testBtn:hover {
border-color: #7ee8a2;
color: #7ee8a2;
}
#status {
font-size: 12px;
padding: 8px 12px;
border-radius: 6px;
display: none;
text-align: center;
}
#status.success {
display: block;
background: #0a2e18;
color: #7ee8a2;
border: 1px solid #1a5a30;
}
#status.error {
display: block;
background: #2e0a0a;
color: #ff6b6b;
border: 1px solid #5a1a1a;
}
.footer {
padding: 12px 20px;
border-top: 1px solid #1a1a2e;
font-size: 11px;
color: #3a3a5a;
text-align: center;
}
.status-dot {
display: inline-block;
width: 7px;
height: 7px;
border-radius: 50%;
background: #3a3a5a;
margin-right: 5px;
vertical-align: middle;
}
.status-dot.active { background: #7ee8a2; }
</style>
</head>
<body>
<div class="header">
<div class="logo">⬇</div>
<div class="header-text">
<h1>NZB → SABnzbd</h1>
<p>Klik op een NZB-link → direct downloaden</p>
</div>
</div>
<div class="body">
<div class="field">
<label>SABnzbd Host</label>
<input id="sabHost" type="url" placeholder="http://localhost:8080" />
<span class="hint">Bijv. http://192.168.1.10:8080 of https://sabnzbd.jouwserver.nl</span>
</div>
<div class="field">
<label>API-sleutel</label>
<input id="sabApiKey" type="text" placeholder="Jouw SABnzbd API-sleutel" />
<span class="hint">Te vinden in SABnzbd → Config → General → API Key</span>
</div>
<div class="field">
<label>Categorie (optioneel)</label>
<input id="sabCategory" type="text" placeholder="Default" />
<span class="hint">Laat leeg voor geen categorie</span>
</div>
<div class="divider"></div>
<div id="status"></div>
<div class="btn-row">
<button id="testBtn">🔌 Test verbinding</button>
<button id="saveBtn">Opslaan</button>
</div>
</div>
<div class="footer">
<span class="status-dot" id="statusDot"></span>
<span id="footerText">Nog niet geconfigureerd</span>
</div>
<script src="popup.js"></script>
</body>
</html>