Kritische Bugfixes: Export/CA-Download (Service-Worker), Speichern-Bug bei Diensten/Lesezeichen, Dark-Mode-Direktlink, Favicon-Mixed-Content-Proxy, Live-Update Zuletzt-besucht, Kategorie-Farb-Picker, Startseite-Nav

This commit is contained in:
2026-07-20 13:02:58 +02:00
parent 96cf29fef4
commit cc4b285aea
13 changed files with 286 additions and 65 deletions

View File

@@ -27,7 +27,8 @@ async function patchService(id: string, patch: ServicePatch): Promise<Service> {
body: JSON.stringify(patch),
});
if (!res.ok) {
throw new Error(`Dienst konnte nicht aktualisiert werden (HTTP ${res.status})`);
const body = await res.json().catch(() => ({}));
throw new Error(body.error ?? `Dienst konnte nicht aktualisiert werden (HTTP ${res.status})`);
}
return res.json();
}
@@ -218,13 +219,16 @@ function EditForm({ service, onDone }: { service: Service; onDone: () => void })
Öffnet: <span className="font-mono">{previewUrl}</span>
</div>
<div className="flex w-full gap-2 pt-1">
<div className="flex w-full items-center gap-2 pt-1">
<Button size="sm" variant="primary" onClick={() => mutation.mutate()} disabled={mutation.isPending}>
Speichern
</Button>
<Button size="sm" variant="ghost" onClick={onDone}>
Abbrechen
</Button>
{mutation.isError ? (
<span className="text-xs text-red-500">{(mutation.error as Error).message}</span>
) : null}
</div>
</div>
</td>