Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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#31b436e36ae5d266016814ba71a442ffa9d91181",
"@jellyfin/libass-wasm": "^4.2.4",
"@monaco-editor/loader": "1.7.0",
"@solid-primitives/i18n": "^2.2.1",
Expand Down Expand Up @@ -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",
Expand Down
36 changes: 16 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/icons.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconProps, IconTemplate } from "solid-icons/lib"
import { IconProps, IconTemplate } from "solid-icons"

export function VscodeIconsFileTypePhotoshop2(props: IconProps) {
return IconTemplate(
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/folder/Pager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const AutoLoadMore = () => {
threshold: 0.1,
},
)
let el: HTMLDivElement
let el!: HTMLDivElement
onMount(() => {
if (!allLoaded()) {
ob.observe(el)
Expand All @@ -59,7 +59,7 @@ const AutoLoadMore = () => {
when={!allLoaded()}
fallback={<Text fontStyle="italic">{t("home.no_more")}</Text>}
>
<FullLoading py="$2" size="md" thickness={3} ref={el!} />
<FullLoading py="$2" size="md" thickness={3} ref={el} />
</Show>
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/previews/asciinema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ 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)
})
return <Box w="$full" ref={d!} />
return <Box w="$full" ref={d} />
}
4 changes: 2 additions & 2 deletions src/pages/home/previews/doc.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -209,7 +209,7 @@ const DocViewerApp = () => {

{/* 错误状态 */}
<Show when={error()}>
<Error msg={t("preview.failed_load_doc")} h="70vh" />
<Erro msg={t("preview.failed_load_doc")} h="70vh" />
</Show>
</div>
</BoxWithFullScreen>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/previews/ppt.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -242,7 +242,7 @@ const PPTViewerApp = () => {

{/* 错误状态 */}
<Show when={error()}>
<Error msg={t("preview.failed_load_ppt")} h="70vh" />
<Erro msg={t("preview.failed_load_ppt")} h="70vh" />
</Show>
</div>
</BoxWithFullScreen>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/previews/xls.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -295,7 +295,7 @@ const ExcelViewerApp = () => {

{/* 错误状态 */}
<Show when={error()}>
<Error msg={t("preview.failed_load_excel")} h="70vh" />
<Erro msg={t("preview.failed_load_excel")} h="70vh" />
</Show>
</div>
</BoxWithFullScreen>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/toolbar/BatchRename.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export const BatchRename = () => {
<ModalBody>
<RadioGroup
defaultValue="1"
onChange={(event) => {
onChange={(event: string) => {
setType(event)
if (event === "1" || event === "3") {
setNewNameType("string")
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/toolbar/LocalSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
}}
Expand Down
8 changes: 4 additions & 4 deletions src/pages/home/uploads/Upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -179,7 +179,7 @@ const Upload = () => {
<Input
type="file"
multiple
ref={fileInput!}
ref={fileInput}
display="none"
onChange={(e) => {
// @ts-ignore
Expand All @@ -191,7 +191,7 @@ const Upload = () => {
multiple
// @ts-ignore
webkitdirectory
ref={folderInput!}
ref={folderInput}
display="none"
onChange={(e) => {
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion src/pages/manage/backup-restore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/pages/manage/shares/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ export const fetchText = async (
: undefined,
})
const content = await resp.data.arrayBuffer()
const contentType = resp.headers["content-type"]
const rawContentType = resp.headers["content-type"]
const contentType =
typeof rawContentType === "string" ? rawContentType : undefined
return { content, contentType }
} catch (e) {
return ts
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/*"]
Expand Down