From 63ee6783b83669735c22fd3878f01ad36711ca05 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 6 Jul 2025 00:01:53 +0800 Subject: [PATCH] Refactor "delete-button" to "link-action" (#34962) --- templates/admin/auth/edit.tmpl | 17 ++++------------- templates/admin/packages/list.tmpl | 19 +++++++++++-------- templates/admin/repo/list.tmpl | 19 +++++++++++-------- templates/projects/list.tmpl | 13 ++++--------- templates/repo/issue/milestones.tmpl | 14 +++++--------- templates/repo/release/new.tmpl | 14 +++++--------- templates/repo/settings/branches.tmpl | 15 +++++---------- templates/repo/settings/collaboration.tmpl | 15 +++++---------- templates/repo/settings/deploy_keys.tmpl | 13 ++++--------- templates/repo/wiki/view.tmpl | 13 ++++--------- web_src/js/features/common-button.ts | 5 +++-- 11 files changed, 61 insertions(+), 96 deletions(-) diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 91b84e13b6..781f514af4 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -408,7 +408,10 @@
- +
@@ -424,16 +427,4 @@

{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}}

- - - {{template "admin/layout_footer" .}} diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index 985caf6bdf..4817f2681b 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -72,7 +72,12 @@ {{FileSize .CalculateBlobSize}} {{DateUtils.AbsoluteShort .Version.CreatedUnix}} - {{svg "octicon-trash"}} + + {{svg "octicon-trash"}} + {{else}} {{ctx.Locale.Tr "no_results_found"}} @@ -84,15 +89,13 @@ {{template "base/paginate" .}} - + {{template "admin/layout_footer" .}} diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index ce08d49656..2ad2de3a1d 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -84,7 +84,12 @@ {{FileSize .LFSSize}} {{DateUtils.AbsoluteShort .UpdatedUnix}} {{DateUtils.AbsoluteShort .CreatedUnix}} - {{svg "octicon-trash"}} + + {{svg "octicon-trash"}} + {{else}} {{ctx.Locale.Tr "no_results_found"}} @@ -96,17 +101,15 @@ {{template "base/paginate" .}} - + {{template "admin/layout_footer" .}} diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl index f6d549a634..e769543f6a 100644 --- a/templates/projects/list.tmpl +++ b/templates/projects/list.tmpl @@ -67,7 +67,7 @@ {{else}} {{svg "octicon-skip" 14}}{{ctx.Locale.Tr "repo.projects.close"}} {{end}} - {{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}} + {{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}} {{end}} @@ -81,14 +81,9 @@ {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} - {{end}} @@ -92,15 +92,11 @@ {{if or .CanWriteIssues .CanWritePulls}} - {{if .PageIsEditRelease}} -
- {{ctx.Locale.Tr "repo.settings.edit_protected_branch"}} -
@@ -65,14 +65,9 @@ {{end}} - - @@ -95,7 +95,7 @@ {{if $allowedToChangeTeams}}
-
@@ -123,14 +123,9 @@ {{end}} -
-
@@ -72,14 +72,9 @@ - @@ -96,14 +96,9 @@ -