2023-09-25 08:56:50 +00:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "settings.webauthn"}}</h4>
|
2018-05-19 14:12:37 +00:00
|
|
|
<div class="ui attached segment">
|
2024-09-02 18:36:24 +00:00
|
|
|
<p>{{ctx.Locale.Tr "settings.webauthn_desc" "https://w3c.github.io/webauthn/#webauthn-authenticator"}}</p>
|
2023-12-07 22:38:55 +00:00
|
|
|
<p>{{ctx.Locale.Tr "settings.webauthn_key_loss_warning"}} {{ctx.Locale.Tr "settings.webauthn_alternative_tip"}}</p>
|
2023-06-06 05:29:37 +00:00
|
|
|
{{template "user/auth/webauthn_error" .}}
|
2023-07-31 22:13:42 +00:00
|
|
|
<div class="flex-list">
|
2022-01-14 15:03:31 +00:00
|
|
|
{{range .WebAuthnCredentials}}
|
2023-07-31 22:13:42 +00: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>
|
2024-01-02 19:09:18 +00:00
|
|
|
<div class="flex-item-body">
|
2024-11-02 04:08:28 +00:00
|
|
|
<p>{{ctx.Locale.Tr "settings.added_on" (ctx.DateUtils.AbsoluteShort .CreatedUnix)}}</p>
|
2024-01-02 19:09:18 +00:00
|
|
|
</div>
|
2023-07-31 22:13:42 +00:00
|
|
|
</div>
|
|
|
|
<div class="flex-item-trailing">
|
2022-01-14 15:03:31 +00:00
|
|
|
<button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}">
|
2023-09-25 08:56:50 +00:00
|
|
|
{{ctx.Locale.Tr "settings.delete_key"}}
|
2021-11-08 22:47:19 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
2018-05-19 14:12:37 +00:00
|
|
|
</div>
|
2021-11-08 22:47:19 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="ui form">
|
|
|
|
<div class="required field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="nickname">{{ctx.Locale.Tr "settings.webauthn_nickname"}}</label>
|
2021-11-08 22:47:19 +00:00
|
|
|
<input id="nickname" name="nickname" type="text" required>
|
2018-05-19 14:12:37 +00:00
|
|
|
</div>
|
2023-09-25 08:56:50 +00:00
|
|
|
<button id="register-webauthn" class="ui primary button">{{svg "octicon-key"}} {{ctx.Locale.Tr "settings.webauthn_register_key"}}</button>
|
2021-11-08 22:47:19 +00:00
|
|
|
</div>
|
2023-07-03 20:38:06 +00:00
|
|
|
<div class="ui g-modal-confirm delete modal" id="delete-registration">
|
|
|
|
<div class="header">
|
|
|
|
{{svg "octicon-trash"}}
|
2023-09-25 08:56:50 +00:00
|
|
|
{{ctx.Locale.Tr "settings.webauthn_delete_key"}}
|
2023-07-03 20:38:06 +00:00
|
|
|
</div>
|
|
|
|
<div class="content">
|
2023-09-25 08:56:50 +00:00
|
|
|
<p>{{ctx.Locale.Tr "settings.webauthn_delete_key_desc"}}</p>
|
2023-07-03 20:38:06 +00:00
|
|
|
</div>
|
|
|
|
{{template "base/modal_actions_confirm" .}}
|
2018-05-19 14:12:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|