From 9527eb0ee46991c90a25d0d5951ae6cedc151282 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Sun, 14 Jun 2026 18:02:49 +0000 Subject: [PATCH] fix(ui): use @ syntax for component calls, fix CSS/JS not rendering --- src/core/ui/launcher.templ | 4 ++-- src/core/ui/launcher_templ.go | 36 +++++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/core/ui/launcher.templ b/src/core/ui/launcher.templ index 6d90811..a7eed3c 100644 --- a/src/core/ui/launcher.templ +++ b/src/core/ui/launcher.templ @@ -14,7 +14,7 @@ templ LauncherPage(userName string, role string, apps []AppTile) { - + @workspaceCSS()
@@ -41,7 +41,7 @@ templ LauncherPage(userName string, role string, apps []AppTile) {
- + } diff --git a/src/core/ui/launcher_templ.go b/src/core/ui/launcher_templ.go index 9c9dbdc..0d0072b 100644 --- a/src/core/ui/launcher_templ.go +++ b/src/core/ui/launcher_templ.go @@ -31,7 +31,15 @@ func LauncherPage(userName string, role string, apps []AppTile) templ.Component templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Next Workspace
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Next Workspace") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = workspaceCSS().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -39,7 +47,7 @@ func LauncherPage(userName string, role string, apps []AppTile) templ.Component if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -51,7 +59,7 @@ func LauncherPage(userName string, role string, apps []AppTile) templ.Component if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
NextWks v") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
NextWks v") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -64,7 +72,7 @@ func LauncherPage(userName string, role string, apps []AppTile) templ.Component if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "

Install Next Workspace

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "

Install Next Workspace

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -72,7 +80,7 @@ func LauncherPage(userName string, role string, apps []AppTile) templ.Component if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -101,7 +109,7 @@ func greetingSection(userName string) templ.Component { templ_7745c5c3_Var3 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -114,7 +122,7 @@ func greetingSection(userName string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "

Good ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "

Good ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -127,7 +135,7 @@ func greetingSection(userName string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, ", ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, ", ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -140,7 +148,7 @@ func greetingSection(userName string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "

Your workspace is ready

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "

Your workspace is ready

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -169,7 +177,7 @@ func topBar(userName string, role string) templ.Component { templ_7745c5c3_Var7 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "
N
NextWks
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "
N
NextWks
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -182,7 +190,7 @@ func topBar(userName string, role string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -211,7 +219,7 @@ func workspaceCSS() templ.Component { templ_7745c5c3_Var9 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -262,7 +270,7 @@ func pwaInstructions() templ.Component { templ_7745c5c3_Var10 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "

Desktop Chrome/Edge

  1. Click the icon in the address bar
  2. Click Install

iOS Safari

  1. Tap Share
  2. Tap Add to Home Screen

Android Chrome

  1. Tap menu
  2. Tap Install app
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "

Desktop Chrome/Edge

  1. Click the icon in the address bar
  2. Click Install

iOS Safari

  1. Tap Share
  2. Tap Add to Home Screen

Android Chrome

  1. Tap menu
  2. Tap Install app
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -292,7 +300,7 @@ func launcherJS() templ.Component { templ_7745c5c3_Var11 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }