Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The repo items in explore page have duplicate icon #27596

Closed
lng2020 opened this issue Oct 12, 2023 · 3 comments · Fixed by #27644
Closed

The repo items in explore page have duplicate icon #27596

lng2020 opened this issue Oct 12, 2023 · 3 comments · Fixed by #27644
Labels
skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/ui Change the appearance of the Gitea UI type/bug
Milestone

Comments

@lng2020
Copy link
Member

lng2020 commented Oct 12, 2023

Description

As title.
The problem is

<span class="label-list">
{{if .IsArchived}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
{{end}}
{{if .IsTemplate}}
{{if .IsPrivate}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private_template"}}</span>
{{else}}
{{if .Owner.Visibility.IsPrivate}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal_template"}}</span>
{{end}}
{{end}}
{{else}}
{{if .IsPrivate}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
{{else}}
{{if .Owner.Visibility.IsPrivate}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
{{end}}
{{end}}
{{end}}
</span>
{{if .IsFork}}
<span data-tooltip-content="{{ctx.Locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
{{else if .IsMirror}}
<span data-tooltip-content="{{ctx.Locale.Tr "mirror"}}">{{svg "octicon-mirror"}}</span>
{{end}}
</div>

and
{{$avatarLink := (.RelAvatarLink ctx)}}
{{if $avatarLink}}
<img class="ui avatar gt-vm" src="{{$avatarLink}}" width="32" height="32" alt="{{.FullName}}">
{{else if $.IsTemplate}}
{{svg "octicon-repo-template" 32}}
{{else if $.IsPrivate}}
{{svg "octicon-lock" 32}}
{{else if $.IsMirror}}
{{svg "octicon-mirror" 32}}
{{else if $.IsFork}}
{{svg "octicon-repo-forked" 32}}
{{else}}
{{svg "octicon-repo" 32}}
{{end}}

have duplicate (but not same) check.

Screenshots

image

Gitea Version

latest codebase

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

No response

Browser Version

none

@lng2020 lng2020 added type/bug topic/ui Change the appearance of the Gitea UI labels Oct 12, 2023
@lng2020
Copy link
Member Author

lng2020 commented Oct 12, 2023

cc @denyskon, the icon is introduced by your pr
what's your opinion about this icon? IMO, I think your icon is better, probably we should remove the label behind the repo name.

@hiifong
Copy link
Contributor

hiifong commented Oct 12, 2023

The same thing happens with other pages.
image
image

@denyskon
Copy link
Member

I think I know the reason for it, I'll check....

@lunny lunny added this to the 1.21.0 milestone Oct 12, 2023
@lunny lunny added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Oct 12, 2023
6543 pushed a commit that referenced this issue Oct 16, 2023
Fix #27596 

Change confusing behavior when showing information about a repo via
labels and icons. Implement changes proposed by @lng2020 in
#27627 (review).
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Oct 16, 2023
Fix go-gitea#27596 

Change confusing behavior when showing information about a repo via
labels and icons. Implement changes proposed by @lng2020 in
go-gitea#27627 (review).
delvh pushed a commit that referenced this issue Oct 19, 2023
Backport #27644 by @denyskon

Fix #27596 

Change confusing behavior when showing information about a repo via labels and icons.
Implement changes proposed by @lng2020 in
#27627 (review).

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants