feat(ui): improve description in packages settings (#7531)
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Has been skipped

- Improve the description of the 'Cargo registry index' and 'Chef registry'.
  - Move 'For more information' to be the first senctence.
  - Better explain what Chef's keypair button does.
- Resolves https://codeberg.org/forgejo/forgejo/issues/7140

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7531
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Co-authored-by: Paul-Emmanuel Raoul <skyper@skyplabs.net>
Co-committed-by: Paul-Emmanuel Raoul <skyper@skyplabs.net>
This commit is contained in:
Paul-Emmanuel Raoul 2025-04-18 12:36:59 +00:00 committed by Gusted
parent 23cc1fdbbe
commit 58653d3700
3 changed files with 9 additions and 9 deletions

View file

@ -3818,7 +3818,7 @@ owner.settings.cleanuprules.success.update = Cleanup rule has been updated.
owner.settings.cleanuprules.success.delete = Cleanup rule has been deleted. owner.settings.cleanuprules.success.delete = Cleanup rule has been deleted.
owner.settings.chef.title = Chef registry owner.settings.chef.title = Chef registry
owner.settings.chef.keypair = Generate key pair owner.settings.chef.keypair = Generate key pair
owner.settings.chef.keypair.description = A key pair is necessary to authenticate to the Chef registry. If you have generated a key pair before, generating a new key pair will discard the old key pair. owner.settings.chef.keypair.description = Requests sent to the Chef registry must be cryptographically signed as a means of authentication. When generating a keypair, only the public key is stored on Forgejo. The private key is provided to you to be used with knife. Generating a new keypair will overwrite the previous one.
[secrets] [secrets]
secrets = Secrets secrets = Secrets

View file

@ -3,25 +3,25 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
{{if .CargoIndexExists}}
<div class="field"> <div class="field">
<label>{{ctx.Locale.Tr "packages.owner.settings.cargo.rebuild.description"}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Cargo" "https://forgejo.org/docs/latest/user/packages/cargo/"}}</label>
</div> </div>
{{if .CargoIndexExists}}
<form class="field" action="{{.Link}}/cargo/rebuild" method="post"> <form class="field" action="{{.Link}}/cargo/rebuild" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<button class="ui primary button">{{ctx.Locale.Tr "packages.owner.settings.cargo.rebuild"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "packages.owner.settings.cargo.rebuild"}}</button>
</form> </form>
{{else}}
<div class="field"> <div class="field">
<label>{{ctx.Locale.Tr "packages.owner.settings.cargo.initialize.description"}}</label> <label>{{ctx.Locale.Tr "packages.owner.settings.cargo.rebuild.description"}}</label>
</div> </div>
{{else}}
<form class="field" action="{{.Link}}/cargo/initialize" method="post"> <form class="field" action="{{.Link}}/cargo/initialize" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<button class="ui primary button">{{ctx.Locale.Tr "packages.owner.settings.cargo.initialize"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "packages.owner.settings.cargo.initialize"}}</button>
</form> </form>
{{end}}
<div class="field"> <div class="field">
<label>{{ctx.Locale.Tr "packages.registry.documentation" "Cargo" "https://forgejo.org/docs/latest/user/packages/cargo/"}}</label> <label>{{ctx.Locale.Tr "packages.owner.settings.cargo.initialize.description"}}</label>
</div> </div>
{{end}}
</div> </div>
</div> </div>

View file

@ -9,14 +9,14 @@
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{ctx.Locale.Tr "packages.owner.settings.chef.keypair.description"}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Chef" "https://forgejo.org/docs/latest/user/packages/chef/"}}</label>
</div> </div>
<form class="field" action="{{.Link}}/chef/regenerate_keypair" method="post"> <form class="field" action="{{.Link}}/chef/regenerate_keypair" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<button class="ui primary button">{{ctx.Locale.Tr "packages.owner.settings.chef.keypair"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "packages.owner.settings.chef.keypair"}}</button>
</form> </form>
<div class="field"> <div class="field">
<label>{{ctx.Locale.Tr "packages.registry.documentation" "Chef" "https://forgejo.org/docs/latest/user/packages/chef/"}}</label> <label>{{ctx.Locale.Tr "packages.owner.settings.chef.keypair.description"}}</label>
</div> </div>
</div> </div>
</div> </div>