diff --git a/apps/frontend/web/app/components/Resources/pagination.tsx b/apps/frontend/web/app/components/Resources/pagination.tsx index 58f0c2d42..2cefbf304 100644 --- a/apps/frontend/web/app/components/Resources/pagination.tsx +++ b/apps/frontend/web/app/components/Resources/pagination.tsx @@ -19,7 +19,9 @@ export const Pagination = (props: PaginationProps) => { const { page, complete, timestamp } = props; const isPrev = page > 1; const isNext = !complete; - const pages = isPrev ? [page - 1, page, page + 1, page + 2, page + 3] : [page, page + 1, page + 2, page + 3, page + 4]; + const pages = isPrev + ? [page - 1, page, page + 1, page + 2, page + 3] + : [page, page + 1, page + 2, page + 3, page + 4]; if (page === 1 && complete) { // Only one page data, no pagination @@ -52,10 +54,7 @@ export const Pagination = (props: PaginationProps) => { page={p} link={props.link} navigate={props.navigate} - className={clsx( - 'block', - p === page && 'text-pink-600' - )} + className={clsx('block', p === page && 'text-pink-600')} > {p} diff --git a/apps/frontend/web/app/components/Resources/tag.tsx b/apps/frontend/web/app/components/Resources/tag.tsx index 19f73887c..0aa819d8d 100644 --- a/apps/frontend/web/app/components/Resources/tag.tsx +++ b/apps/frontend/web/app/components/Resources/tag.tsx @@ -1,6 +1,6 @@ -import { memo } from 'react' +import { memo } from 'react'; -export const Tag = memo((props: { text: string; color?: string; className?: string }) => { +export const Tag = memo((props: { text: string; color?: string; className?: string }) => { const { text, className = '', color = 'bg-gray-200' } = props; return ( diff --git a/apps/frontend/web/app/components/Sidebar/sidebar.tsx b/apps/frontend/web/app/components/Sidebar/sidebar.tsx index c98b30927..232daf243 100644 --- a/apps/frontend/web/app/components/Sidebar/sidebar.tsx +++ b/apps/frontend/web/app/components/Sidebar/sidebar.tsx @@ -1,10 +1,10 @@ -import { useAtom } from "jotai" -import { isOpenSidebar } from "./atom" +import { useAtom } from 'jotai'; +import { isOpenSidebar } from './atom'; export function Sidebar() { const [isOpen] = useAtom(isOpenSidebar); - if (!isOpen) return
+ if (!isOpen) return
; - return
-} \ No newline at end of file + return
; +} diff --git a/apps/frontend/web/app/entry.client.tsx b/apps/frontend/web/app/entry.client.tsx index 94d5dc0de..1c0cd1d64 100644 --- a/apps/frontend/web/app/entry.client.tsx +++ b/apps/frontend/web/app/entry.client.tsx @@ -4,9 +4,9 @@ * For more information, see https://remix.run/file-conventions/entry.client */ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; +import { RemixBrowser } from '@remix-run/react'; +import { startTransition, StrictMode } from 'react'; +import { hydrateRoot } from 'react-dom/client'; startTransition(() => { hydrateRoot( diff --git a/apps/frontend/web/app/routes/detail.$provider.$providerId/route.tsx b/apps/frontend/web/app/routes/detail.$provider.$providerId/route.tsx index 53d05ff0c..562830378 100644 --- a/apps/frontend/web/app/routes/detail.$provider.$providerId/route.tsx +++ b/apps/frontend/web/app/routes/detail.$provider.$providerId/route.tsx @@ -181,7 +181,10 @@ export default function Resources() {

文件列表

{files.map((f) => ( -
+
{f.name}
{f.size}
diff --git a/apps/frontend/web/node/rss/schema.ts b/apps/frontend/web/node/rss/schema.ts index 6c5331d10..7b9889d75 100644 --- a/apps/frontend/web/node/rss/schema.ts +++ b/apps/frontend/web/node/rss/schema.ts @@ -1,25 +1,25 @@ import { z } from 'zod'; export const rssSchema = z.object({ - title: z.string().optional(), - description: z.string().optional(), - pubDate: z - .union([z.string(), z.number(), z.date()]) - .optional() - .transform((value) => (value === undefined ? value : new Date(value))) - .refine((value) => (value === undefined ? value : !isNaN(value.getTime()))), - customData: z.string().optional(), - categories: z.array(z.string()).optional(), - author: z.string().optional(), - commentsUrl: z.string().optional(), - source: z.object({ url: z.string().url(), title: z.string() }).optional(), - enclosure: z - .object({ - url: z.string(), - length: z.number().nonnegative().int().finite(), - type: z.string(), - }) - .optional(), - link: z.string().optional(), - content: z.string().optional(), -}); \ No newline at end of file + title: z.string().optional(), + description: z.string().optional(), + pubDate: z + .union([z.string(), z.number(), z.date()]) + .optional() + .transform((value) => (value === undefined ? value : new Date(value))) + .refine((value) => (value === undefined ? value : !isNaN(value.getTime()))), + customData: z.string().optional(), + categories: z.array(z.string()).optional(), + author: z.string().optional(), + commentsUrl: z.string().optional(), + source: z.object({ url: z.string().url(), title: z.string() }).optional(), + enclosure: z + .object({ + url: z.string(), + length: z.number().nonnegative().int().finite(), + type: z.string() + }) + .optional(), + link: z.string().optional(), + content: z.string().optional() +}); diff --git a/apps/frontend/web/package.json b/apps/frontend/web/package.json index 4b52cf3f6..a888ebd7c 100644 --- a/apps/frontend/web/package.json +++ b/apps/frontend/web/package.json @@ -7,7 +7,7 @@ "build": "remix vite:build", "deploy:worker": "wrangler deploy", "dev": "remix vite:dev", - "format": "prettier --write ./*.ts {app,worker}/**/*.{ts,tsx}", + "format": "prettier . **/*.{ts,tsx} --write", "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", "start": "remix-serve ./build/server/index.js", "typecheck": "tsc", @@ -54,4 +54,4 @@ "unocss-preset-shadcn": "^0.3.1", "vite-tsconfig-paths": "^4.2.1" } -} \ No newline at end of file +} diff --git a/apps/frontend/web/public/google79f036f71a58993a.html b/apps/frontend/web/public/google79f036f71a58993a.html index 6758fa6bb..b08ad59d2 100644 --- a/apps/frontend/web/public/google79f036f71a58993a.html +++ b/apps/frontend/web/public/google79f036f71a58993a.html @@ -1 +1 @@ -google-site-verification: google79f036f71a58993a.html \ No newline at end of file +google-site-verification: google79f036f71a58993a.html diff --git a/apps/frontend/web/tsconfig.json b/apps/frontend/web/tsconfig.json index 05ee72705..940e89b7e 100644 --- a/apps/frontend/web/tsconfig.json +++ b/apps/frontend/web/tsconfig.json @@ -1,15 +1,8 @@ { "extends": "../../../tsconfig.json", "compilerOptions": { - "lib": [ - "DOM", - "DOM.Iterable", - "ES2022" - ], - "types": [ - "@remix-run/node", - "vite/client" - ], + "lib": ["DOM", "DOM.Iterable", "ES2022"], + "types": ["@remix-run/node", "vite/client"], "isolatedModules": true, "esModuleInterop": true, "jsx": "react-jsx", @@ -24,12 +17,8 @@ "forceConsistentCasingInFileNames": true, "baseUrl": ".", "paths": { - "@/*": [ - "./app/*" - ], - "~/*": [ - "./app/*" - ] + "@/*": ["./app/*"], + "~/*": ["./app/*"] }, "noEmit": true }, @@ -41,4 +30,4 @@ "**/.client/**/*.ts", "**/.client/**/*.tsx" ] -} \ No newline at end of file +}