chore: streamline root validation and app loading (#635)

This commit is contained in:
Daniel Volz
2026-05-16 20:45:26 +02:00
committed by GitHub
parent 2f5fc2d9e9
commit 545793fdd2
14 changed files with 159 additions and 37 deletions
+1 -3
View File
@@ -140,8 +140,6 @@ const settingsSchemaBase = z.object({
shareMedicationOverview: z.boolean().default(false),
});
const exportSettingsSchema = settingsSchemaBase.optional();
const importSettingsSchema = settingsSchemaBase
.extend({
// Accept the removed field from legacy exports so old backups still import,
@@ -297,7 +295,7 @@ function imageToBase64(imageUrl: string | null): string | null {
// Save base64 image to file and return filename
function base64ToImage(base64: string, medicationId: number): string | null {
if (!base64 || !base64.startsWith("data:")) return null;
if (!base64.startsWith("data:")) return null;
try {
// Parse data URL: "data:image/jpeg;base64,/9j/4AAQ..."