mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 06:23:23 +00:00
fix(profile): remove redundant 2FA enabled badge
This commit is contained in:
@@ -261,19 +261,16 @@
|
||||
</div>
|
||||
@elseif (request()->user()->two_factor_confirmed_at)
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<x-status-badge status="Enabled" type="success" />
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<form action="/user/two-factor-recovery-codes" method="POST">
|
||||
@csrf
|
||||
<x-forms.button type="submit">Regenerate recovery codes</x-forms.button>
|
||||
</form>
|
||||
<form action="/user/two-factor-authentication" method="POST">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<x-forms.button type="submit" isError>Disable 2FA</x-forms.button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center justify-end gap-2">
|
||||
<form action="/user/two-factor-recovery-codes" method="POST">
|
||||
@csrf
|
||||
<x-forms.button type="submit">Regenerate recovery codes</x-forms.button>
|
||||
</form>
|
||||
<form action="/user/two-factor-authentication" method="POST">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<x-forms.button type="submit" isError>Disable 2FA</x-forms.button>
|
||||
</form>
|
||||
</div>
|
||||
@if (session('status') === 'two-factor-authentication-confirmed'
|
||||
|| session('status') === 'recovery-codes-generated')
|
||||
|
||||
@@ -27,6 +27,13 @@ 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 () {
|
||||
$profileView = file_get_contents(resource_path('views/livewire/profile/index.blade.php'));
|
||||
|
||||
expect($profileView)
|
||||
->not->toContain('<x-status-badge status="Enabled" type="success" />');
|
||||
});
|
||||
|
||||
it('keeps color theme preferences on the profile appearance view without page width or density controls', function () {
|
||||
$appearanceView = file_get_contents(resource_path('views/livewire/profile/appearance.blade.php'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user