diff options
author | Dmitry Sharshakov <d3dx12.xx@gmail.com> | 2023-04-10 20:22:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-10 13:22:51 -0400 |
commit | eb397c3e631099686f8c11cbd0ca303fd37908ba (patch) | |
tree | 3b96a10c8ef3ccd06f958ab471db420d596d11e5 /templates | |
parent | d7552c27d38f5ad342fe1c17cedfb6e22ba4d5d8 (diff) | |
download | gitea-eb397c3e631099686f8c11cbd0ca303fd37908ba.tar.gz gitea-eb397c3e631099686f8c11cbd0ca303fd37908ba.zip |
Allow adding SSH keys even if SSH server is disabled (#24025)
This is useful in case you want to use them for signature verification.
A notice is added to avoid confusion.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/settings/keys_ssh.tmpl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl index 5d518f3bb0..160dedc93c 100644 --- a/templates/user/settings/keys_ssh.tmpl +++ b/templates/user/settings/keys_ssh.tmpl @@ -1,13 +1,9 @@ <h4 class="ui top attached header"> {{.locale.Tr "settings.manage_ssh_keys"}} <div class="ui right"> - {{if not .DisableSSH}} - <button id="add-ssh-button" class="ui primary tiny show-panel button" data-panel="#add-ssh-key-panel"> - {{.locale.Tr "settings.add_key"}} - </button> - {{else}} - <button class="ui primary tiny button disabled">{{.locale.Tr "settings.ssh_disabled"}}</button> - {{end}} + <button id="add-ssh-button" class="ui primary tiny show-panel button" data-panel="#add-ssh-key-panel"> + {{.locale.Tr "settings.add_key"}} + </button> </div> </h4> <div class="ui attached segment"> @@ -35,6 +31,11 @@ <div class="item"> {{.locale.Tr "settings.ssh_desc"}} </div> + {{if .DisableSSH}} + <div class="item"> + {{.locale.Tr "settings.ssh_signonly"}} + </div> + {{end}} {{range $index, $key := .Keys}} <div class="item"> <div class="right floated content"> |