mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-29 00:24:46 +01:00
refactor: fixed window when uploading files (#232)
This commit is contained in:
@@ -6,16 +6,22 @@ import { useChatStore } from "@/stores/chatStore";
|
||||
import { metadata, icon } from "tauri-plugin-fs-pro-api";
|
||||
import { nanoid } from "nanoid";
|
||||
import Tooltip from "../Common/Tooltip";
|
||||
import { useAppStore } from "@/stores/appStore";
|
||||
|
||||
const InputExtra = () => {
|
||||
const uploadFiles = useChatStore((state) => state.uploadFiles);
|
||||
const setUploadFiles = useChatStore((state) => state.setUploadFiles);
|
||||
const setIsPinned = useAppStore((state) => state.setIsPinned);
|
||||
|
||||
const uploadFile = async () => {
|
||||
setIsPinned(true);
|
||||
|
||||
const selectedFiles = await open({
|
||||
multiple: true,
|
||||
});
|
||||
|
||||
setIsPinned(false);
|
||||
|
||||
if (isNil(selectedFiles)) return;
|
||||
|
||||
const files: typeof uploadFiles = [];
|
||||
|
||||
Reference in New Issue
Block a user