diff --git a/dotfiles/hypr/ags/homelab.tsx b/dotfiles/hypr/ags/homelab.tsx
index 768cebc..d7cc88a 100644
--- a/dotfiles/hypr/ags/homelab.tsx
+++ b/dotfiles/hypr/ags/homelab.tsx
@@ -1131,15 +1131,13 @@ function startRefreshTimer() {
}
function SetupView() {
- let hostEntry: Gtk.Entry | null = null;
- let userEntry: Gtk.Entry | null = null;
- let portEntry: Gtk.Entry | null = null;
+ let host = "";
+ let user = "root";
+ let port = "22";
function doSave() {
- if (!hostEntry || !userEntry || !portEntry) return;
- const host = hostEntry.get_text();
if (!host) return;
- saveConfig(host, userEntry.get_text() || "root", portEntry.get_text() || "22");
+ saveConfig(host, user || "root", port || "22");
}
return (
@@ -1149,24 +1147,24 @@ function SetupView() {
{ hostEntry = self; }}
+ onChanged={self => { host = self.text || self.get_text(); }}
+ onActivate={doSave}
placeholderText="Server-Adresse (IP oder Domain)"
hexpand
- onActivate={doSave}
/>
{ userEntry = self; }}
+ onChanged={self => { user = self.text || self.get_text(); }}
+ onActivate={doSave}
placeholderText="SSH-Benutzer"
text="root"
hexpand
- onActivate={doSave}
/>
{ portEntry = self; }}
+ onChanged={self => { port = self.text || self.get_text(); }}
+ onActivate={doSave}
placeholderText="SSH-Port"
text="22"
hexpand
- onActivate={doSave}
/>