From 4de6331551ee485b4494eb830f2fcadfdff8e5a9 Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Fri, 17 Oct 2025 13:37:59 +0200 Subject: [PATCH] Fix branding window defaulting everything to black --- svelte/src/filesystem/edit_window/Branding.ts | 58 +++++++++---------- .../edit_window/BrandingOptions.svelte | 35 +++++------ .../filesystem/edit_window/EditWindow.svelte | 16 ++--- 3 files changed, 51 insertions(+), 58 deletions(-) diff --git a/svelte/src/filesystem/edit_window/Branding.ts b/svelte/src/filesystem/edit_window/Branding.ts index 461b3c0..cc1ba37 100644 --- a/svelte/src/filesystem/edit_window/Branding.ts +++ b/svelte/src/filesystem/edit_window/Branding.ts @@ -5,36 +5,36 @@ import rgb2hex from "pure-color/convert/rgb2hex"; import type { FSNode, FSNodeProperties } from "lib/FilesystemAPI.svelte"; type Style = { - input_background: string, - input_hover_background: string, - input_text: string, - highlight_color: string, - highlight_background: string, - highlight_text_color: string, - link_color: string, - danger_color: string, - danger_text_color: string, - background_color: string, - background: string, - background_text_color: string, - background_pattern_color: string, - body_color: string, - body_background: string, - body_text_color: string, - shaded_background: string, - separator: string, - shadow_color: string, - card_color: string, - background_image: string, - background_image_size: string, - background_image_position: string, - background_image_repeat: string, + input_background?: string, + input_hover_background?: string, + input_text?: string, + highlight_color?: string, + highlight_background?: string, + highlight_text_color?: string, + link_color?: string, + danger_color?: string, + danger_text_color?: string, + background_color?: string, + background?: string, + background_text_color?: string, + background_pattern_color?: string, + body_color?: string, + body_background?: string, + body_text_color?: string, + shaded_background?: string, + separator?: string, + shadow_color?: string, + card_color?: string, + background_image?: string, + background_image_size?: string, + background_image_position?: string, + background_image_repeat?: string, } // Generate a branding style from a file's properties map export const branding_from_path = (path: Array) => { - let style =