From 21fbee150315f3d07032e89b449674547b6682a3 Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Mon, 4 Jan 2021 13:18:12 +0100 Subject: [PATCH] Various UI fixes (#14239) * Fix #14238 * Fix #14235 * Fix #14237 * Fix #14234 * Use octicon to show private status of repo in admin dashboard * Fix #14232 * Fix #14236 --- templates/admin/repo/list.tmpl | 9 ++++++--- templates/explore/organizations.tmpl | 2 +- templates/user/settings/grants_oauth2.tmpl | 4 +++- web_src/less/_base.less | 5 ++++- web_src/less/_dashboard.less | 1 + web_src/less/_repository.less | 18 ++++++++++++++++-- 6 files changed, 31 insertions(+), 8 deletions(-) diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index 5f8db35853..17a6871b3a 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -22,7 +22,6 @@ {{.i18n.Tr "admin.repos.name"}} {{SortArrow "alphabetically" "reversealphabetically" $.SortType false}} - {{.i18n.Tr "admin.repos.private"}} {{.i18n.Tr "admin.repos.watches"}} {{.i18n.Tr "admin.repos.stars"}} @@ -51,8 +50,12 @@ {{svg "octicon-lock"}} {{end}} - {{.Name}} - {{if .IsPrivate}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} + + {{.Name}} + {{if .IsPrivate}} + {{svg "octicon-lock"}} + {{end}} + {{.NumWatches}} {{.NumStars}} {{.NumForks}} diff --git a/templates/explore/organizations.tmpl b/templates/explore/organizations.tmpl index 8785ac84db..b039c1ad2a 100644 --- a/templates/explore/organizations.tmpl +++ b/templates/explore/organizations.tmpl @@ -12,7 +12,7 @@ {{.Name}} {{.FullName}} {{if .Visibility.IsPrivate}} - {{svg "octicon-lock"}} + {{$.i18n.Tr "repo.desc.private"}} {{end}}
diff --git a/templates/user/settings/grants_oauth2.tmpl b/templates/user/settings/grants_oauth2.tmpl index 0b635ae0a9..cf24252ede 100644 --- a/templates/user/settings/grants_oauth2.tmpl +++ b/templates/user/settings/grants_oauth2.tmpl @@ -15,7 +15,9 @@ {{$.i18n.Tr "settings.revoke_key"}}
- {{svg "octicon-key"}} +
+ {{svg "octicon-key"}} +
{{$grant.Application.Name}}
diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 9ae13b8c01..10786b9058 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1556,10 +1556,13 @@ a.ui.label:hover { .ui.button { background: var(--color-button); border: 1px solid var(--color-light-border); - box-shadow: none !important; color: var(--color-text); } +.page-content .ui.button { + box-shadow: none !important; +} + .ui.button:hover { background: var(--color-hover); color: var(--color-text); diff --git a/web_src/less/_dashboard.less b/web_src/less/_dashboard.less index 1330b04abb..4ffdc9136f 100644 --- a/web_src/less/_dashboard.less +++ b/web_src/less/_dashboard.less @@ -111,6 +111,7 @@ .issue.title { width: 80%; + margin: 0 0 1em; } .push.news .content ul { diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index b19eec58eb..6c7de75075 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -1475,7 +1475,7 @@ } } - .diff-box .header { + .diff-box .header:not(.resolved-placeholder) { display: flex; align-items: center; @@ -1493,6 +1493,15 @@ } } + .diff-box .resolved-placeholder { + display: flex; + align-items: center; + + .button { + padding: 8px 12px; + } + } + .diff-file-box { margin-top: 1rem; margin-bottom: 1rem; @@ -2697,7 +2706,12 @@ tbody.commit-list { .commit-body { white-space: pre-wrap; - margin: 0; +} + +.repository:not(.diff) { + .commit-body { + margin: 0; + } } .git-notes.top {