Skip to content

Commit 265d14f

Browse files
committed
Formatting
1 parent 027dac4 commit 265d14f

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

resources/views/components/input-otp.blade.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ class="relative"
5656
}
5757
5858
const previousInput = this.getInput(index - 1);
59+
5960
previousInput.value = '';
6061
previousInput.focus();
62+
6163
this.updateHiddenField();
6264
},
6365
handleKeyDown(index, event) {
@@ -77,6 +79,7 @@ class="relative"
7779
},
7880
handlePaste(event) {
7981
event.preventDefault();
82+
8083
const pastedText = (event.clipboardData || window.clipboardData).getData('text');
8184
const numericOnly = pastedText.replace(/[^0-9]/g, '');
8285
const digitsToFill = Math.min(numericOnly.length, this.totalDigits);
@@ -88,13 +91,14 @@ class="relative"
8891
});
8992
9093
if (numericOnly.length >= this.totalDigits) {
91-
this.updateHiddenField();
94+
this.updateHiddenField();
9295
}
9396
},
9497
clearAll() {
9598
this.digitIndices.forEach(index => {
9699
this.setValue(index, '');
97100
});
101+
98102
this.$refs.code.value = '';
99103
this.$refs.input1?.focus();
100104
}

resources/views/components/settings/layout.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<flux:navlist.item :href="route('settings.profile')" wire:navigate>{{ __('Profile') }}</flux:navlist.item>
55
<flux:navlist.item :href="route('settings.password')" wire:navigate>{{ __('Password') }}</flux:navlist.item>
66
@if (Laravel\Fortify\Features::canManageTwoFactorAuthentication())
7-
<flux:navlist.item :href="route('two-factor.show')" wire:navigate>{{ __('Two-factor Auth') }}</flux:navlist.item>
7+
<flux:navlist.item :href="route('two-factor.show')" wire:navigate>{{ __('Two-Factor Auth') }}</flux:navlist.item>
88
@endif
99
<flux:navlist.item :href="route('settings.appearance')" wire:navigate>{{ __('Appearance') }}</flux:navlist.item>
1010
</flux:navlist>

resources/views/livewire/auth/two-factor-challenge.blade.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ class="relative w-full h-auto"
55
x-cloak
66
x-data="{
77
showRecoveryInput: @js($errors->has('recovery_code')),
8+
89
code: '',
910
recovery_code: '',
11+
1012
toggleInput() {
1113
this.showRecoveryInput = !this.showRecoveryInput;
1214
this.code = '';
1315
this.recovery_code = '';
16+
1417
$dispatch('clear-2fa-auth-code');
18+
1519
$nextTick(() => {
1620
this.showRecoveryInput
1721
? this.$refs.recovery_code?.focus()

tests/Feature/Auth/AuthenticationTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@ public function test_users_can_not_authenticate_with_invalid_password(): void
5050
$this->assertGuest();
5151
}
5252

53-
public function test_users_can_logout(): void
54-
{
55-
$user = User::factory()->create();
56-
57-
$response = $this->actingAs($user)->post('/logout');
58-
59-
$response->assertRedirect('/');
60-
61-
$this->assertGuest();
62-
}
63-
6453
public function test_users_with_two_factor_enabled_are_redirected_to_two_factor_challenge(): void
6554
{
6655
if (! Features::canManageTwoFactorAuthentication()) {
@@ -89,4 +78,15 @@ public function test_users_with_two_factor_enabled_are_redirected_to_two_factor_
8978
$response->assertSessionHas('login.id', $user->id);
9079
$this->assertGuest();
9180
}
81+
82+
public function test_users_can_logout(): void
83+
{
84+
$user = User::factory()->create();
85+
86+
$response = $this->actingAs($user)->post('/logout');
87+
88+
$response->assertRedirect('/');
89+
90+
$this->assertGuest();
91+
}
9292
}

0 commit comments

Comments
 (0)