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

@@ -46,7 +46,18 @@ export type ServiceCreateInput = z.infer<typeof ServiceCreateSchema>;
export const ServiceUpdateSchema = ServiceCreateSchema.omit({
deviceId: true,
}).partial();
})
.partial()
.extend({
// Frontend schickt beim Leeren eines Felds bewusst null (nicht nur
// "Feld weglassen") - .partial() allein akzeptiert dafür nur
// string|undefined, ein PATCH mit category:null schlug daher bisher mit
// 400 fehl, ohne dass das Formular das sichtbar gemacht hätte.
category: z.string().nullable().optional(),
description: z.string().nullable().optional(),
icon: z.string().nullable().optional(),
favicon: z.string().nullable().optional(),
});
export type ServiceUpdateInput = z.infer<typeof ServiceUpdateSchema>;
/** Für Drag & Drop: neue Reihenfolge mehrerer Dienste auf einmal setzen. */
@@ -98,7 +109,14 @@ export const BookmarkCreateSchema = z.object({
});
export type BookmarkCreateInput = z.infer<typeof BookmarkCreateSchema>;
export const BookmarkUpdateSchema = BookmarkCreateSchema.partial();
export const BookmarkUpdateSchema = BookmarkCreateSchema.partial().extend({
// Siehe Kommentar bei ServiceUpdateSchema: null muss erlaubt sein, damit
// sich Kategorie/Beschreibung/Icons im Bearbeiten-Formular leeren lassen.
category: z.string().nullable().optional(),
description: z.string().nullable().optional(),
icon: z.string().nullable().optional(),
favicon: z.string().nullable().optional(),
});
export type BookmarkUpdateInput = z.infer<typeof BookmarkUpdateSchema>;
/** Für Drag & Drop: neue Reihenfolge mehrerer Lesezeichen auf einmal setzen. */