2023-06-07 14:20:18 +03:00
|
|
|
<h4 class="ui top attached header">{{.locale.Tr "settings.webauthn"}}</h4>
|
2018-05-19 17:12:37 +03:00
|
|
|
<div class="ui attached segment">
|
2022-06-27 23:58:46 +03:00
|
|
|
<p>{{.locale.Tr "settings.webauthn_desc" | Str2html}}</p>
|
2023-06-06 08:29:37 +03:00
|
|
|
{{template "user/auth/webauthn_error" .}}
|
2023-08-01 01:13:42 +03:00
|
|
|
<div class="flex-list">
|
2022-01-14 18:03:31 +03:00
|
|
|
{{range .WebAuthnCredentials}}
|
2023-08-01 01:13:42 +03:00
|
|
|
<div class="flex-item">
|
|
|
|
<div class="flex-item-leading">
|
|
|
|
{{svg "octicon-key" 32}}
|
|
|
|
</div>
|
|
|
|
<div class="flex-item-main">
|
|
|
|
<div class="flex-item-title">{{.Name}}</div>
|
|
|
|
<span class="flex-item-body time">{{TimeSinceUnix .CreatedUnix $.locale}}</span>
|
|
|
|
</div>
|
|
|
|
<div class="flex-item-trailing">
|
2022-01-14 18:03:31 +03:00
|
|
|
<button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}">
|
2022-06-27 23:58:46 +03:00
|
|
|
{{$.locale.Tr "settings.delete_key"}}
|
2021-11-09 01:47:19 +03:00
|
|
|
</button>
|
|
|
|
</div>
|
2018-05-19 17:12:37 +03:00
|
|
|
</div>
|
2021-11-09 01:47:19 +03:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="ui form">
|
|
|
|
<div class="required field">
|
2022-06-27 23:58:46 +03:00
|
|
|
<label for="nickname">{{.locale.Tr "settings.webauthn_nickname"}}</label>
|
2021-11-09 01:47:19 +03:00
|
|
|
<input id="nickname" name="nickname" type="text" required>
|
2018-05-19 17:12:37 +03:00
|
|
|
</div>
|
2022-06-27 23:58:46 +03:00
|
|
|
<button id="register-webauthn" class="ui green button">{{svg "octicon-key"}} {{.locale.Tr "settings.webauthn_register_key"}}</button>
|
2021-11-09 01:47:19 +03:00
|
|
|
</div>
|
2023-07-03 23:38:06 +03:00
|
|
|
<div class="ui g-modal-confirm delete modal" id="delete-registration">
|
|
|
|
<div class="header">
|
|
|
|
{{svg "octicon-trash"}}
|
|
|
|
{{.locale.Tr "settings.webauthn_delete_key"}}
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<p>{{.locale.Tr "settings.webauthn_delete_key_desc"}}</p>
|
|
|
|
</div>
|
|
|
|
{{template "base/modal_actions_confirm" .}}
|
2018-05-19 17:12:37 +03:00
|
|
|
</div>
|
|
|
|
</div>
|