diff --git a/enjoy/src/i18n/en.json b/enjoy/src/i18n/en.json index 6f9ab3b2..69fccef2 100644 --- a/enjoy/src/i18n/en.json +++ b/enjoy/src/i18n/en.json @@ -153,6 +153,7 @@ "autoScroll": "auto scroll", "detail": "detail", "remove": "remove", + "share": "share", "loadMore": "Load more", "databaseError": "Failed to connect to database {{url}}", "somethingWentWrong": "Something went wrong", diff --git a/enjoy/src/i18n/zh-CN.json b/enjoy/src/i18n/zh-CN.json index 86e6bc6e..6870f263 100644 --- a/enjoy/src/i18n/zh-CN.json +++ b/enjoy/src/i18n/zh-CN.json @@ -153,6 +153,7 @@ "autoScroll": "自动滚动", "detail": "详情", "remove": "删除", + "share": "分享", "loadMore": "加载更多", "databaseError": "数据库错误 {{url}}", "somethingWentWrong": "出错了", diff --git a/enjoy/src/renderer/components/recordings/recording-card.tsx b/enjoy/src/renderer/components/recordings/recording-card.tsx index cc49067c..0cc60e92 100644 --- a/enjoy/src/renderer/components/recordings/recording-card.tsx +++ b/enjoy/src/renderer/components/recordings/recording-card.tsx @@ -1,9 +1,6 @@ import { useState, useContext } from "react"; import { AppSettingsProviderContext } from "@/renderer/context"; -import { - RecordingPlayer, - PronunciationAssessmentScoreIcon, -} from "@renderer/components"; +import { RecordingPlayer } from "@renderer/components"; import { AlertDialog, AlertDialogHeader, @@ -19,9 +16,8 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from "@renderer/components/ui"; -import { MoreHorizontalIcon, Trash2Icon, InfoIcon } from "lucide-react"; -import { formatDateTime , secondsToTimestamp } from "@renderer/lib/utils"; -import { useLongPress } from "@uidotdev/usehooks"; +import { ChevronDownIcon, Trash2Icon, InfoIcon, Share2Icon } from "lucide-react"; +import { formatDateTime, secondsToTimestamp } from "@renderer/lib/utils"; import { t } from "i18next"; export const RecordingCard = (props: { @@ -30,45 +26,19 @@ export const RecordingCard = (props: { onSelect?: () => void; }) => { const { recording, id, onSelect } = props; - const [isMenuOpen, setIsMenuOpen] = useState(false); const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false); const { EnjoyApp } = useContext(AppSettingsProviderContext); const [isPlaying, setIsPlaying] = useState(false); - const longPressAttrs = useLongPress( - () => { - setIsMenuOpen(true); - }, - { - onFinish: () => {}, - onCancel: () => {}, - threshold: 400, - } - ); - const handleDelete = () => { EnjoyApp.recordings.destroy(recording.id); }; return ( -