From 44545b473e5af6a476cc00b70dd2d2db8e25fe7d Mon Sep 17 00:00:00 2001 From: MadDogOwner Date: Sun, 17 May 2026 18:22:14 +0800 Subject: [PATCH 1/9] refactor(deps): migrate @hope-ui/solid to GitHub Signed-off-by: MadDogOwner --- package.json | 2 +- pnpm-lock.yaml | 34 +++++++++++++++------------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 62e5292c8..7fe7b1325 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "dependencies": { "@egjs/view360": "4.0.0-beta.7", "@embedpdf/snippet": "^2.14.2", - "@hope-ui/solid": "0.6.7", + "@hope-ui/solid": "github:OpenListTeam/hope-ui#afd4f5a0ba33b40bfe1557c5960744fe72486372", "@jellyfin/libass-wasm": "^4.2.4", "@monaco-editor/loader": "1.7.0", "@solid-primitives/i18n": "^2.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e1f9cd247..0a125e2b5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^2.14.2 version: 2.14.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(svelte@5.46.1)(vue@3.5.26(typescript@5.9.3)) '@hope-ui/solid': - specifier: 0.6.7 - version: 0.6.7(@stitches/core@1.2.8)(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13)) + specifier: github:OpenListTeam/hope-ui#afd4f5a0ba33b40bfe1557c5960744fe72486372 + version: https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/afd4f5a0ba33b40bfe1557c5960744fe72486372(@stitches/core@1.2.8)(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13)) '@jellyfin/libass-wasm': specifier: ^4.2.4 version: 4.2.4 @@ -1168,8 +1168,9 @@ packages: '@floating-ui/dom@0.4.4': resolution: {integrity: sha512-0Ulu3B/dqQplUUSqnTx0foSrlYuMN+GTtlJWvNJwt6Fr7/PqmlR/Y08o6/+bxDWr6p3roBJRaQ51MDZsNmEhhw==} - '@hope-ui/solid@0.6.7': - resolution: {integrity: sha512-7zGGy4QbGUC7QhwRnNH8HO0MZFg4jFISlC2cnAMBfFBy272uqQN3PYdTjiIbnpR/4JilUfxCWpFQY+4qslqcIw==} + '@hope-ui/solid@https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/afd4f5a0ba33b40bfe1557c5960744fe72486372': + resolution: {gitHosted: true, integrity: sha512-VxpN0Cc/ESSa9NNXhZLQX9NxEHa4gMjXXSQSZjT6/DV1FJUwWimPBji5YDjayG6ZpvDggJ5hyTvYO7AOquQkkQ==, tarball: https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/afd4f5a0ba33b40bfe1557c5960744fe72486372} + version: 0.6.7 peerDependencies: '@stitches/core': ^1.2.8 solid-js: ^1.4.0 @@ -2001,9 +2002,6 @@ packages: resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} engines: {node: '>= 6'} - csstype@3.0.11: - resolution: {integrity: sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==} - csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} @@ -2344,8 +2342,8 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} - focus-trap@6.7.3: - resolution: {integrity: sha512-8xCEKndV4KrseGhFKKKmczVA14yx1/hnmFICPOjcFjToxCJYj/NHH43tPc3YE/PLnLRNZoFug0EcWkGQde/miQ==} + focus-trap@7.6.5: + resolution: {integrity: sha512-7Ke1jyybbbPZyZXFxEftUtxFGLMpE2n6A+z//m4CRDlj0hW+o3iYSmh8nFlYMurOiJVDmJRilUQtJr08KfIxlg==} follow-redirects@1.16.0: resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==} @@ -3354,8 +3352,8 @@ packages: systemjs@6.15.1: resolution: {integrity: sha512-Nk8c4lXvMB98MtbmjX7JwJRgJOL8fluecYCfCeYBznwmpOs8Bf15hLM6z4z71EDAhQVrQrI+wt1aLWSXZq+hXA==} - tabbable@5.3.3: - resolution: {integrity: sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==} + tabbable@6.4.0: + resolution: {integrity: sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==} tailwind-merge@3.4.0: resolution: {integrity: sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==} @@ -4781,12 +4779,12 @@ snapshots: dependencies: '@floating-ui/core': 0.6.2 - '@hope-ui/solid@0.6.7(@stitches/core@1.2.8)(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13))': + '@hope-ui/solid@https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/afd4f5a0ba33b40bfe1557c5960744fe72486372(@stitches/core@1.2.8)(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13))': dependencies: '@floating-ui/dom': 0.4.4 '@stitches/core': 1.2.8 - csstype: 3.0.11 - focus-trap: 6.7.3 + csstype: 3.1.3 + focus-trap: 7.6.5 lodash.merge: 4.6.2 scroll-lock: 2.1.5 solid-js: 1.9.13 @@ -5623,8 +5621,6 @@ snapshots: css-what@6.1.0: {} - csstype@3.0.11: {} - csstype@3.1.3: {} csstype@3.2.3: {} @@ -5969,9 +5965,9 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 - focus-trap@6.7.3: + focus-trap@7.6.5: dependencies: - tabbable: 5.3.3 + tabbable: 6.4.0 follow-redirects@1.16.0: {} @@ -7219,7 +7215,7 @@ snapshots: systemjs@6.15.1: {} - tabbable@5.3.3: {} + tabbable@6.4.0: {} tailwind-merge@3.4.0: {} From ae95c8d7f9b5ac3db64b145b378f6abdde2cd359 Mon Sep 17 00:00:00 2001 From: j2rong4cn Date: Sun, 17 May 2026 20:55:33 +0800 Subject: [PATCH 2/9] fix(deps): update @hope-ui/solid dependency to latest commit --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 7fe7b1325..3d1c90492 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "dependencies": { "@egjs/view360": "4.0.0-beta.7", "@embedpdf/snippet": "^2.14.2", - "@hope-ui/solid": "github:OpenListTeam/hope-ui#afd4f5a0ba33b40bfe1557c5960744fe72486372", + "@hope-ui/solid": "github:OpenListTeam/hope-ui#31b436e36ae5d266016814ba71a442ffa9d91181", "@jellyfin/libass-wasm": "^4.2.4", "@monaco-editor/loader": "1.7.0", "@solid-primitives/i18n": "^2.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0a125e2b5..c897bcc90 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^2.14.2 version: 2.14.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(svelte@5.46.1)(vue@3.5.26(typescript@5.9.3)) '@hope-ui/solid': - specifier: github:OpenListTeam/hope-ui#afd4f5a0ba33b40bfe1557c5960744fe72486372 - version: https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/afd4f5a0ba33b40bfe1557c5960744fe72486372(@stitches/core@1.2.8)(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13)) + specifier: github:OpenListTeam/hope-ui#31b436e36ae5d266016814ba71a442ffa9d91181 + version: https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/31b436e36ae5d266016814ba71a442ffa9d91181(@stitches/core@1.2.8)(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13)) '@jellyfin/libass-wasm': specifier: ^4.2.4 version: 4.2.4 @@ -148,7 +148,7 @@ importers: version: 0.0.2(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13)) solid-icons: specifier: ^1.1.0 - version: 1.1.0(solid-js@1.9.13) + version: 1.2.0(solid-js@1.9.13) solid-js: specifier: ^1.9.13 version: 1.9.13 @@ -1168,8 +1168,8 @@ packages: '@floating-ui/dom@0.4.4': resolution: {integrity: sha512-0Ulu3B/dqQplUUSqnTx0foSrlYuMN+GTtlJWvNJwt6Fr7/PqmlR/Y08o6/+bxDWr6p3roBJRaQ51MDZsNmEhhw==} - '@hope-ui/solid@https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/afd4f5a0ba33b40bfe1557c5960744fe72486372': - resolution: {gitHosted: true, integrity: sha512-VxpN0Cc/ESSa9NNXhZLQX9NxEHa4gMjXXSQSZjT6/DV1FJUwWimPBji5YDjayG6ZpvDggJ5hyTvYO7AOquQkkQ==, tarball: https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/afd4f5a0ba33b40bfe1557c5960744fe72486372} + '@hope-ui/solid@https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/31b436e36ae5d266016814ba71a442ffa9d91181': + resolution: {gitHosted: true, integrity: sha512-9/mjxC68etkyl9un/eNBaW7zSALOs6KJKMfbD+B+Ufv7QnwqVufTl6wzI7q32/GFIcWPdbwZ1TvfzLngOGoWzA==, tarball: https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/31b436e36ae5d266016814ba71a442ffa9d91181} version: 0.6.7 peerDependencies: '@stitches/core': ^1.2.8 @@ -3251,8 +3251,8 @@ packages: solid-js: ^1.4.8 solid-transition-group: ^0.0.10 - solid-icons@1.1.0: - resolution: {integrity: sha512-IesTfr/F1ElVwH2E1110s2RPXH4pujKfSs+koT8rwuTAdleO5s26lNSpqJV7D1+QHooJj18mcOiz2PIKs0ic+A==} + solid-icons@1.2.0: + resolution: {integrity: sha512-yjQxWQMi9l19P5Af9vjsvalTMDFPDL4XD6etrUdNxNVhFp1bMYF0SFwUa5VYDfJ7u0SF3Qkz/F7BZxqcLUwklw==} peerDependencies: solid-js: '*' @@ -4779,7 +4779,7 @@ snapshots: dependencies: '@floating-ui/core': 0.6.2 - '@hope-ui/solid@https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/afd4f5a0ba33b40bfe1557c5960744fe72486372(@stitches/core@1.2.8)(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13))': + '@hope-ui/solid@https://codeload.github.com/OpenListTeam/hope-ui/tar.gz/31b436e36ae5d266016814ba71a442ffa9d91181(@stitches/core@1.2.8)(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13))': dependencies: '@floating-ui/dom': 0.4.4 '@stitches/core': 1.2.8 @@ -7089,7 +7089,7 @@ snapshots: solid-js: 1.9.13 solid-transition-group: 0.3.0(solid-js@1.9.13) - solid-icons@1.1.0(solid-js@1.9.13): + solid-icons@1.2.0(solid-js@1.9.13): dependencies: solid-js: 1.9.13 From d86da6ea5358ea7936bf73bc6cb6836f8df356ee Mon Sep 17 00:00:00 2001 From: j2rong4cn Date: Sun, 17 May 2026 20:55:47 +0800 Subject: [PATCH 3/9] fix(deps): add path mapping for @stitches/core/types in tsconfig --- tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig.json b/tsconfig.json index 0cbaa80a3..da3ab0db8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,7 @@ "noEmit": true, "isolatedModules": false, "paths": { + "@stitches/core/types/*": ["./node_modules/@stitches/core/types/*"], "@hope-ui/solid": ["./node_modules/@hope-ui/solid/dist/index.d.ts"], "solid-contextmenu": ["./node_modules/solid-contextmenu/dist/index.d.ts"], "~/*": ["./src/*"] From 09fb4238ec5226afcfe8065a28c321063d8b714b Mon Sep 17 00:00:00 2001 From: j2rong4cn Date: Sun, 17 May 2026 21:11:18 +0800 Subject: [PATCH 4/9] fix(deps): pin solid-icons version to 1.1.0 --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3d1c90492..05a4a17b1 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "seemly": "^0.3.10", "sha256": "^0.2.0", "solid-contextmenu": "0.0.2", - "solid-icons": "^1.1.0", + "solid-icons": "1.1.0", "solid-js": "^1.9.13", "solid-motionone": "^1.0.4", "solid-transition-group": "^0.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c897bcc90..f43f06482 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -147,8 +147,8 @@ importers: specifier: 0.0.2 version: 0.0.2(solid-js@1.9.13)(solid-transition-group@0.3.0(solid-js@1.9.13)) solid-icons: - specifier: ^1.1.0 - version: 1.2.0(solid-js@1.9.13) + specifier: 1.1.0 + version: 1.1.0(solid-js@1.9.13) solid-js: specifier: ^1.9.13 version: 1.9.13 @@ -3251,8 +3251,8 @@ packages: solid-js: ^1.4.8 solid-transition-group: ^0.0.10 - solid-icons@1.2.0: - resolution: {integrity: sha512-yjQxWQMi9l19P5Af9vjsvalTMDFPDL4XD6etrUdNxNVhFp1bMYF0SFwUa5VYDfJ7u0SF3Qkz/F7BZxqcLUwklw==} + solid-icons@1.1.0: + resolution: {integrity: sha512-IesTfr/F1ElVwH2E1110s2RPXH4pujKfSs+koT8rwuTAdleO5s26lNSpqJV7D1+QHooJj18mcOiz2PIKs0ic+A==} peerDependencies: solid-js: '*' @@ -7089,7 +7089,7 @@ snapshots: solid-js: 1.9.13 solid-transition-group: 0.3.0(solid-js@1.9.13) - solid-icons@1.2.0(solid-js@1.9.13): + solid-icons@1.1.0(solid-js@1.9.13): dependencies: solid-js: 1.9.13 From 2cdfbe7a6faca32c4d26bd6c61fa222519272337 Mon Sep 17 00:00:00 2001 From: MadDogOwner Date: Sun, 17 May 2026 21:14:38 +0800 Subject: [PATCH 5/9] fix(icons): resolve ts error Signed-off-by: MadDogOwner --- src/components/icons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/icons.tsx b/src/components/icons.tsx index 09008aba7..28b6c4733 100644 --- a/src/components/icons.tsx +++ b/src/components/icons.tsx @@ -1,4 +1,4 @@ -import { IconProps, IconTemplate } from "solid-icons/lib" +import { IconProps, IconTemplate } from "solid-icons" export function VscodeIconsFileTypePhotoshop2(props: IconProps) { return IconTemplate( From cd18663aef13813603bfc7f04cced90b1a6293cf Mon Sep 17 00:00:00 2001 From: MadDogOwner Date: Sun, 17 May 2026 21:20:55 +0800 Subject: [PATCH 6/9] fix(tsx): correct refs usage in Solid https://docs.solidjs.com/concepts/refs#refs-in-solid Signed-off-by: MadDogOwner --- src/pages/home/folder/Pager.tsx | 2 +- src/pages/home/previews/asciinema.tsx | 2 +- src/pages/home/toolbar/BatchRename.tsx | 2 +- src/pages/home/uploads/Upload.tsx | 8 ++++---- src/pages/manage/backup-restore.tsx | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/home/folder/Pager.tsx b/src/pages/home/folder/Pager.tsx index 07b252001..e803cc3a6 100644 --- a/src/pages/home/folder/Pager.tsx +++ b/src/pages/home/folder/Pager.tsx @@ -45,7 +45,7 @@ const AutoLoadMore = () => { threshold: 0.1, }, ) - let el: HTMLDivElement + let el!: HTMLDivElement onMount(() => { if (!allLoaded()) { ob.observe(el) diff --git a/src/pages/home/previews/asciinema.tsx b/src/pages/home/previews/asciinema.tsx index 163b79466..688225e37 100644 --- a/src/pages/home/previews/asciinema.tsx +++ b/src/pages/home/previews/asciinema.tsx @@ -5,7 +5,7 @@ import "asciinema-player/dist/bundle/asciinema-player.css" import { onMount } from "solid-js" import { objStore } from "~/store" export default function Preview() { - let d: HTMLDivElement + let d!: HTMLDivElement onMount(() => { AsciinemaPlayer.create(objStore.raw_url, d) diff --git a/src/pages/home/toolbar/BatchRename.tsx b/src/pages/home/toolbar/BatchRename.tsx index e74137cc3..31b86822a 100644 --- a/src/pages/home/toolbar/BatchRename.tsx +++ b/src/pages/home/toolbar/BatchRename.tsx @@ -252,7 +252,7 @@ export const BatchRename = () => { { + onChange={(event: string) => { setType(event) if (event === "1" || event === "3") { setNewNameType("string") diff --git a/src/pages/home/uploads/Upload.tsx b/src/pages/home/uploads/Upload.tsx index 14f276e13..3394b8bde 100644 --- a/src/pages/home/uploads/Upload.tsx +++ b/src/pages/home/uploads/Upload.tsx @@ -89,8 +89,8 @@ const Upload = () => { ["success", "error"].includes(status), ) } - let fileInput: HTMLInputElement - let folderInput: HTMLInputElement + let fileInput!: HTMLInputElement + let folderInput!: HTMLInputElement const handleAddFiles = async (files: File[]) => { if (files.length === 0) return setUploading(true) @@ -179,7 +179,7 @@ const Upload = () => { { // @ts-ignore @@ -191,7 +191,7 @@ const Upload = () => { multiple // @ts-ignore webkitdirectory - ref={folderInput!} + ref={folderInput} display="none" onChange={(e) => { // @ts-ignore diff --git a/src/pages/manage/backup-restore.tsx b/src/pages/manage/backup-restore.tsx index 5e425c191..650bd0b31 100644 --- a/src/pages/manage/backup-restore.tsx +++ b/src/pages/manage/backup-restore.tsx @@ -62,7 +62,7 @@ const BackupRestore = () => { const [password, setPassword] = createSignal("") const t = useT() useManageTitle("manage.sidemenu.backup-restore") - let logRef: HTMLDivElement + let logRef!: HTMLDivElement const [log, setLog] = createSignal< { type: LogType From 2bb2dbdf73f8f82bd1f8f2a0e26b6af5ce0ab253 Mon Sep 17 00:00:00 2001 From: MadDogOwner Date: Sun, 17 May 2026 21:40:38 +0800 Subject: [PATCH 7/9] chore(types): correct some typescript errors Signed-off-by: MadDogOwner --- src/pages/home/toolbar/LocalSettings.tsx | 1 + src/pages/manage/shares/Item.tsx | 4 +++- src/utils/api.ts | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/home/toolbar/LocalSettings.tsx b/src/pages/home/toolbar/LocalSettings.tsx index ff12b3f9d..4779ce50b 100644 --- a/src/pages/home/toolbar/LocalSettings.tsx +++ b/src/pages/home/toolbar/LocalSettings.tsx @@ -102,6 +102,7 @@ function LocalSettingEdit(props: LocalSetting) { }} style={{ "-moz-appearance": "textfield", + // @ts-ignore "::-webkit-inner-spin-button": { display: "none" }, "::-webkit-outer-spin-button": { display: "none" }, }} diff --git a/src/pages/manage/shares/Item.tsx b/src/pages/manage/shares/Item.tsx index d75808b2f..530a91b90 100644 --- a/src/pages/manage/shares/Item.tsx +++ b/src/pages/manage/shares/Item.tsx @@ -165,7 +165,9 @@ const Item = (props: ItemProps) => { value={props.value as string} valid={props.valid} readOnly={props.readonly} - basePath={props.basePath} + basePath={ + props.type === Type.MultiPath ? props.basePath : undefined + } onChange={(value) => { if (props.type === Type.MultiPath) { props.onChange?.(value) diff --git a/src/utils/api.ts b/src/utils/api.ts index 5af0a70bc..8e3e21d66 100644 --- a/src/utils/api.ts +++ b/src/utils/api.ts @@ -238,7 +238,10 @@ export const fetchText = async ( : undefined, }) const content = await resp.data.arrayBuffer() - const contentType = resp.headers["content-type"] + const contentType = + typeof resp.headers["Content-Type"] === "string" + ? resp.headers["Content-Type"] + : undefined return { content, contentType } } catch (e) { return ts From 8b1a7f740c038460a3e3319c933cff07c9841025 Mon Sep 17 00:00:00 2001 From: j2rong4cn Date: Sun, 17 May 2026 21:40:55 +0800 Subject: [PATCH 8/9] fix(previews): update Error component import alias in multiple files --- src/pages/home/folder/Pager.tsx | 2 +- src/pages/home/previews/asciinema.tsx | 2 +- src/pages/home/previews/doc.tsx | 4 ++-- src/pages/home/previews/ppt.tsx | 4 ++-- src/pages/home/previews/xls.tsx | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/home/folder/Pager.tsx b/src/pages/home/folder/Pager.tsx index e803cc3a6..1f14532d0 100644 --- a/src/pages/home/folder/Pager.tsx +++ b/src/pages/home/folder/Pager.tsx @@ -59,7 +59,7 @@ const AutoLoadMore = () => { when={!allLoaded()} fallback={{t("home.no_more")}} > - + ) } diff --git a/src/pages/home/previews/asciinema.tsx b/src/pages/home/previews/asciinema.tsx index 688225e37..3096533b8 100644 --- a/src/pages/home/previews/asciinema.tsx +++ b/src/pages/home/previews/asciinema.tsx @@ -10,5 +10,5 @@ export default function Preview() { onMount(() => { AsciinemaPlayer.create(objStore.raw_url, d) }) - return + return } diff --git a/src/pages/home/previews/doc.tsx b/src/pages/home/previews/doc.tsx index 6f0c91ce8..775ce7f0a 100644 --- a/src/pages/home/previews/doc.tsx +++ b/src/pages/home/previews/doc.tsx @@ -1,4 +1,4 @@ -import { BoxWithFullScreen, Error, FullLoading } from "~/components" +import { BoxWithFullScreen, FullLoading, Error as Erro } from "~/components" import { objStore } from "~/store" import { Box, IconButton, Tooltip } from "@hope-ui/solid" import { createSignal, onMount, onCleanup, Show } from "solid-js" @@ -209,7 +209,7 @@ const DocViewerApp = () => { {/* 错误状态 */} - + diff --git a/src/pages/home/previews/ppt.tsx b/src/pages/home/previews/ppt.tsx index 510817a1f..d0033803b 100644 --- a/src/pages/home/previews/ppt.tsx +++ b/src/pages/home/previews/ppt.tsx @@ -1,4 +1,4 @@ -import { BoxWithFullScreen, Error, FullLoading } from "~/components" +import { BoxWithFullScreen, Error as Erro, FullLoading } from "~/components" import { objStore } from "~/store" import { Box, IconButton, Tooltip } from "@hope-ui/solid" import { createSignal, onMount, onCleanup, Show } from "solid-js" @@ -242,7 +242,7 @@ const PPTViewerApp = () => { {/* 错误状态 */} - + diff --git a/src/pages/home/previews/xls.tsx b/src/pages/home/previews/xls.tsx index ef919373b..d8c4d44b1 100644 --- a/src/pages/home/previews/xls.tsx +++ b/src/pages/home/previews/xls.tsx @@ -1,4 +1,4 @@ -import { BoxWithFullScreen, Error, FullLoading } from "~/components" +import { BoxWithFullScreen, Error as Erro, FullLoading } from "~/components" import { objStore } from "~/store" import { Box, IconButton, Tooltip, Button, HStack } from "@hope-ui/solid" import { createSignal, onMount, For, Show } from "solid-js" @@ -295,7 +295,7 @@ const ExcelViewerApp = () => { {/* 错误状态 */} - + From 005afa57b95029d336b2ded6c7ec4ee991a337ec Mon Sep 17 00:00:00 2001 From: j2rong4cn Date: Sun, 17 May 2026 21:47:59 +0800 Subject: [PATCH 9/9] fix(api): simplify content type retrieval in fetchText function --- src/utils/api.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/api.ts b/src/utils/api.ts index 8e3e21d66..a1b982c17 100644 --- a/src/utils/api.ts +++ b/src/utils/api.ts @@ -238,10 +238,9 @@ export const fetchText = async ( : undefined, }) const content = await resp.data.arrayBuffer() + const rawContentType = resp.headers["content-type"] const contentType = - typeof resp.headers["Content-Type"] === "string" - ? resp.headers["Content-Type"] - : undefined + typeof rawContentType === "string" ? rawContentType : undefined return { content, contentType } } catch (e) { return ts