2018-05-19 19:42:37 +05:30
|
|
|
<h4 class="ui top attached header">
|
2022-01-14 20:33:31 +05:30
|
|
|
{{.i18n.Tr "settings.webauthn"}}
|
2018-05-19 19:42:37 +05:30
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
2022-01-14 20:33:31 +05:30
|
|
|
<p>{{.i18n.Tr "settings.webauthn_desc" | Str2html}}</p>
|
2021-11-09 04:17:19 +05:30
|
|
|
<div class="ui key list">
|
2022-01-14 20:33:31 +05:30
|
|
|
{{range .WebAuthnCredentials}}
|
2021-11-09 04:17:19 +05:30
|
|
|
<div class="item">
|
|
|
|
<div class="right floated content">
|
2022-01-14 20:33:31 +05:30
|
|
|
<button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}">
|
2021-11-09 04:17:19 +05:30
|
|
|
{{$.i18n.Tr "settings.delete_key"}}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<strong>{{.Name}}</strong>
|
2021-04-11 09:16:37 +05:30
|
|
|
</div>
|
2022-01-14 20:33:31 +05:30
|
|
|
<span class="time">{{TimeSinceUnix .CreatedUnix $.Lang}}</span>
|
2018-05-19 19:42:37 +05:30
|
|
|
</div>
|
2021-11-09 04:17:19 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="ui form">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<div class="required field">
|
2022-01-14 20:33:31 +05:30
|
|
|
<label for="nickname">{{.i18n.Tr "settings.webauthn_nickname"}}</label>
|
2021-11-09 04:17:19 +05:30
|
|
|
<input id="nickname" name="nickname" type="text" required>
|
2018-05-19 19:42:37 +05:30
|
|
|
</div>
|
2022-01-14 20:33:31 +05:30
|
|
|
<button id="register-webauthn" class="ui green button">{{svg "octicon-key"}} {{.i18n.Tr "settings.webauthn_register_key"}}</button>
|
2021-11-09 04:17:19 +05:30
|
|
|
</div>
|
2018-05-19 19:42:37 +05:30
|
|
|
</div>
|
|
|
|
|
2022-01-14 20:33:31 +05:30
|
|
|
{{template "user/auth/webauthn_error" .}}
|
2018-05-19 19:42:37 +05:30
|
|
|
|
|
|
|
<div class="ui small basic delete modal" id="delete-registration">
|
|
|
|
<div class="ui icon header">
|
2021-03-22 09:34:19 +05:30
|
|
|
{{svg "octicon-trash"}}
|
2022-01-14 20:33:31 +05:30
|
|
|
{{.i18n.Tr "settings.webauthn_delete_key"}}
|
2018-05-19 19:42:37 +05:30
|
|
|
</div>
|
|
|
|
<div class="content">
|
2022-01-14 20:33:31 +05:30
|
|
|
<p>{{.i18n.Tr "settings.webauthn_delete_key_desc"}}</p>
|
2018-05-19 19:42:37 +05:30
|
|
|
</div>
|
|
|
|
{{template "base/delete_modal_actions" .}}
|
|
|
|
</div>
|