mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-24 15:30:03 -05:00
fix(profile): show an enabled badge for two-factor authentication
This commit is contained in:
@@ -218,8 +218,9 @@
|
||||
<h2>Two-factor authentication</h2>
|
||||
<p>Add a time-based one-time password to protect your account.</p>
|
||||
</div>
|
||||
@if (! request()->user()->two_factor_confirmed_at
|
||||
&& session('status') !== 'two-factor-authentication-enabled')
|
||||
@if (request()->user()->two_factor_confirmed_at)
|
||||
<x-status-badge status="Enabled" type="success" />
|
||||
@elseif (session('status') !== 'two-factor-authentication-enabled')
|
||||
<form action="/user/two-factor-authentication" method="POST">
|
||||
@csrf
|
||||
<x-forms.button type="submit">Configure 2FA</x-forms.button>
|
||||
|
||||
@@ -27,11 +27,11 @@ it('opens the email change form without a Livewire request', function () {
|
||||
->not->toContain('wire:click="showEmailChangeForm"');
|
||||
});
|
||||
|
||||
it('does not show a redundant enabled badge for two-factor authentication', function () {
|
||||
it('shows the two-factor authentication state as a header badge', function () {
|
||||
$profileView = file_get_contents(resource_path('views/livewire/profile/index.blade.php'));
|
||||
|
||||
expect($profileView)
|
||||
->not->toContain('<x-status-badge status="Enabled" type="success" />');
|
||||
->toContain('<x-status-badge status="Enabled" type="success" />');
|
||||
});
|
||||
|
||||
it('offers full and centered page width preferences on the profile appearance view', function () {
|
||||
|
||||
Reference in New Issue
Block a user