diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/auth/webauthn.tmpl | 2 | ||||
-rw-r--r-- | templates/user/auth/webauthn_error.tmpl | 31 | ||||
-rw-r--r-- | templates/user/settings/security/webauthn.tmpl | 2 |
3 files changed, 13 insertions, 22 deletions
diff --git a/templates/user/auth/webauthn.tmpl b/templates/user/auth/webauthn.tmpl index ea773d2566..f1c4f29fd9 100644 --- a/templates/user/auth/webauthn.tmpl +++ b/templates/user/auth/webauthn.tmpl @@ -5,6 +5,7 @@ <h3 class="ui top attached header"> {{.locale.Tr "twofa"}} </h3> + {{template "user/auth/webauthn_error" .}} <div class="ui attached segment"> {{svg "octicon-key" 56}} <h3>{{.locale.Tr "webauthn_insert_key"}}</h3> @@ -18,5 +19,4 @@ </div> </div> </div> -{{template "user/auth/webauthn_error" .}} {{template "base/footer" .}} diff --git a/templates/user/auth/webauthn_error.tmpl b/templates/user/auth/webauthn_error.tmpl index b6467de1aa..f90882ef12 100644 --- a/templates/user/auth/webauthn_error.tmpl +++ b/templates/user/auth/webauthn_error.tmpl @@ -1,22 +1,13 @@ -<div class="ui small modal" id="webauthn-error"> - <div class="header">{{.locale.Tr "webauthn_error"}}</div> - <div class="content"> - <div class="ui negative message"> - <div class="header"> - {{.locale.Tr "webauthn_error"}} - </div> - <div class="gt-hidden" data-webauthn-error-msg="browser"><p>{{.locale.Tr "webauthn_unsupported_browser"}}</div> - <div class="gt-hidden" data-webauthn-error-msg="unknown"><p>{{.locale.Tr "webauthn_error_unknown"}}</div> - <div class="gt-hidden" data-webauthn-error-msg="insecure"><p>{{.locale.Tr "webauthn_error_insecure"}}</div> - <div class="gt-hidden" data-webauthn-error-msg="unable-to-process"><p>{{.locale.Tr "webauthn_error_unable_to_process"}}</div> - <div class="gt-hidden" data-webauthn-error-msg="duplicated"><p>{{.locale.Tr "webauthn_error_duplicated"}}</div> - <div class="gt-hidden" data-webauthn-error-msg="empty"><p>{{.locale.Tr "webauthn_error_empty"}}</div> - <div class="gt-hidden" data-webauthn-error-msg="timeout"><p>{{.locale.Tr "webauthn_error_timeout"}}</div> - <div class="gt-hidden" data-webauthn-error-msg="general"></div> - </div> - </div> - <div class="actions"> - <button onclick="window.location.reload()" class="success ui button gt-hidden webauthn_error_timeout">{{.locale.Tr "webauthn_reload"}}</button> - <button class="ui cancel button">{{.locale.Tr "cancel"}}</button> +<div id="webauthn-error" class="ui small gt-hidden"> + <div class="content ui negative message gt-df gt-fc gt-gap-3"> + <div class="header">{{.locale.Tr "webauthn_error"}}</div> + <div id="webauthn-error-msg"></div> + <div class="gt-hidden" data-webauthn-error-msg="browser">{{.locale.Tr "webauthn_unsupported_browser"}}</div> + <div class="gt-hidden" data-webauthn-error-msg="unknown">{{.locale.Tr "webauthn_error_unknown"}}</div> + <div class="gt-hidden" data-webauthn-error-msg="insecure">{{.locale.Tr "webauthn_error_insecure"}}</div> + <div class="gt-hidden" data-webauthn-error-msg="unable-to-process">{{.locale.Tr "webauthn_error_unable_to_process"}}</div> + <div class="gt-hidden" data-webauthn-error-msg="duplicated">{{.locale.Tr "webauthn_error_duplicated"}}</div> + <div class="gt-hidden" data-webauthn-error-msg="empty">{{.locale.Tr "webauthn_error_empty"}}</div> + <div class="gt-hidden" data-webauthn-error-msg="timeout">{{.locale.Tr "webauthn_error_timeout"}}</div> </div> </div> diff --git a/templates/user/settings/security/webauthn.tmpl b/templates/user/settings/security/webauthn.tmpl index 59022eb1c9..e541f764bc 100644 --- a/templates/user/settings/security/webauthn.tmpl +++ b/templates/user/settings/security/webauthn.tmpl @@ -3,6 +3,7 @@ </h4> <div class="ui attached segment"> <p>{{.locale.Tr "settings.webauthn_desc" | Str2html}}</p> + {{template "user/auth/webauthn_error" .}} <div class="ui key list"> {{range .WebAuthnCredentials}} <div class="item"> @@ -28,7 +29,6 @@ </div> </div> -{{template "user/auth/webauthn_error" .}} <div class="ui g-modal-confirm delete modal" id="delete-registration"> <div class="header"> |