ReviewOS

also looking at this

loghqorg/loghq

refactor(ui): use shared auth submit buttons

#13
Merged glennmichael123 wants to merge refactor/loghq-shared-controls into main
4 files +74 -3
resources/views/login.stxmodified+2-2
Changes to resources/views/login.stx
@@ -163,7 +163,7 @@ async function onVerify(e: Event): Promise<void> {
163163 <span>Keep me signed in for 30 days</span>
164164 </label>
165165
166 <button type="submit" :disabled="loading()" :text="loading() ? 'Signing in…' : 'Sign in'" class="py-2.5 w-full font-semibold text-sm btn-solid">Sign in</button>
166 <Button type="submit" size="sm" fullWidth :disabled="loading()" :label="loading() ? 'Signing in…' : 'Sign in'" className="auth-submit">Sign in</Button>
167167 </form>
168168
169169 {{-- Step 2: TOTP, shown only when the account has 2FA enabled. --}}
@@ -173,7 +173,7 @@ async function onVerify(e: Event): Promise<void> {
173173 <label for="login-code" class="block mb-1.5 font-medium text-muted text-xs">Authentication code</label>
174174 <input id="login-code" name="code" type="text" inputmode="numeric" autocomplete="one-time-code" maxlength="6" placeholder="123456" :model="code" class="px-3.5 py-2.5 w-full text-sm field" :aria-invalid="error() ? 'true' : 'false'" :aria-describedby="error() ? 'login-error' : ''">
175175 </div>
176 <button type="submit" :disabled="loading()" :text="loading() ? 'Verifying…' : 'Verify and sign in'" class="py-2.5 w-full font-semibold text-sm btn-solid">Verify and sign in</button>
176 <Button type="submit" size="sm" fullWidth :disabled="loading()" :label="loading() ? 'Verifying…' : 'Verify and sign in'" className="auth-submit">Verify and sign in</Button>
177177 </form>
178178
179179 @if (oauthError)