diff --git a/napcat.webui/src/components/file_manage/file_table.tsx b/napcat.webui/src/components/file_manage/file_table.tsx index 296489a7..33f63fbf 100644 --- a/napcat.webui/src/components/file_manage/file_table.tsx +++ b/napcat.webui/src/components/file_manage/file_table.tsx @@ -82,7 +82,7 @@ export default function FileTable({ setPreviewImages([]) setPreviewIndex(0) setShowImage(false) - }, [files]) + }, [currentPath]) const onPreviewImage = (name: string, images: PreviewImage[]) => { const index = images.findIndex((image) => image.key === name) diff --git a/napcat.webui/src/components/file_manage/image_name_button.tsx b/napcat.webui/src/components/file_manage/image_name_button.tsx index 8c557a65..c1332f41 100644 --- a/napcat.webui/src/components/file_manage/image_name_button.tsx +++ b/napcat.webui/src/components/file_manage/image_name_button.tsx @@ -74,6 +74,9 @@ export default function ImageNameButton({ src={data} alt={name} className="w-8 h-8 flex-shrink-0" + classNames={{ + wrapper: 'w-8 h-8 flex-shrink-0' + }} radius="sm" /> )