package ui
import appver "git.lohmar.co.uk/lexton-it/NextWks/core/version"
templ LauncherPage(userName string, role string, apps []AppTile) {
Next Workspace
@topBar(userName, role)
@greetingSection(userName)
@AppGrid(apps)
Install Next Workspace
@pwaInstructions()
}
templ greetingSection(userName string) {
{ initials(userName) }
Good { timeOfDay() }, { userName }
Your workspace is ready
}
templ topBar(userName string, role string) {
}
templ workspaceCSS() {
}
// --- Helpers ---
func version() string {
return appver.Version
}
func initials(name string) string {
if name == "" { return "?" }
if len(name) == 1 { return name }
return string(name[0])
}
func timeOfDay() string {
// Simple: always show "morning" for now
return "morning"
}
// --- PWA Instructions ---
templ pwaInstructions() {
Desktop Chrome/Edge
- Click the
⊕ icon in the address bar
- Click Install
iOS Safari
- Tap Share
⎋
- Tap Add to Home Screen
Android Chrome
- Tap ⋮ menu
- Tap Install app
}
// --- JavaScript ---
templ launcherJS() {
}