From ecb925f510e87088ccea132b1d4de651ed749b4f Mon Sep 17 00:00:00 2001 From: Pepe44DEV Date: Sat, 30 May 2026 20:01:56 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20homelab=20save=20erstellt=20parent=20dir?= =?UTF-8?q?=20via=20mkdir=5Fwith=5Fparents,=20string=20statt=20TextEncoder?= =?UTF-8?q?=20f=C3=BCr=20GLib.file=5Fset=5Fcontents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dotfiles/hypr/ags/homelab.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles/hypr/ags/homelab.tsx b/dotfiles/hypr/ags/homelab.tsx index a08137f..c4a9e55 100644 --- a/dotfiles/hypr/ags/homelab.tsx +++ b/dotfiles/hypr/ags/homelab.tsx @@ -9,10 +9,11 @@ const CONFIG_PATH = GLib.getenv("HOMELAB_CONFIG") || `${GLib.getenv("HOME")}/.co function saveConfig(host: string, user: string, port: string) { const yaml = `# Homelab Configuration\ngenerated_by: Omeron\n\nserver:\n address: "${host}"\n username: "${user}"\n port: ${port}\n\ncontrol_center:\n refresh_interval: 5\n theme: "dark"\n\nfeatures:\n docker: true\n services: true\n storage: true\n network: true\n monitoring: true\n`; - GLib.file_set_contents(CONFIG_PATH, new TextEncoder().encode(yaml)); + GLib.mkdir_with_parents(GLib.path_get_dirname(CONFIG_PATH), 0o755); + GLib.file_set_contents(CONFIG_PATH, yaml); hasConfig = true; const win = app.get_window("homelab-control"); - if (win) win.set_child({authed ? : } as Gtk.Widget); + if (win) win.set_child({!hasConfig ? : (authed ? : )} as Gtk.Widget); } function loadConfig() {