From d8a12dae68d06ca67b12ce269f889bf316c9ed1e Mon Sep 17 00:00:00 2001 From: "icyphox.sh" Date: Mon, 7 Apr 2025 16:32:22 +0000 Subject: [PATCH] appview: pages: add some kino icons to the repo tabs We should make this optional... --- appview/pages/pages.go | 8 ++++---- appview/pages/templates/layouts/repobase.html | 12 ++++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/appview/pages/pages.go b/appview/pages/pages.go index 747246c2..4c99bfd2 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -292,13 +292,13 @@ func (r RepoInfo) FullNameWithoutAt() string { func (r RepoInfo) GetTabs() [][]string { tabs := [][]string{ - {"overview", "/"}, - {"issues", "/issues"}, - {"pulls", "/pulls"}, + {"overview", "/", "square-chart-gantt"}, + {"issues", "/issues", "circle-dot"}, + {"pulls", "/pulls", "git-pull-request"}, } if r.Roles.SettingsAllowed() { - tabs = append(tabs, []string{"settings", "/settings"}) + tabs = append(tabs, []string{"settings", "/settings", "cog"}) } return tabs diff --git a/appview/pages/templates/layouts/repobase.html b/appview/pages/templates/layouts/repobase.html index edcecff3..e13120f4 100644 --- a/appview/pages/templates/layouts/repobase.html +++ b/appview/pages/templates/layouts/repobase.html @@ -32,6 +32,7 @@ {{ range $item := $tabs }} {{ $key := index $item 0 }} {{ $value := index $item 1 }} + {{ $icon := index $item 2 }} {{ $meta := index $tabmeta $key }} - {{ $key }} - {{ if not (isNil $meta) }} - {{ $meta }} - {{ end }} + + {{ i $icon "w-4 h-4 mr-2" }} + {{ $key }} + {{ if not (isNil $meta) }} + {{ $meta }} + {{ end }} + {{ end }} -- 2.51.2