From 662db4a69c3b78022efcd189f6f32d271f40be04 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 30 Jun 2025 10:15:39 +0800 Subject: [PATCH] Improve tags list page (#34898) --- templates/repo/tag/list.tmpl | 85 ++++++++++------------ web_src/css/repo/release-tag.css | 4 - web_src/js/features/common-fetch-action.ts | 42 +++++++---- web_src/js/features/comp/ConfirmModal.ts | 35 +++++---- 4 files changed, 90 insertions(+), 76 deletions(-) diff --git a/templates/repo/tag/list.tmpl b/templates/repo/tag/list.tmpl index 9789943b49..8b33b96f86 100644 --- a/templates/repo/tag/list.tmpl +++ b/templates/repo/tag/list.tmpl @@ -5,9 +5,7 @@ {{template "base/alert" .}} {{template "repo/release_tag_header" .}}

-
- {{.TagCount}} {{ctx.Locale.Tr "repo.release.tags"}} -
+ {{.TagCount}} {{ctx.Locale.Tr "repo.release.tags"}}

{{$canReadReleases := $.Permission.CanRead ctx.Consts.RepoUnitTypeReleases}}
@@ -15,53 +13,49 @@ {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.tag_kind") "Tooltip" (ctx.Locale.Tr "search.tag_tooltip")}}
-
+
{{if .Releases}} - - - {{range $idx, $release := .Releases}} - - - - {{end}} - -
-

- {{if $canReadReleases}} - {{.TagName}} - {{else}} - {{.TagName}} - {{end}} -

-
- {{if $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}} - {{if .CreatedUnix}} - {{svg "octicon-clock" 16 "tw-mr-1"}}{{DateUtils.TimeSince .CreatedUnix}} - {{end}} +
+ {{range $idx, $release := .Releases}} +
+

+ {{if $canReadReleases}} + {{.TagName}} + {{else}} + {{.TagName}} + {{end}} +

+ -
+ {{if and $canReadReleases (not $release.IsTag)}} + {{svg "octicon-tag"}}{{ctx.Locale.Tr "repo.release.detail"}} + {{end}} + {{end}} +
+
+ {{end}} + {{else}} {{if .NumTags}}

{{ctx.Locale.Tr "no_results_found"}}

@@ -73,9 +67,8 @@ {{if $.Permission.CanWrite ctx.Consts.RepoUnitTypeCode}} -