chore: differentiate shared with me and personal spaces

This commit is contained in:
juancwu 2026-04-12 16:38:24 +00:00
commit 8747dfe495
2 changed files with 17 additions and 3 deletions

View file

@ -95,6 +95,10 @@ func SetupRoutes(a *app.App) http.Handler {
}) })
}) })
g.SubGroup("/shared-with-me", func(g *router.Group) {
g.Get("", spaceH.SpacesPage).Name("page.app.shared-with-me")
})
g.SubGroup("/settings", func(g *router.Group) { g.SubGroup("/settings", func(g *router.Group) {
g.Get("", settingsH.SettingsPage).Name("page.app.settings") g.Get("", settingsH.SettingsPage).Name("page.app.settings")

View file

@ -50,10 +50,20 @@ templ App(title string) {
@sidebar.MenuButton(sidebar.MenuButtonProps{ @sidebar.MenuButton(sidebar.MenuButtonProps{
Href: routeurl.URL("page.app.spaces"), Href: routeurl.URL("page.app.spaces"),
IsActive: ctxkeys.URLPath(ctx) == routeurl.URL("page.app.spaces"), IsActive: ctxkeys.URLPath(ctx) == routeurl.URL("page.app.spaces"),
Tooltip: "Spaces", Tooltip: "My spaces",
}) { }) {
@icon.House(icon.Props{Class: "size-4"}) @icon.User()
<span>Spaces</span> <span>My spaces</span>
}
}
@sidebar.MenuItem() {
@sidebar.MenuButton(sidebar.MenuButtonProps{
Href: routeurl.URL("page.app.shared-with-me"),
IsActive: ctxkeys.URLPath(ctx) == routeurl.URL("page.app.shared-with-me"),
Tooltip: "Shared with me",
}) {
@icon.Users()
<span>Shared with me</span>
} }
} }
} }