From 4ce63a1d57791c53342ae25049997e2f721cf014 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 29 Jun 2026 21:06:25 +0800 Subject: [PATCH] chore: various UI problems (#38263) 1. fix dirty "list" styles for "githooks" and "webhooks" 2. fix git hook edit page layout 3. fix codemirror editor styles 4. fix incorrect "ui attached header" width --- templates/repo/settings/githook_edit.tmpl | 20 ++++++------ templates/repo/settings/githooks.tmpl | 9 +++--- .../repo/settings/webhook/base_list.tmpl | 11 ++++--- templates/repo/settings/webhook/history.tmpl | 4 +-- web_src/css/admin.css | 6 ---- web_src/css/modules/codeeditor.css | 22 +++++++------ web_src/css/modules/header.css | 2 ++ web_src/css/modules/menu.css | 1 + web_src/css/repo.css | 32 ------------------- web_src/css/repo/file-view.css | 2 -- 10 files changed, 38 insertions(+), 71 deletions(-) diff --git a/templates/repo/settings/githook_edit.tmpl b/templates/repo/settings/githook_edit.tmpl index 07ea7fb4fd..4339443954 100644 --- a/templates/repo/settings/githook_edit.tmpl +++ b/templates/repo/settings/githook_edit.tmpl @@ -8,19 +8,19 @@
-

{{ctx.Locale.Tr "repo.settings.githook_edit_desc"}}

+ {{ctx.Locale.Tr "repo.settings.githook_edit_desc"}} +
+
{{with .Hook}} -
- -
-
-
- -
+ +
{{end}}
+
+ +
{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl index 77aa503a6b..874a4f095d 100644 --- a/templates/repo/settings/githooks.tmpl +++ b/templates/repo/settings/githooks.tmpl @@ -4,13 +4,14 @@ {{ctx.Locale.Tr "repo.settings.githooks"}}
-
-
{{ctx.Locale.Tr "repo.settings.githooks_desc"}}
+
{{ctx.Locale.Tr "repo.settings.githooks_desc"}}
+ {{if .Hooks}}
{{end}} +
{{range .Hooks}} -
+
{{svg "octicon-dot-fill" 22}} {{.Name}} - {{svg "octicon-pencil"}} + {{svg "octicon-pencil"}}
{{end}}
diff --git a/templates/repo/settings/webhook/base_list.tmpl b/templates/repo/settings/webhook/base_list.tmpl index 8c4096ddc5..2725df85e8 100644 --- a/templates/repo/settings/webhook/base_list.tmpl +++ b/templates/repo/settings/webhook/base_list.tmpl @@ -8,17 +8,18 @@
-
-
{{.Description}}
+
{{.Description}}
+ {{if .Webhooks}}
{{end}} +
{{range .Webhooks}} -
+
{{svg "octicon-dot-fill" 22}} - {{svg "octicon-pencil"}} - {{svg "octicon-pencil"}} + {{svg "octicon-trash"}} diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl index 8c31b467d5..d57913042b 100644 --- a/templates/repo/settings/webhook/history.tmpl +++ b/templates/repo/settings/webhook/history.tmpl @@ -14,7 +14,7 @@ {{end}}
-
+
{{range .History}}
@@ -32,7 +32,7 @@ {{DateUtils.TimeSince .Delivered}}
-
+