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