Api Key view

This commit is contained in:
Paul Schneider 2021-07-12 02:17:26 +01:00
commit 82cec8eece
4 changed files with 48 additions and 2 deletions

View file

@ -37,9 +37,21 @@
</dd>
<dt>
@Html.DisplayNameFor(model => model.ProtectedValue)
</dt>
<dd>
@Html.DisplayFor(model => model.ProtectedValue)
<code>
<input id="key" value="@Model.ProtectedValue" readonly/></code>
<button type="button"
class="btn btn-success" autocomplete="off"
onclick="$('#key').select();document.execCommand('copy');"
>Copy</button>
</dd>
<dt>
@Html.DisplayNameFor(model => model.ApiKey.IsValid)
</dt>
<dd>
@Html.DisplayFor(model => model.ApiKey.IsValid)
</dd>
</dl>
</div>