fix(auth): unify Desktop and Web SQLite DB path and fix browser autofill crash on Input/AuthGate

This commit is contained in:
Schwitzz
2026-10-30 16:18:17 -05:00
parent 09e9280da6
commit 668470da2b
8 changed files with 174 additions and 79 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
import { type InputHTMLAttributes } from "react";
import { useId, type InputHTMLAttributes } from "react";
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
label?: string;
@@ -7,7 +7,8 @@ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
}
export function Input({ label, hint, error, id, className = "", ...rest }: InputProps) {
const inputId = id ?? `input-${Math.random().toString(36).slice(2, 8)}`;
const reactId = useId();
const inputId = id ?? `input-${reactId}`;
return (
<div className="ps-field">
{label && <label htmlFor={inputId} className="ps-field-label">{label}</label>}
+3 -2
View File
@@ -1,4 +1,4 @@
import { type SelectHTMLAttributes } from "react";
import { useId, type SelectHTMLAttributes } from "react";
export interface SelectOption {
value: string;
@@ -11,7 +11,8 @@ export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
}
export function Select({ label, options, id, className = "", ...rest }: SelectProps) {
const selectId = id ?? `select-${Math.random().toString(36).slice(2, 8)}`;
const reactId = useId();
const selectId = id ?? `select-${reactId}`;
return (
<div className="ps-field">
{label && <label htmlFor={selectId} className="ps-field-label">{label}</label>}