mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-24 07:25:13 -05:00
feat(auth): autofocus auth form fields and profile 2FA OTP (#11324)
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
@readonly($readonly) @disabled($disabled) id="{{ $htmlId }}"
|
||||
name="{{ $name }}" placeholder="{{ $attributes->get('placeholder') }}"
|
||||
aria-placeholder="{{ $attributes->get('placeholder') }}"
|
||||
@if ($autofocus) x-ref="autofocusInput" @endif>
|
||||
@if ($autofocus) x-ref="autofocusInput" autofocus @endif>
|
||||
@if ($allowToPeak)
|
||||
<button type="button" x-on:click="type = type === 'password' ? 'text' : 'password'"
|
||||
class="password-toggle flex absolute inset-y-0 right-0 z-10 items-center pr-2 cursor-pointer text-neutral-500 hover:text-black dark:text-neutral-400 dark:hover:text-white"
|
||||
@@ -60,7 +60,7 @@
|
||||
maxlength="{{ $attributes->get('maxlength') }}"
|
||||
@if ($htmlId !== 'null') id={{ $htmlId }} @endif name="{{ $name }}"
|
||||
placeholder="{{ $attributes->get('placeholder') }}"
|
||||
@if ($autofocus) x-ref="autofocusInput" @endif>
|
||||
@if ($autofocus) x-ref="autofocusInput" autofocus @endif>
|
||||
@endif
|
||||
@if (!$label && $helper)
|
||||
<x-helper :helper="$helper" />
|
||||
|
||||
@@ -249,9 +249,10 @@
|
||||
</p>
|
||||
</div>
|
||||
<form action="/user/confirmed-two-factor-authentication" method="POST"
|
||||
class="flex items-end gap-2">
|
||||
class="flex items-end gap-2"
|
||||
x-init="$nextTick(() => $el.querySelector('input[name=code]')?.focus())">
|
||||
@csrf
|
||||
<x-forms.input type="text" inputmode="numeric" pattern="[0-9]*" id="code"
|
||||
<x-forms.input name="code" type="text" inputmode="numeric" pattern="[0-9]*" id="code"
|
||||
label="One-time code" required />
|
||||
<x-forms.button type="submit">Validate 2FA</x-forms.button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user