Remove preset services and move to MariaDB
All checks were successful
docker / build-and-push (push) Successful in 54s

This commit is contained in:
Space-Banane
2026-05-20 20:50:59 +02:00
parent e62b9ee019
commit 556cdc36b6
6 changed files with 128 additions and 122 deletions

View File

@@ -11,19 +11,6 @@ type LinkForm = {
enabled: boolean;
};
const presetCards = [
{ name: 'Sonarr', category: 'Arr*', url: 'http://sonarr:8989', description: 'TV library automation' },
{ name: 'Radarr', category: 'Arr*', url: 'http://radarr:7878', description: 'Movie library automation' },
{ name: 'Lidarr', category: 'Arr*', url: 'http://lidarr:8686', description: 'Music library automation' },
{ name: 'Readarr', category: 'Arr*', url: 'http://readarr:8787', description: 'Book library automation' },
{ name: 'Prowlarr', category: 'Arr*', url: 'http://prowlarr:9696', description: 'Indexer management' },
{ name: 'Bazarr', category: 'Arr*', url: 'http://bazarr:6767', description: 'Subtitle management' },
{ name: 'qBittorrent', category: 'Downloads', url: 'http://qbittorrent:8080', description: 'Torrent client' },
{ name: 'Jellyfin', category: 'Media', url: 'http://jellyfin:8096', description: 'Media server' },
{ name: 'Jellyseerr', category: 'Requests', url: 'http://jellyseerr:5055', description: 'Request management' },
{ name: 'Overseerr', category: 'Requests', url: 'http://overseerr:5055', description: 'Request management' },
];
export default function App() {
const [state, setState] = useState<SetupState | null>(null);
const [links, setLinks] = useState<LinkItem[]>([]);
@@ -97,18 +84,6 @@ export default function App() {
if (editing?.id === id) setEditing(null);
await refresh();
}}
onSeedPreset={async (preset) => {
const fd = toFormData({
name: preset.name,
url: preset.url,
description: preset.description,
category: preset.category,
icon_url: '',
enabled: true,
});
await api.request('/api/links', { method: 'POST', body: fd });
await refresh();
}}
/>
</div>
</Shell>
@@ -182,7 +157,7 @@ function Hero({ currentUser, onAdmin, onLogout }: { currentUser: string | null;
<div>
<div className="text-sm uppercase tracking-[0.3em] text-accent-300">Jellomator</div>
<h1 className="mt-3 text-4xl font-semibold md:text-6xl">Your media stack, one click away.</h1>
<p className="mt-4 max-w-2xl text-slate-300">Curated links for Arr* services and custom tools, served from a single SQLite-backed container.</p>
<p className="mt-4 max-w-2xl text-slate-300">Curated links for Arr* services and custom tools, served from a single database-backed container.</p>
</div>
<div className="flex flex-wrap gap-3">
{currentUser ? <button type="button" className="btn-secondary" onClick={onLogout}>Logout</button> : null}
@@ -198,7 +173,7 @@ function AdminHeader({ currentUser, onBack, onLogout }: { currentUser: string |
<div className="mb-6 flex flex-wrap items-center justify-between gap-3">
<div>
<div className="text-sm uppercase tracking-[0.3em] text-accent-300">Protected admin</div>
<h1 className="mt-2 text-3xl font-semibold">Manage links and presets</h1>
<h1 className="mt-2 text-3xl font-semibold">Manage links</h1>
<p className="mt-2 text-sm text-slate-400">{currentUser ? `Signed in as ${currentUser}` : 'Sign in required'}</p>
</div>
<div className="flex gap-3">
@@ -304,14 +279,12 @@ function AdminPage({
setEditing,
onSave,
onDelete,
onSeedPreset,
}: {
links: LinkItem[];
editing: LinkItem | null;
setEditing: (link: LinkItem | null) => void;
onSave: (payload: LinkForm, file?: File | null) => Promise<void>;
onDelete: (id: number) => Promise<void>;
onSeedPreset: (preset: (typeof presetCards)[number]) => Promise<void>;
}) {
const [form, setForm] = useState<LinkForm>(emptyForm());
const [file, setFile] = useState<File | null>(null);
@@ -387,22 +360,6 @@ function AdminPage({
</div>
<div className="space-y-6">
<div className="glass rounded-3xl p-6">
<div className="flex items-center justify-between gap-3">
<div>
<h2 className="text-xl font-semibold">Seeded presets</h2>
<p className="mt-1 text-sm text-slate-400">These were inserted on first run and can be edited like any other link.</p>
</div>
</div>
<div className="mt-4 flex flex-wrap gap-2">
{presetCards.map((preset) => (
<button key={preset.name} type="button" className="btn-secondary px-3 py-2 text-sm" onClick={() => onSeedPreset(preset)}>
Add {preset.name}
</button>
))}
</div>
</div>
<div className="glass rounded-3xl p-6">
<h2 className="text-xl font-semibold">Existing links</h2>
<div className="mt-4 overflow-hidden rounded-2xl border border-white/10">