diff --git a/src/core/ui/app-grid.templ.bak b/src/core/ui/app-grid.templ.bak new file mode 100644 index 0000000..da441bf --- /dev/null +++ b/src/core/ui/app-grid.templ.bak @@ -0,0 +1,121 @@ +package ui + +// AppTile represents an app on the workspace launcher. +type AppTile struct { + Name string + Description string + URL string + Icon string // SVG inline + Color string // Background color + Status string // "ready" or "coming-soon" + AdminOnly bool // Only visible to admin role +} + +// DefaultApps returns apps filtered by user role. +func DefaultApps(role string) []AppTile { + all := []AppTile{ + { + Name: "Admin Panel", Description: "Users, groups & settings", + URL: "/admin", Color: "#9333ea", + Icon: ``, + Status: "ready", AdminOnly: true, + }, + { + Name: "Files", Description: "Storage & sharing", + URL: "#", Color: "#2563eb", + Icon: ``, + Status: "coming-soon", + }, + { + Name: "Mail", Description: "Email client", + URL: "#", Color: "#dc2626", + Icon: ``, + Status: "coming-soon", + }, + { + Name: "Calendar", Description: "Schedule & events", + URL: "#", Color: "#059669", + Icon: ``, + Status: "coming-soon", + }, + { + Name: "WorkSheets", Description: "Spreadsheets", + URL: "/worksheets", Color: "#059669", + Icon: ``, + Status: "coming-soon", + }, + { + Name: "TypeWriter", Description: "Documents", + URL: "/typewriter", Color: "#2563eb", + Icon: ``, + Status: "coming-soon", + }, + { + Name: "DeckCreator", Description: "Presentations", + URL: "/deckcreator", Color: "#dc2626", + Icon: ``, + Status: "coming-soon", + }, + { + Name: "NotesFiles", Description: "Notes & files", + URL: "/notesfiles", Color: "#d97706", + Icon: ``, + Status: "coming-soon", + }, + { + Name: "Contacts", Description: "People & directory", + URL: "#", Color: "#d97706", + Icon: ``, + Status: "coming-soon", + }, + { + Name: "Tasks", Description: "Project management", + URL: "#", Color: "#7c3aed", + Icon: ``, + Status: "coming-soon", + }, + { + Name: "Chat", Description: "Team messaging", + URL: "#", Color: "#db2777", + Icon: ``, + Status: "coming-soon", + }, + } + + // Filter by role + filtered := make([]AppTile, 0, len(all)) + for _, a := range all { + if a.AdminOnly && role != "admin" { + continue + } + filtered = append(filtered, a) + } + return filtered +} + +templ AppGrid(apps []AppTile) { +