add a link to change the visibility of package

This commit is contained in:
Lunny Xiao committed 2026-05-08 10:43:31 -07:00
1 parent 1895833739
commit f82cdc3d6c
2 files changed
+14

No files matched your search

+3
View File
@@ -3623,6 +3623,9 @@
"packages.vagrant.install": "To add a Vagrant box, run the following command:",
"packages.settings.link": "Link this package to a repository",
"packages.settings.link.description": "If you link a package with a repository, the package will appear in the repository's package list. This link does not change the package visibility. Only repositories under the same owner can be linked. Leaving the field empty will remove the link.",
"packages.settings.visibility": "Package visibility",
"packages.settings.visibility.inherit": "Package visibility is inherited from the owner and cannot be changed independently here. To change it, update the visibility settings of the user or organization that owns this package.",
"packages.settings.visibility.button": "Change owner visibility",
"packages.settings.link.select": "Select Repository",
"packages.settings.link.button": "Update Repository Link",
"packages.settings.link.success": "Repository link was successfully updated.",
+11
View File
@@ -17,6 +17,17 @@
</span>
/ <strong>{{ctx.Locale.Tr "repo.settings"}}</strong>
</p>
{{$visibilitySettingsLink := print AppSubUrl "/user/settings"}}
{{if .ContextUser.IsOrganization}}
{{$visibilitySettingsLink = print .ContextUser.OrganisationLink "/settings"}}
{{end}}
<h4 class="ui top attached header">
{{ctx.Locale.Tr "packages.settings.visibility"}}
</h4>
<div class="ui attached segment">
<p>{{ctx.Locale.Tr "packages.settings.visibility.inherit"}}</p>
<a class="ui basic button" href="{{$visibilitySettingsLink}}">{{ctx.Locale.Tr "packages.settings.visibility.button"}}</a>
</div>
<h4 class="ui top attached header">
{{ctx.Locale.Tr "packages.settings.link"}}
</h4>