P42 Dashboard: erster Stand

FastAPI-Backend und React-Frontend mit Konten, Sendungsverfolgung,
Projekt-Artikeln, Vorrat & Einkauf mit Rezeptabgleich, Reise-Weltkarte,
Kanban-Projekten mit Priorität, Server-Monitoring und den Designs
Matrix und Blackwall. Betrieb per Docker hinter nginx (siehe DEPLOY.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
guyg1474andClaude Opus 5.5 committed 2026-10-14 14:08:11 +02:00
commit dd58b3d1f8
75 files changed
+11418

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
// Bearbeitbare Schnellzugriff-Links (Jellyfin, Audiobookshelf, Homer), einmal geladen und überall verfügbar
import { createContext, useCallback, useContext, useEffect, useState } from 'react';
import { api } from './api.js';
export const LINK_SERVICES = [
{ key: 'jellyfin', name: 'Jellyfin', description: 'Filme & Serien', placeholder: 'http://jellyfin.local:8096' },
{ key: 'audiobookshelf', name: 'Audiobookshelf', description: 'Hörbücher & Podcasts', placeholder: 'http://audiobookshelf.local:13378' },
{ key: 'homer', name: 'Homer', description: 'Server-Startseite', placeholder: 'http://homer.local:8080' },
];
const LinksContext = createContext({ links: {}, saveLinks: async () => {} });
export function LinksProvider({ children }) {
const [links, setLinks] = useState({});
useEffect(() => {
api('GET', '/api/links').then(setLinks).catch(() => {});
}, []);
const saveLinks = useCallback(async (values) => {
const updated = await api('PUT', '/api/links', values);
setLinks(updated);
return updated;
}, []);
return <LinksContext.Provider value={{ links, saveLinks }}>{children}</LinksContext.Provider>;
}
export const useLinks = () => useContext(LinksContext);