btcpayserver/BTCPayServer/Views/Fido2/List.cshtml
Andrew Camilleri 02bf5afe0b
Migrate existing U2F to Fido2 (#2484)
* Migrate existing U2F to Fido2

This seamlessly switches all u2f registrations over to the new FIDO2 support. Please note that I have not yet added a way to drop the u2f DB and its UI so that we can test the migration works properly for all.

* add testing logic

* fix u2f tests

* remove duplicate status message

* fix test and namespaces

* fix test
2021-04-28 13:14:15 +09:00

42 lines
1.2 KiB
Text

@model BTCPayServer.Fido2.Models.Fido2AuthenticationViewModel
@{
ViewData.SetActivePageAndTitle(ManageNavPages.Fido2, "Registered FIDO2 Credentials");
}
<table class="table table-lg mb-4">
<thead>
<tr>
<th>Name</th>
<th class="text-right">Actions</th>
</tr>
</thead>
<tbody>
@foreach (var device in Model.Credentials)
{
<tr>
<td>@(string.IsNullOrEmpty(device.Name)? "Unnamed FIDO2 credential": device.Name)</td>
<td class="text-right">
<a asp-action="Remove" asp-route-id="@device.Id">Remove</a>
</td>
</tr>
}
@if (!Model.Credentials.Any())
{
<tr>
<td colspan="2" class="text-center h5 py-2">
No registered credentials
</td>
</tr>
}
</tbody>
</table>
<form asp-action="Create" method="get" class="form-inline">
<div class="form-group">
<input type="text" class="form-control" name="Name" placeholder="New Credential Name"/>
<button type="submit" class="btn btn-primary ml-2">
<span class="fa fa-plus"></span>
Add New Credential
</button>
</div>
</form>