From f20cfc291ce40013fe88be412f97f7c58ac5a3a6 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 26 Jul 2023 00:58:48 -0400 Subject: [PATCH] Fix LFS object list style (#26133) (#26147) Backport #26133 by @wxiaoguang Close #26104 . Only a quick fix, the UI is not perfect. Before:
![image](https://github.com/go-gitea/gitea/assets/2114189/7b10d42d-8317-4d99-80f9-b6c5fe05c17e) ![image](https://github.com/go-gitea/gitea/assets/2114189/b43f1242-61a0-45e3-98b7-aa74b29f3813)
After:
![image](https://github.com/go-gitea/gitea/assets/2114189/a8d27f70-781d-4702-866f-a56df6dd6c0a) ![image](https://github.com/go-gitea/gitea/assets/2114189/379274e7-c67b-4c11-9cee-28a298b4ff5a)
Co-authored-by: wxiaoguang (cherry picked from commit 0f73be0ae3247deb1881f1ded9f8b2e55e46e233) --- templates/repo/settings/lfs.tmpl | 8 +++--- templates/repo/settings/lfs_pointers.tmpl | 30 ++++++++--------------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/templates/repo/settings/lfs.tmpl b/templates/repo/settings/lfs.tmpl index 4d469a364e..0d3a618e8d 100644 --- a/templates/repo/settings/lfs.tmpl +++ b/templates/repo/settings/lfs.tmpl @@ -12,11 +12,9 @@ {{range .LFSFiles}} - - - {{ShortSha .Oid}} - - + + {{ShortSha .Oid}} + {{FileSize .Size}} {{TimeSince .CreatedUnix.AsTime $.locale}} diff --git a/templates/repo/settings/lfs_pointers.tmpl b/templates/repo/settings/lfs_pointers.tmpl index 5f0cf3164d..0fffdadc3f 100644 --- a/templates/repo/settings/lfs_pointers.tmpl +++ b/templates/repo/settings/lfs_pointers.tmpl @@ -22,41 +22,31 @@ {{.locale.Tr "repo.settings.lfs_pointers.sha"}} {{.locale.Tr "repo.settings.lfs_pointers.oid"}} - {{.locale.Tr "repo.settings.lfs_pointers.inRepo"}} {{.locale.Tr "repo.settings.lfs_pointers.exists"}} {{.locale.Tr "repo.settings.lfs_pointers.accessible"}} + {{range .Pointers}} - - - {{ShortSha .SHA}} - - + + {{ShortSha .SHA}} + - - {{if and .Exists .InRepo}} - - {{ShortSha .Oid}} - - {{else}} - - {{end}} - - - - {{$.locale.Tr "repo.settings.lfs_findcommits"}} + + {{ShortSha .Oid}} + {{if .InRepo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} {{if .Exists}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} {{if .Accessible}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} + + {{$.locale.Tr "repo.settings.lfs_findcommits"}} + {{end}}