From aca7233dd4028192dd549ebb16ee9bbb99ee9749 Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Sat, 22 Mar 2025 00:11:10 +0100 Subject: [PATCH] feat(ui): improve visual appearance of repo units settings (#3299) --- templates/repo/settings/units/overview.tmpl | 60 ++++++++------------- web_src/css/form.css | 12 +++++ 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/templates/repo/settings/units/overview.tmpl b/templates/repo/settings/units/overview.tmpl index a851c66d5a..54ee6f1868 100644 --- a/templates/repo/settings/units/overview.tmpl +++ b/templates/repo/settings/units/overview.tmpl @@ -1,57 +1,43 @@

{{ctx.Locale.Tr "repo.settings.units.overview"}}

-
+ +
{{$isCodeEnabled := .Repository.UnitEnabled $.Context $.UnitTypeCode}} {{$isCodeGlobalDisabled := .UnitTypeCode.UnitGlobalDisabled}} -
- -
- - -
-
+ {{$isProjectsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeProjects}} {{$isProjectsGlobalDisabled := .UnitTypeProjects.UnitGlobalDisabled}} -
- -
- - -
-
+ {{$isReleasesEnabled := .Repository.UnitEnabled $.Context $.UnitTypeReleases}} {{$isReleasesGlobalDisabled := .UnitTypeReleases.UnitGlobalDisabled}} -
- -
- - -
-
+ {{$isPackagesEnabled := .Repository.UnitEnabled $.Context $.UnitTypePackages}} {{$isPackagesGlobalDisabled := .UnitTypePackages.UnitGlobalDisabled}} -
- -
- - -
-
+ {{if .EnableActions}} {{$isActionsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeActions}} {{$isActionsGlobalDisabled := .UnitTypeActions.UnitGlobalDisabled}} -
- -
- - -
-
+ {{end}}
@@ -59,4 +45,4 @@
-
+ diff --git a/web_src/css/form.css b/web_src/css/form.css index 916d76fd0c..d38a85f5db 100644 --- a/web_src/css/form.css +++ b/web_src/css/form.css @@ -49,9 +49,21 @@ fieldset label > input[type="checkbox"], fieldset label > input[type="radio"] { margin-right: 0.75em; margin-top: 0 !important; + position: relative; + top: 2px; vertical-align: initial !important; /* overrides a semantic.css rule, remove when obsolete */ } +fieldset label:has(input[type="checkbox"]), +fieldset label:has(input[type="radio"]) { + margin-bottom: 0.5rem !important; +} + +fieldset label:has(input[type="checkbox"]) .help, +fieldset label:has(input[type="radio"]) .help { + margin-left: calc(var(--checkbox-size) + 0.75em); +} + @media (min-width: 768px) { .optionmatrix input[type="radio"] { margin: 0;