Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/admin/org/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<td>
<a href="{{.HomeLink}}">{{if and DefaultShowFullName .FullName}}{{.FullName}} ({{.Name}}){{else}}{{.Name}}{{end}}</a>
{{if .Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock"}}</span>
{{svg "octicon-lock"}}
{{end}}
{{if eq .Type 3}}{{/* Reserved organization */}}
<span class="ui mini label">{{ctx.Locale.Tr "admin.users.reserved"}}</span>
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/packages/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<td>
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
{{if .Owner.Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock"}}</span>
{{svg "octicon-lock"}}
{{end}}
</td>
<td>{{.Package.Type.Name}}</td>
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/repo/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<td>
<a class="tw-break-anywhere" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
{{if .Owner.Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock"}}</span>
{{svg "octicon-lock"}}
{{end}}
</td>
<td>
Expand Down
2 changes: 2 additions & 0 deletions templates/repo/icon.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
{{svg "octicon-mirror" 24}}
{{else if $.IsFork}}
{{svg "octicon-repo-forked" 24}}
{{else if $.IsPrivate}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But there is already a label indicating the repository is private.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could remove the label with this change, possibly adding a title attribute on the icon.

Copy link
Member Author

@silverwind silverwind Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the .IsPrivate and .IsTemplate template conditions render labels and I guess for clarity we should keep these labels. I think it's not a big issue if the repo icon now additionally displays these states.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving for others to decide whether this is fine (both icon and tag indicate private status):

image

{{svg "octicon-repo-locked" 24}}
{{else}}
{{svg "octicon-repo" 24}}
{{end}}
4 changes: 2 additions & 2 deletions templates/repo/pulse.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
<div class="ui attached segment horizontal segments">
{{if .Permission.CanRead ctx.Consts.RepoUnitTypePullRequests}}
<a href="#merged-pull-requests" class="ui attached segment text center">
<span class="text purple">{{svg "octicon-git-pull-request"}}</span> <strong>{{.Activity.MergedPRCount}}</strong><br>
<span class="text purple">{{svg "octicon-git-merge"}}</span> <strong>{{.Activity.MergedPRCount}}</strong><br>
{{ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n"}}
</a>
<a href="#proposed-pull-requests" class="ui attached segment text center">
<span class="text green">{{svg "octicon-git-branch"}}</span> <strong>{{.Activity.OpenedPRCount}}</strong><br>
<span class="text green">{{svg "octicon-git-pull-request"}}</span> <strong>{{.Activity.OpenedPRCount}}</strong><br>
{{ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n"}}
</a>
{{end}}
Expand Down
2 changes: 1 addition & 1 deletion templates/shared/repo/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</a>
{{end}}
<a class="flex-text-inline" href="{{.Link}}/forks">
<span class="tw-contents" aria-label="{{ctx.Locale.Tr "repo.forks"}}">{{svg "octicon-git-branch" 16}}</span>
<span class="tw-contents" aria-label="{{ctx.Locale.Tr "repo.forks"}}">{{svg "octicon-repo-forked" 16}}</span>
<span {{if ge .NumForks 1000}}data-tooltip-content="{{.NumForks}}"{{end}}>{{CountFmt .NumForks}}</span>
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/user/settings/repos.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="content">
{{if $repo}}
{{if $repo.IsPrivate}}
<span class="text gold icon">{{svg "octicon-lock"}}</span>
<span class="icon">{{svg "octicon-repo-locked"}}</span>
{{else if $repo.IsFork}}
<span class="icon">{{svg "octicon-repo-forked"}}</span>
{{else if $repo.IsMirror}}
Expand Down Expand Up @@ -86,7 +86,7 @@
<div class="item">
<div class="content flex-text-block">
{{if .IsPrivate}}
{{svg "octicon-lock" 16 "text gold"}}
{{svg "octicon-lock"}}
{{else if .IsFork}}
{{svg "octicon-repo-forked"}}
{{else if .IsMirror}}
Expand Down
4 changes: 0 additions & 4 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,6 @@ img.ui.avatar,
color: var(--color-grey-light) !important;
}

.text.gold {
color: var(--color-gold) !important;
}

.text.small {
font-size: 0.75em;
}
Expand Down
1 change: 0 additions & 1 deletion web_src/css/themes/theme-gitea-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ gitea-theme-meta-info {
/* other colors */
--color-grey: #384149;
--color-grey-light: #818f9e;
--color-gold: #b1983b;
--color-white: #ffffff;
--color-diff-added-linenum-bg: #274227;
--color-diff-added-row-bg: #203224;
Expand Down
1 change: 0 additions & 1 deletion web_src/css/themes/theme-gitea-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ gitea-theme-meta-info {
/* other colors */
--color-grey: #697077;
--color-grey-light: #7c838a;
--color-gold: #a1882b;
--color-white: #ffffff;
--color-diff-added-linenum-bg: #d1f8d9;
--color-diff-added-row-bg: #e6ffed;
Expand Down
4 changes: 2 additions & 2 deletions web_src/js/components/DashboardRepoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export default defineComponent({
} else if (repo.template) {
return `octicon-repo-template`;
} else if (repo.private) {
return 'octicon-lock';
return 'octicon-repo-locked';
} else if (repo.internal) {
return 'octicon-repo';
}
Expand Down Expand Up @@ -391,7 +391,7 @@ export default defineComponent({
<div class="ui checkbox" ref="checkboxPrivateFilter" :title="checkboxPrivateFilterTitle">
<input type="checkbox" class="tw-pointer-events-none" v-bind.prop="checkboxPrivateFilterProps">
<label>
<svg-icon name="octicon-lock" :size="16" class="tw-mr-1"/>
<svg-icon name="octicon-repo-locked" :size="16" class="tw-mr-1"/>
{{ textShowPrivate }}
</label>
</div>
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import octiconProject from '../../public/assets/img/svg/octicon-project.svg';
import octiconQuote from '../../public/assets/img/svg/octicon-quote.svg';
import octiconRepo from '../../public/assets/img/svg/octicon-repo.svg';
import octiconRepoForked from '../../public/assets/img/svg/octicon-repo-forked.svg';
import octiconRepoLocked from '../../public/assets/img/svg/octicon-repo-locked.svg';
import octiconRepoTemplate from '../../public/assets/img/svg/octicon-repo-template.svg';
import octiconRss from '../../public/assets/img/svg/octicon-rss.svg';
import octiconScreenFull from '../../public/assets/img/svg/octicon-screen-full.svg';
Expand Down Expand Up @@ -144,6 +145,7 @@ const svgs = {
'octicon-quote': octiconQuote,
'octicon-repo': octiconRepo,
'octicon-repo-forked': octiconRepoForked,
'octicon-repo-locked': octiconRepoLocked,
'octicon-repo-template': octiconRepoTemplate,
'octicon-rss': octiconRss,
'octicon-screen-full': octiconScreenFull,
Expand Down