Update 2FA Checkpoint, add username + logout button and numeric inputmode

This commit is contained in:
Daniel Supernault 2020-04-20 20:23:09 -06:00
parent 319488481d
commit 26affb11c0
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -6,7 +6,10 @@
<div class="col-lg-5">
<div class="text-center">
<img src="/img/pixelfed-icon-color.svg" height="60px">
<p class="font-weight-light h3 py-4">Verify 2FA Code to continue</p>
<p class="font-weight-light h3 py-4">Verify Two Factor Code</p>
</div>
<div class="alert alert-info small">
If you lose access to your 2FA device, contact the admins.
</div>
<div class="card">
<div class="card-body">
@ -16,7 +19,7 @@
<div class="form-group row">
<div class="col-md-12">
<input id="code" type="text" class="form-control{{ $errors->has('code') ? ' is-invalid' : '' }}" name="code" placeholder="{{__('Two-Factor Authentication Code')}}" required autocomplete="off" autofocus="">
<input id="code" type="text" class="form-control{{ $errors->has('code') ? ' is-invalid' : '' }}" name="code" placeholder="{{__('Two-Factor Authentication Code')}}" required autocomplete="off" autofocus="" inputmode="numeric" minlength="6" maxlength="6">
@if ($errors->has('code'))
<span class="invalid-feedback">
@ -37,6 +40,15 @@
</form>
</div>
</div>
<div class="d-flex justify-content-between pt-4 small">
<a class="text-lighter text-decoration-none" href="/{{Auth::user()->username}}">Logged in as: <span class="font-weight-bold text-muted">{{Auth::user()->username}}</span></a>
<span>
<a class="text-decoration-none text-muted font-weight-bold" href="{{ route('logout') }}" onclick="event.preventDefault();document.getElementById('logout-form').submit();">Logout</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
@csrf
</form>
</span>
</div>
</div>
</div>
</div>