From 9ed3700ad2b373b6fa22f50dbd31ca106e1f82bc Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 26 Jul 2023 10:00:52 +0800 Subject: [PATCH] Fix LFS object list style (#26133) 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)
--- 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}}