]> source.dussan.org Git - gitea.git/commitdiff
set user dashboard org visibility to basic (#22706)
authoryp05327 <576951401@qq.com>
Thu, 2 Feb 2023 06:53:14 +0000 (15:53 +0900)
committerGitHub <noreply@github.com>
Thu, 2 Feb 2023 06:53:14 +0000 (14:53 +0800)
Same to https://github.com/go-gitea/gitea/pull/22674 and
https://github.com/go-gitea/gitea/pull/22605

Sorry to create 3 PR to fix this.
I checked all span with class `org-visibility`, i think this is the last
one :)

And I found that private/limited user has no private/limited tag in
dashboard. but org does.
If it is ok i will add this feature in another pr.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
templates/user/dashboard/navbar.tmpl

index 4b20bf52680f2f4cedde0f636b8196b81d864cf6..ab3d5029d145da842b2d0058e7e02daf8f01890c 100644 (file)
@@ -7,8 +7,8 @@
                                        <span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
                                        {{if .ContextUser.IsOrganization}}
                                                <span class="org-visibility">
-                                                       {{if .ContextUser.Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
-                                                       {{if .ContextUser.Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+                                                       {{if .ContextUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+                                                       {{if .ContextUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
                                                </span>
                                        {{end}}
                                        {{svg "octicon-triangle-down" 14 "dropdown icon"}}
@@ -27,8 +27,8 @@
                                                                {{avatar .}}
                                                                <span class="truncated-item-name">{{.ShortName 40}}</span>
                                                                <span class="org-visibility">
-                                                                       {{if .Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
-                                                                       {{if .Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+                                                                       {{if .Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+                                                                       {{if .Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
                                                                </span>
                                                        </a>
                                                {{end}}