chore: fix linting issues
This commit is contained in:
parent
1e7a6cfa50
commit
adcce08fa8
8 changed files with 15 additions and 16 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { OTPInput, OTPInputContext } from "input-otp";
|
import { OTPInput, OTPInputContext } from "input-otp";
|
||||||
import { MinusIcon } from "lucide-react";
|
|
||||||
|
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
|
|
||||||
|
|
@ -55,12 +54,8 @@ function InputOTPSlot({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
|
function InputOTPSeparator({ ...props }: React.ComponentProps<"hr">) {
|
||||||
return (
|
return <hr data-slot="input-otp-separator" {...props} />;
|
||||||
<div data-slot="input-otp-separator" role="separator" {...props}>
|
|
||||||
<MinusIcon />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { afterEach, describe, expect, test, vi } from "vitest";
|
import { afterEach, describe, expect, test, vi } from "vitest";
|
||||||
import { HttpResponse, http, server } from "~/test/msw/server";
|
import { HttpResponse, http, server } from "~/test/msw/server";
|
||||||
import { cleanup, render, screen, userEvent, waitFor } from "~/test/test-utils";
|
import { cleanup, render, screen, userEvent, waitFor } from "~/test/test-utils";
|
||||||
import { PASSKEY_LOGIN_FAILED_ERROR } from "~/lib/sso-errors";
|
import { getLoginErrorDescription, PASSKEY_LOGIN_FAILED_ERROR } from "~/lib/sso-errors";
|
||||||
|
|
||||||
const { mockGetLoginOptions, mockNavigate, mockPasskeySignIn } = vi.hoisted(() => ({
|
const { mockGetLoginOptions, mockNavigate, mockPasskeySignIn } = vi.hoisted(() => ({
|
||||||
mockGetLoginOptions: vi.fn(async () => ({ hasPasskeySignIn: false })),
|
mockGetLoginOptions: vi.fn(async () => ({ hasPasskeySignIn: false })),
|
||||||
|
|
@ -125,11 +125,7 @@ describe("LoginPage", () => {
|
||||||
|
|
||||||
render(<LoginPage error={"PASSKEY_LOGIN_FAILED"} />, { withSuspense: true });
|
render(<LoginPage error={"PASSKEY_LOGIN_FAILED"} />, { withSuspense: true });
|
||||||
|
|
||||||
expect(
|
expect(await screen.findByText(getLoginErrorDescription(PASSKEY_LOGIN_FAILED_ERROR))).toBeTruthy();
|
||||||
await screen.findByText(
|
|
||||||
"Passkey sign-in failed. If 2FA is enabled, use a passkey protected by a PIN, biometrics, or screen lock, or sign in with your password and authenticator code.",
|
|
||||||
),
|
|
||||||
).toBeTruthy();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("does not show error message for invalid error codes", async () => {
|
test("does not show error message for invalid error codes", async () => {
|
||||||
|
|
|
||||||
|
|
@ -228,6 +228,7 @@ export function LoginPage({ error }: LoginPageProps = {}) {
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
id="trust-device"
|
id="trust-device"
|
||||||
|
aria-label="Trust this device for 30 days"
|
||||||
checked={trustDevice}
|
checked={trustDevice}
|
||||||
onChange={(e) => setTrustDevice(e.target.checked)}
|
onChange={(e) => setTrustDevice(e.target.checked)}
|
||||||
className="h-4 w-4"
|
className="h-4 w-4"
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ export const NFSForm = ({ form }: Props) => {
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
aria-label="Mount volume as read-only"
|
||||||
checked={field.value ?? false}
|
checked={field.value ?? false}
|
||||||
onChange={(e) => field.onChange(e.target.checked)}
|
onChange={(e) => field.onChange(e.target.checked)}
|
||||||
className="rounded border-gray-300"
|
className="rounded border-gray-300"
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ export const RcloneForm = ({ form }: Props) => {
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
aria-label="Mount volume as read-only"
|
||||||
checked={field.value ?? false}
|
checked={field.value ?? false}
|
||||||
onChange={(e) => field.onChange(e.target.checked)}
|
onChange={(e) => field.onChange(e.target.checked)}
|
||||||
className="rounded border-gray-300"
|
className="rounded border-gray-300"
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ export const SMBForm = ({ form }: Props) => {
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
aria-label="Connect as guest"
|
||||||
checked={field.value ?? false}
|
checked={field.value ?? false}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
field.onChange(e.target.checked);
|
field.onChange(e.target.checked);
|
||||||
|
|
@ -179,6 +180,7 @@ export const SMBForm = ({ form }: Props) => {
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
aria-label="Map all files to container user/group"
|
||||||
checked={field.value ?? false}
|
checked={field.value ?? false}
|
||||||
onChange={(e) => field.onChange(e.target.checked)}
|
onChange={(e) => field.onChange(e.target.checked)}
|
||||||
className="rounded border-gray-300"
|
className="rounded border-gray-300"
|
||||||
|
|
@ -187,8 +189,8 @@ export const SMBForm = ({ form }: Props) => {
|
||||||
</div>
|
</div>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
Keep the old behavior by forcing the SMB mount to present every file and directory as owned by the
|
Keep the old behavior by forcing the SMB mount to present every file and directory as owned
|
||||||
container user and group instead of using server reported ownership.
|
by the container user and group instead of using server reported ownership.
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -205,6 +207,7 @@ export const SMBForm = ({ form }: Props) => {
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
aria-label="Mount volume as read-only"
|
||||||
checked={field.value ?? false}
|
checked={field.value ?? false}
|
||||||
onChange={(e) => field.onChange(e.target.checked)}
|
onChange={(e) => field.onChange(e.target.checked)}
|
||||||
className="rounded border-gray-300"
|
className="rounded border-gray-300"
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,7 @@ export const WebDAVForm = ({ form }: Props) => {
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
aria-label="Enable HTTPS for secure connections"
|
||||||
checked={field.value ?? false}
|
checked={field.value ?? false}
|
||||||
onChange={(e) => field.onChange(e.target.checked)}
|
onChange={(e) => field.onChange(e.target.checked)}
|
||||||
className="rounded border-gray-300"
|
className="rounded border-gray-300"
|
||||||
|
|
@ -128,6 +129,7 @@ export const WebDAVForm = ({ form }: Props) => {
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
aria-label="Mount volume as read-only"
|
||||||
checked={field.value ?? false}
|
checked={field.value ?? false}
|
||||||
onChange={(e) => field.onChange(e.target.checked)}
|
onChange={(e) => field.onChange(e.target.checked)}
|
||||||
className="rounded border-gray-300"
|
className="rounded border-gray-300"
|
||||||
|
|
|
||||||
2
bun.lock
2
bun.lock
|
|
@ -140,7 +140,7 @@
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"fumadocs-core": "^16.9.3",
|
"fumadocs-core": "^16.9.3",
|
||||||
"fumadocs-mdx": "^14.3.2",
|
"fumadocs-mdx": "^15.0.10",
|
||||||
"fumadocs-ui": "^16.9.3",
|
"fumadocs-ui": "^16.9.3",
|
||||||
"lucide-react": "^1.17.0",
|
"lucide-react": "^1.17.0",
|
||||||
"react": "^19.2.6",
|
"react": "^19.2.6",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue