Fix console errors: React Router v7 flags, form a11y, bans 500
- Add v7_startTransition and v7_relativeSplatPath future flags to BrowserRouter to silence React Router deprecation warnings - Add hidden autocomplete='username' inputs to LoginPage and SetupPage so password managers and browsers stop warning about missing username fields in password forms - Mount fail2ban-dev-config volume into backend container at /config:ro so ban_service can open the fail2ban SQLite database returned by 'get dbfile'; this fixes the 500 on GET /api/dashboard/bans - Track compose.debug.yml in git (was previously untracked)
This commit is contained in:
@@ -43,7 +43,7 @@ import { BlocklistsPage } from "./pages/BlocklistsPage";
|
||||
function App(): React.JSX.Element {
|
||||
return (
|
||||
<FluentProvider theme={lightTheme}>
|
||||
<BrowserRouter>
|
||||
<BrowserRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
|
||||
<AuthProvider>
|
||||
<Routes>
|
||||
{/* Setup wizard — always accessible; redirects to /login if already done */}
|
||||
|
||||
@@ -129,6 +129,17 @@ export function LoginPage(): React.JSX.Element {
|
||||
)}
|
||||
|
||||
<form onSubmit={(ev) => void handleSubmit(ev)}>
|
||||
{/* Hidden username field — required by accessibility guidelines for
|
||||
password managers to correctly identify the credential form. */}
|
||||
<input
|
||||
type="text"
|
||||
autoComplete="username"
|
||||
aria-hidden="true"
|
||||
tabIndex={-1}
|
||||
value="bangui"
|
||||
readOnly
|
||||
style={{ display: "none" }}
|
||||
/>
|
||||
<div className={styles.field}>
|
||||
<Field label="Password" required>
|
||||
<Input
|
||||
|
||||
@@ -205,6 +205,17 @@ export function SetupPage(): React.JSX.Element {
|
||||
)}
|
||||
|
||||
<form onSubmit={(ev) => void handleSubmit(ev)}>
|
||||
{/* Hidden username field — required by accessibility guidelines for
|
||||
password managers to correctly identify the credential form. */}
|
||||
<input
|
||||
type="text"
|
||||
autoComplete="username"
|
||||
aria-hidden="true"
|
||||
tabIndex={-1}
|
||||
value="bangui"
|
||||
readOnly
|
||||
style={{ display: "none" }}
|
||||
/>
|
||||
<div className={styles.fields}>
|
||||
<Field
|
||||
label="Master Password"
|
||||
|
||||
Reference in New Issue
Block a user