1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

ui: simplify main-attribute labels

This commit is contained in:
0ko 2024-12-08 16:35:21 +05:00
parent 48131547a1
commit 6e729b6179
7 changed files with 21 additions and 21 deletions

View file

@ -13,20 +13,20 @@
<a class="text primary name" href="{{.Link}}">{{.Name}}</a> <a class="text primary name" href="{{.Link}}">{{.Name}}</a>
<span class="label-list"> <span class="label-list">
{{if .IsArchived}} {{if .IsArchived}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span> <span class="ui label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
{{end}} {{end}}
{{if .IsPrivate}} {{if .IsPrivate}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span> <span class="ui label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
{{else}} {{else}}
{{if .Owner.Visibility.IsPrivate}} {{if .Owner.Visibility.IsPrivate}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span> <span class="ui label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
{{end}} {{end}}
{{end}} {{end}}
{{if .IsTemplate}} {{if .IsTemplate}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span> <span class="ui label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
{{end}} {{end}}
{{if eq .ObjectFormatName "sha256"}} {{if eq .ObjectFormatName "sha256"}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span> <span class="ui label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
{{end}} {{end}}
</span> </span>
</div> </div>

View file

@ -8,7 +8,7 @@
<div class="flex-item-title"> <div class="flex-item-title">
{{template "shared/user/name" .}} {{template "shared/user/name" .}}
{{if .Visibility.IsPrivate}} {{if .Visibility.IsPrivate}}
<span class="ui basic tiny label">{{ctx.Locale.Tr "repo.desc.private"}}</span> <span class="ui label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
{{end}} {{end}}
</div> </div>
<div class="flex-item-body"> <div class="flex-item-body">

View file

@ -5,8 +5,8 @@
<div class="org-title"> <div class="org-title">
{{.Org.DisplayName}} {{.Org.DisplayName}}
<span class="org-visibility"> <span class="org-visibility">
{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}} {{if .Org.Visibility.IsLimited}}<span class="ui large horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
{{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}} {{if .Org.Visibility.IsPrivate}}<span class="ui large horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
</span> </span>
</div> </div>
<span class="tw-flex tw-items-center button-row tw-ml-auto tw-text-16 tw-whitespace-nowrap"> <span class="tw-flex tw-items-center button-row tw-ml-auto tw-text-16 tw-whitespace-nowrap">

View file

@ -15,7 +15,7 @@
<div class="flex-item-title"> <div class="flex-item-title">
{{template "shared/user/name" .}} {{template "shared/user/name" .}}
{{if not $isPublic}} {{if not $isPublic}}
<span class="ui basic tiny label">{{ctx.Locale.Tr "org.members.private"}}</span> <span class="ui label">{{ctx.Locale.Tr "org.members.private"}}</span>
{{end}} {{end}}
</div> </div>
{{if not $.PublicOnly}} {{if not $.PublicOnly}}

View file

@ -13,24 +13,24 @@
</div> </div>
<div class="flex-item-trailing"> <div class="flex-item-trailing">
{{if .IsArchived}} {{if .IsArchived}}
<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.archived"}}</span> <span class="ui label not-mobile">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
<div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.archived"}}">{{svg "octicon-archive" 18}}</div> <div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.archived"}}">{{svg "octicon-archive" 18}}</div>
{{end}} {{end}}
{{if .IsPrivate}} {{if .IsPrivate}}
<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.private"}}</span> <span class="ui label not-mobile">{{ctx.Locale.Tr "repo.desc.private"}}</span>
<div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.private"}}">{{svg "octicon-lock" 18}}</div> <div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.private"}}">{{svg "octicon-lock" 18}}</div>
{{else}} {{else}}
{{if .Owner.Visibility.IsPrivate}} {{if .Owner.Visibility.IsPrivate}}
<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.internal"}}</span> <span class="ui label not-mobile">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
<div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.internal"}}">{{svg "octicon-shield-lock" 18}}</div> <div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.internal"}}">{{svg "octicon-shield-lock" 18}}</div>
{{end}} {{end}}
{{end}} {{end}}
{{if .IsTemplate}} {{if .IsTemplate}}
<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.template"}}</span> <span class="ui label not-mobile">{{ctx.Locale.Tr "repo.desc.template"}}</span>
<div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div> <div class="repo-icon only-mobile" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div>
{{end}} {{end}}
{{if eq .ObjectFormatName "sha256"}} {{if eq .ObjectFormatName "sha256"}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span> <span class="ui label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
{{end}} {{end}}
</div> </div>
</div> </div>

View file

@ -6,8 +6,8 @@
{{ctx.AvatarUtils.Avatar .ContextUser}} {{ctx.AvatarUtils.Avatar .ContextUser}}
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span> <span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
<span class="org-visibility"> <span class="org-visibility">
{{if .ContextUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} {{if .ContextUser.Visibility.IsLimited}}<div class="ui horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
{{if .ContextUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} {{if .ContextUser.Visibility.IsPrivate}}<div class="ui horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span> </span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span> </span>
@ -20,8 +20,8 @@
{{ctx.AvatarUtils.Avatar .SignedUser}} {{ctx.AvatarUtils.Avatar .SignedUser}}
<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span> <span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
<span class="org-visibility"> <span class="org-visibility">
{{if .SignedUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} {{if .SignedUser.Visibility.IsLimited}}<div class="ui horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
{{if .SignedUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} {{if .SignedUser.Visibility.IsPrivate}}<div class="ui horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span> </span>
</a> </a>
{{range .Orgs}} {{range .Orgs}}
@ -29,8 +29,8 @@
{{ctx.AvatarUtils.Avatar .}} {{ctx.AvatarUtils.Avatar .}}
<span class="truncated-item-name">{{.ShortName 40}}</span> <span class="truncated-item-name">{{.ShortName 40}}</span>
<span class="org-visibility"> <span class="org-visibility">
{{if .Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} {{if .Visibility.IsLimited}}<div class="ui horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
{{if .Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} {{if .Visibility.IsPrivate}}<div class="ui horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span> </span>
</a> </a>
{{end}} {{end}}

View file

@ -269,7 +269,7 @@
--color-nav-text: var(--color-text); --color-nav-text: var(--color-text);
--color-secondary-nav-bg: var(--color-body); --color-secondary-nav-bg: var(--color-body);
--color-label-text: var(--color-text); --color-label-text: var(--color-text);
--color-label-bg: #cacaca5b; --color-label-bg: #cacaca7b;
--color-label-hover-bg: #cacacaa0; --color-label-hover-bg: #cacacaa0;
--color-label-active-bg: #cacacaff; --color-label-active-bg: #cacacaff;
--color-label-bg-alt: #cacacaff; --color-label-bg-alt: #cacacaff;