fix: build failed. #2156

This commit is contained in:
huzibaca 2024-11-27 05:07:02 +08:00
parent 1b80ddf1e9
commit bb1b156d2f
2 changed files with 6 additions and 8 deletions

View File

@ -1,12 +1,13 @@
import { IconButton, Fade } from "@mui/material"; import { IconButton, Fade, SxProps, Theme } from "@mui/material";
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp"; import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
interface Props { interface Props {
onClick: () => void; onClick: () => void;
show: boolean; show: boolean;
sx?: SxProps<Theme>;
} }
export const ScrollTopButton = ({ onClick, show }: Props) => { export const ScrollTopButton = ({ onClick, show, sx }: Props) => {
return ( return (
<Fade in={show}> <Fade in={show}>
<IconButton <IconButton
@ -26,6 +27,7 @@ export const ScrollTopButton = ({ onClick, show }: Props) => {
: "rgba(0,0,0,0.2)", : "rgba(0,0,0,0.2)",
}, },
visibility: show ? "visible" : "hidden", visibility: show ? "visible" : "hidden",
...sx,
}} }}
> >
<KeyboardArrowUpIcon /> <KeyboardArrowUpIcon />

View File

@ -1,8 +1,7 @@
import useSWR, { mutate } from "swr"; import useSWR from "swr";
import { useEffect, useMemo, useRef, useState } from "react"; import { useEffect, useMemo, useRef, useState } from "react";
import { useLockFn } from "ahooks"; import { useLockFn } from "ahooks";
import { Box, Button, IconButton, Stack, Divider, Grid2 } from "@mui/material"; import { Box, Button, IconButton, Stack, Divider, Grid2 } from "@mui/material";
import { FileDropEvent, getCurrent } from "@tauri-apps/plugin-window";
import { import {
DndContext, DndContext,
closestCenter, closestCenter,
@ -75,7 +74,6 @@ const ProfilePage = () => {
const unlisten = await addListener( const unlisten = await addListener(
TauriEvent.DRAG_DROP, TauriEvent.DRAG_DROP,
async (event: any) => { async (event: any) => {
console.log("文件拖放事件:", event);
const paths = event.payload.paths; const paths = event.payload.paths;
for (let file of paths) { for (let file of paths) {
@ -131,9 +129,7 @@ const ProfilePage = () => {
const type1 = ["local", "remote"]; const type1 = ["local", "remote"];
const profileItems = items.filter((i) => i && type1.includes(i.type!)); return items.filter((i) => i && type1.includes(i.type!));
return profileItems;
}, [profiles]); }, [profiles]);
const currentActivatings = () => { const currentActivatings = () => {