From 5729caeea0a3a43cc3495e24a85753d3547791f8 Mon Sep 17 00:00:00 2001 From: monoid Date: Thu, 26 Jun 2025 21:22:11 +0900 Subject: [PATCH] feat: add ExplorerFindLink component to open paths in explorer --- packages/client/src/page/contentInfoPage.tsx | 22 ++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/client/src/page/contentInfoPage.tsx b/packages/client/src/page/contentInfoPage.tsx index 48e36fb..4b5f291 100644 --- a/packages/client/src/page/contentInfoPage.tsx +++ b/packages/client/src/page/contentInfoPage.tsx @@ -10,7 +10,7 @@ import { GalleryCard } from "@/components/gallery/GalleryCard.tsx"; import { useEffect, useRef } from "react"; import { useLogin } from "@/state/user.ts"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu.tsx"; -import { EllipsisVerticalIcon } from "lucide-react"; +import { EllipsisVerticalIcon, FileIcon } from "lucide-react"; import { RefreshCw, ScanSearch, Trash2, Paintbrush @@ -192,7 +192,10 @@ export function ContentInfoPage({ params }: ContentInfoPageProps) { }> - {`${data.basepath}/${data.filename}`} + + {`${data.basepath}/${data.filename}`} + + @@ -209,6 +212,21 @@ export function ContentInfoPage({ params }: ContentInfoPageProps) { ); } +function ExplorerFindLink({ path }: { path: string }) { + // remove F:\ from the path + if (path.startsWith("/data/sss/f/")) { + path = path.slice("/data/sss/f/".length); + } + return ( + + + + ); +} + function SimilarContentCard({ id, }: {