feat: add space account page

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
juancwu 2026-04-22 03:44:04 +00:00
commit d747454f4a
8 changed files with 169 additions and 2 deletions

View file

@ -3,15 +3,17 @@ package blocks
import "github.com/shopspring/decimal"
import "strings"
import "git.juancwu.dev/juancwu/budgit/internal/ui/components/icon"
import "git.juancwu.dev/juancwu/budgit/internal/routeurl"
type AccountCardInfo struct {
SpaceID string
ID string
Name string
Balance decimal.Decimal
}
templ AccountCard(info AccountCardInfo) {
<div class="px-2 py-2 block rounded-md hover:bg-sidebar-accent">
<a href={ routeurl.URL("page.app.spaces.space.accounts.account.overview", "spaceID", info.SpaceID, "accountID", info.ID) } class="px-2 py-2 block rounded-md hover:bg-sidebar-accent">
<div class="flex items-center justify-between">
<div class="flex gap-4 items-center">
<div class="w-10 h-10 shrink-0 overflow-hidden rounded-md bg-muted flex items-center justify-center">
@ -28,5 +30,5 @@ templ AccountCard(info AccountCardInfo) {
@icon.ChevronRight()
</div>
</div>
</div>
</a>
}