0.3.23 - Search radarr/sonarr

This commit is contained in:
ponzischeme89
2026-08-25 15:39:43 +12:00
parent 0fcc02f57e
commit 772635784c
21 changed files with 603 additions and 117 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -13,9 +13,9 @@
rel="icon"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%2352b54b'/%3E%3Ctext x='16' y='23' font-family='system-ui,sans-serif' font-size='19' font-weight='800' text-anchor='middle' fill='%2306240a'%3EM%3C/text%3E%3C/svg%3E"
/>
<script type="module" crossorigin src="/admin/assets/index-BNwLRlCd.js"></script>
<script type="module" crossorigin src="/admin/assets/index-BRiE93Cp.js"></script>
<link rel="modulepreload" crossorigin href="/admin/assets/router-D9WH5XEU.js">
<link rel="stylesheet" crossorigin href="/admin/assets/index-CtoC2zbP.css">
<link rel="stylesheet" crossorigin href="/admin/assets/index-BLZnmdjh.css">
</head>
<body>
<div id="root"></div>
+22 -4
View File
@@ -805,13 +805,13 @@ export function AccountPage() {
renaming={namingViewer.id !== null}
busy={busy === 'viewer-name'}
onCancel={() => setNamingViewer(null)}
onConfirm={(name) =>
onConfirm={(name, pin) =>
void act(
'viewer-name',
() =>
namingViewer.id
? api.put(`${base}/viewers/${encodeURIComponent(namingViewer.id)}`, { name })
: api.post(`${base}/viewers`, { name }),
: api.post(`${base}/viewers`, { name, ...(pin ? { pin } : {}) }),
namingViewer.id ? 'Viewer renamed.' : 'Viewer added.',
() => {
setNamingViewer(null);
@@ -1117,10 +1117,11 @@ function ViewerNameDialog({
initial: string;
renaming: boolean;
busy: boolean;
onConfirm: (name: string) => void;
onConfirm: (name: string, pin?: string) => void;
onCancel: () => void;
}) {
const [name, setName] = useState(initial);
const [pin, setPin] = useState('');
return (
<div className="scrim" onPointerDown={(event) => event.target === event.currentTarget && onCancel()}>
<div className="dialog" role="dialog" aria-modal="true">
@@ -1138,11 +1139,28 @@ function ViewerNameDialog({
onChange={(event) => setName(event.target.value)}
/>
</Field>
{!renaming ? (
<Field label="Initial PIN" hint="Optional. Use 4 to 12 numbers, or leave it blank to add one later.">
<input
type="password"
inputMode="numeric"
minLength={4}
maxLength={12}
value={pin}
onChange={(event) => setPin(event.target.value.replace(/\D/g, '').slice(0, 12))}
/>
</Field>
) : null}
<div className="dialog-actions">
<Button variant="quiet" onClick={onCancel}>
Cancel
</Button>
<Button variant="primary" busy={busy} disabled={!name.trim()} onClick={() => onConfirm(name.trim())}>
<Button
variant="primary"
busy={busy}
disabled={!name.trim() || (pin.length > 0 && pin.length < 4)}
onClick={() => onConfirm(name.trim(), pin || undefined)}
>
{renaming ? 'Rename' : 'Add viewer'}
</Button>
</div>