From a12d860523a64265c387c7383aa5fcbdf1b6ee0a Mon Sep 17 00:00:00 2001 From: cclohmar Date: Sun, 14 Jun 2026 18:50:41 +0000 Subject: [PATCH] fix(ui): data-url attribute for app cards, openApp reads URL --- src/core/ui/app-grid.templ | 6 +++--- src/core/ui/app-grid_templ.go | 33 +++++++++++++++++++++++---------- src/core/ui/launcher.templ | 2 +- src/core/ui/launcher_templ.go | 2 +- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/core/ui/app-grid.templ b/src/core/ui/app-grid.templ index 9eea2ed..e01f6c1 100644 --- a/src/core/ui/app-grid.templ +++ b/src/core/ui/app-grid.templ @@ -93,9 +93,9 @@ templ appTile(a AppTile) {
{ a.Name }
Coming Soon
- } else { -
diff --git a/src/core/ui/app-grid_templ.go b/src/core/ui/app-grid_templ.go index 065f886..d538077 100644 --- a/src/core/ui/app-grid_templ.go +++ b/src/core/ui/app-grid_templ.go @@ -183,20 +183,33 @@ func appTile(a AppTile) templ.Component { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\" onclick=\"openApp.call(this)\" oncontextmenu=\"return false\" ontouchstart=\"startLongPress(event)\" ontouchend=\"cancelLongPress()\" onmousedown=\"startLongPress(event)\" onmouseup=\"cancelLongPress()\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -204,20 +217,20 @@ func appTile(a AppTile) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var6 string - templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name) + var templ_7745c5c3_Var7 string + templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name) if templ_7745c5c3_Err != nil { return templ.Error{Err: templ_7745c5c3_Err, FileName: `core/ui/app-grid.templ`, Line: 103, Col: 33} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "
Available
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "
Available
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/src/core/ui/launcher.templ b/src/core/ui/launcher.templ index 85b7634..82287ab 100644 --- a/src/core/ui/launcher.templ +++ b/src/core/ui/launcher.templ @@ -285,7 +285,7 @@ templ launcherJS() { let longPressTimer = null; let currentUrl = null; - function openApp(url) { + function openApp(url) { window.open(url, "_blank"); } function openAppEl() { window.open(url, '_blank'); } diff --git a/src/core/ui/launcher_templ.go b/src/core/ui/launcher_templ.go index 84b86ff..195054c 100644 --- a/src/core/ui/launcher_templ.go +++ b/src/core/ui/launcher_templ.go @@ -425,7 +425,7 @@ func launcherJS() templ.Component { templ_7745c5c3_Var20 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }