From 1b745b63f5eb613ba576e8bd4b404e0263ea7ad3 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Thu, 22 Aug 2024 10:27:24 +0800 Subject: [PATCH 1/4] hide settings in repo --- src/app/(main)/repos/[id]/@menu/Menu/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/(main)/repos/[id]/@menu/Menu/index.tsx b/src/app/(main)/repos/[id]/@menu/Menu/index.tsx index 05ed14c91447c..b617dd6f97bea 100644 --- a/src/app/(main)/repos/[id]/@menu/Menu/index.tsx +++ b/src/app/(main)/repos/[id]/@menu/Menu/index.tsx @@ -29,11 +29,11 @@ const FileMenu = memo<{ id: string }>(({ id }) => { // key: `/repos/${id}/testing`, // label: {t('tab.testing')}, // }, - { - icon: , - key: `/repos/${id}/settings`, - label: {t('tab.settings')}, - }, + // { + // icon: , + // key: `/repos/${id}/settings`, + // label: {t('tab.settings')}, + // }, ], [t], ); From 4213035e05671f9b1d607653313572ec11f9593f Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Thu, 22 Aug 2024 06:23:45 +0000 Subject: [PATCH 2/4] fix drag --- src/app/(main)/repos/[id]/@menu/Menu/index.tsx | 2 +- src/components/DragUpload/useDragUpload.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/(main)/repos/[id]/@menu/Menu/index.tsx b/src/app/(main)/repos/[id]/@menu/Menu/index.tsx index b617dd6f97bea..b8218a6bc38d0 100644 --- a/src/app/(main)/repos/[id]/@menu/Menu/index.tsx +++ b/src/app/(main)/repos/[id]/@menu/Menu/index.tsx @@ -1,7 +1,7 @@ 'use client'; import { Icon } from '@lobehub/ui'; -import { FileText, Settings2Icon } from 'lucide-react'; +import { FileText } from 'lucide-react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { memo, useMemo, useState } from 'react'; diff --git a/src/components/DragUpload/useDragUpload.tsx b/src/components/DragUpload/useDragUpload.tsx index d52351386112a..09e0aa5937777 100644 --- a/src/components/DragUpload/useDragUpload.tsx +++ b/src/components/DragUpload/useDragUpload.tsx @@ -107,12 +107,14 @@ export const useDragUpload = (onUploadFiles: (files: File[]) => Promise) = const handlePaste = async (event: ClipboardEvent) => { // get files from clipboard if (!event.clipboardData) return; - const items = Array.from(event.clipboardData?.items); + + const items = Array.from(event.clipboardData.items); + const otherFiles = Array.from(event.clipboardData.files); const files = await getFileListFromDataTransferItems(items); if (files.length === 0) return; - onUploadFiles(files); + onUploadFiles([...files, ...otherFiles]); }; useEffect(() => { From f67d5a495dcf5eb45a187bcb5833c01a267ceca3 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Thu, 22 Aug 2024 15:06:01 +0800 Subject: [PATCH 3/4] Update useDragUpload.tsx --- src/components/DragUpload/useDragUpload.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/DragUpload/useDragUpload.tsx b/src/components/DragUpload/useDragUpload.tsx index 09e0aa5937777..d52351386112a 100644 --- a/src/components/DragUpload/useDragUpload.tsx +++ b/src/components/DragUpload/useDragUpload.tsx @@ -107,14 +107,12 @@ export const useDragUpload = (onUploadFiles: (files: File[]) => Promise) = const handlePaste = async (event: ClipboardEvent) => { // get files from clipboard if (!event.clipboardData) return; - - const items = Array.from(event.clipboardData.items); - const otherFiles = Array.from(event.clipboardData.files); + const items = Array.from(event.clipboardData?.items); const files = await getFileListFromDataTransferItems(items); if (files.length === 0) return; - onUploadFiles([...files, ...otherFiles]); + onUploadFiles(files); }; useEffect(() => { From 2a5e14520a753c0c28cbd0eb48785fb5f5fcef30 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Thu, 22 Aug 2024 15:06:54 +0800 Subject: [PATCH 4/4] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fbf107671b752..a18fb226eb228 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "mammoth": "^1.8.0", "modern-screenshot": "^4.4.39", "nanoid": "^5.0.7", - "next": "^14.2.4", + "next": "14.2.5", "next-auth": "5.0.0-beta.15", "next-sitemap": "^4.2.3", "numeral": "^2.0.6",