More UI fixes in CP

This commit is contained in:
Pinga 2025-01-20 17:11:12 +02:00
parent d5679b68f4
commit 3dedff7c83

View file

@ -24,8 +24,11 @@
<div class="page-body">
<div class="container-xl">
{% include 'partials/flash.twig' %}
<div class="card-tabs">
<ul class="nav nav-tabs" data-bs-toggle="tabs">
<div class="row row-cards">
<div class="col-12">
<div class="card">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs" data-bs-toggle="tabs">
<li class="nav-item">
<a href="#tabs-details" class="nav-link active" data-bs-toggle="tab">{{ __('Details') }}</a>
</li>
@ -39,9 +42,10 @@
<a href="#tabs-log" class="nav-link" data-bs-toggle="tab">{{ __('Log') }}</a>
</li>
</ul>
<div class="tab-content">
<div class="card tab-pane active show" id="tabs-details">
</div>
<div class="card-body">
<div class="tab-content">
<div class="tab-pane active show" id="tabs-details">
<h3 class="card-title">{{ __('Details') }}</h3>
<form action="{{route('change.password')}}" name="register" method="post">
{{ csrf.field | raw }}
@ -72,7 +76,7 @@
</div>
</div>
<h3 class="card-title mt-4">{{ __('Change Password') }}</h3>
<div class="row g-3">
<div class="row g-3 mb-3">
<div class="col-md">
<div class="form-label required">{{ __('Old Password') }}</div>
<input type="password" class="form-control{{ errors.old_password ? ' is-invalid' : '' }}" name="old_password" placeholder="{{ __('Enter old password') }}" required>
@ -88,22 +92,13 @@
{% endif %}
</div>
</div>
</div>
<div class="card-footer bg-transparent mt-auto">
<div class="btn-list justify-content-end">
<a href="{{route('home')}}" class="btn">
<svg xmlns="http://www.w3.org/2000/svg" class="icon me-2" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M9 11l-4 4l4 4m-4 -4h11a4 4 0 0 0 0 -8h-1"></path></svg> {{ __('Back') }}
</a>
<button type="submit" class="btn btn-primary">
<svg xmlns="http://www.w3.org/2000/svg" class="icon me-2" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"></path><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"></path></svg> {{ __('Update') }}
</button>
</div>
</div>
</form>
</div>
<div class="card tab-pane" id="tabs-2fa">
<div class="tab-pane" id="tabs-2fa">
{% if secret is defined %}
<div class="card-body">
<h3 class="card-title">{{ __('Two-Factor Authentication') }} (2FA)</h3>
<form action="{{route('activate2fa')}}" name="2fa" method="post">
{{ csrf.field | raw }}
@ -153,9 +148,7 @@
</div>
<button type="submit" class="btn btn-primary">{{ __('Save 2FA Settings') }}</button>
</form>
</div>
{% else %}
<div class="card-body">
<h3 class="card-title">{{ __('Two-Factor Authentication') }} (2FA)</h3>
<div class="d-flex align-items-center">
<span class="badge bg-green text-green-fg me-3"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3" /><path d="M12 11m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 12l0 2.5" /></svg></span>
@ -164,12 +157,10 @@
<p class="text-muted mb-2">{{ __('2FA is currently') }} <strong>{{ __('enabled') }}</strong> {{ __('for your account. If you encounter any issues or need to disable 2FA, please contact our support team for assistance.') }}</p>
</div>
</div>
</div>
{% endif %}
</div>
<div class="card tab-pane" id="tabs-webauthn">
<div class="tab-pane" id="tabs-webauthn">
{% if weba is defined %}
<div class="card-body">
<h3 class="card-title">{{ __('WebAuthn Authentication') }}</h3>
<div class="d-flex align-items-center">
<span class="badge bg-green text-green-fg me-3"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3" /><path d="M12 11m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 12l0 2.5" /></svg></span>
@ -201,24 +192,18 @@
</tbody>
</table>
</div>
</div>
{% else %}
{% if isWebaEnabled %}
<div class="card-body">
<h3 class="card-title">{{ __('WebAuthn Authentication') }}</h3>
<p>{{ __('Secure your account with WebAuthn. Click the button below to register your device for passwordless sign-in.') }}</p>
<button type="button" class="btn btn-primary" id="connectWebAuthnButton">{{ __('Connect WebAuthn Device') }}</button>
</div>
{% else %}
<div class="card-body">
<h3 class="card-title">{{ __('WebAuthn Authentication') }}<span class="badge bg-red text-red-fg ms-2">{{ __('Disabled') }}</span></h3>
<p>{{ __('WebAuthn is currently disabled for this installation. To enable WebAuthn authentication, please contact the registry administrator.') }}</p>
</div>
{% endif %}
{% endif %}
</div>
<div class="card tab-pane" id="tabs-log">
<div class="card-body">
<div class="tab-pane" id="tabs-log">
<h3 class="card-title">{{ __('User Audit Log') }}</h3>
<p>{{ __('Track and review all user activities in your account below. Monitor logins, profile changes, and other key actions to ensure security and transparency.') }}</p>
<div class="table-responsive mt-4">
@ -229,6 +214,8 @@
</div>
</div>
</div>
</div>
</div>
{% include 'partials/footer.twig' %}
</div>
{% endblock %}