From a9d02472942d3871758d885178da96d1d8a60b28 Mon Sep 17 00:00:00 2001 From: goddonebianu Date: Sun, 12 Oct 2025 19:48:40 +0800 Subject: [PATCH] ... --- ...24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg | 1 + src/app/text-speaker/SaveList.tsx | 35 +++++++--- src/app/text-speaker/page.tsx | 64 +++++++++---------- src/config/images.ts | 1 + 4 files changed, 60 insertions(+), 41 deletions(-) create mode 100644 public/images/delete_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg diff --git a/public/images/delete_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg b/public/images/delete_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg new file mode 100644 index 0000000..ef53c23 --- /dev/null +++ b/public/images/delete_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/text-speaker/SaveList.tsx b/src/app/text-speaker/SaveList.tsx index cd54415..931d6e6 100644 --- a/src/app/text-speaker/SaveList.tsx +++ b/src/app/text-speaker/SaveList.tsx @@ -5,6 +5,8 @@ import { getTextSpeakerData, setTextSpeakerData } from "@/utils"; import { useState } from "react"; import z from "zod"; import { TextSpeakerItemSchema } from "@/interfaces"; +import IconClick from "@/components/IconClick"; +import IMAGES from "@/config/images"; interface TextCardProps { item: z.infer; @@ -23,13 +25,18 @@ function TextCard({ handleDel(item); } return ( -
-
-
{item.text.length > 80 ? item.text.slice(0, 80) + '...' : item.text}
-
{item.ipa ? (item.ipa.length > 160 ? item.ipa.slice(0, 160) + '...' : item.ipa) : ''}
+
+
+
{item.text}
+
{item.ipa}
- - + +
); } @@ -62,8 +69,20 @@ export default function SaveList({ } if (show) return (
- - +
+ + +
    {data.map(v => diff --git a/src/app/text-speaker/page.tsx b/src/app/text-speaker/page.tsx index 63dfbb2..fea1cd3 100644 --- a/src/app/text-speaker/page.tsx +++ b/src/app/text-speaker/page.tsx @@ -234,7 +234,35 @@ export default function Home() {
    {ipa}
    -
    +
    + {showSpeedAdjust && ( +
    + + + + + +
    )} @@ -246,7 +274,8 @@ export default function Home() { > setShowSpeedAdjust(!showSpeedAdjust)} src={IMAGES.more_horiz} - alt="more"> + alt="more" + className={`${showSpeedAdjust ? 'bg-gray-200' : ''}`}> @@ -260,37 +289,6 @@ export default function Home() { selected={showSaveList}>
    -
    - { - showSpeedAdjust ? (<> - - - - - - ) : <> - } -
diff --git a/src/config/images.ts b/src/config/images.ts index 96ff5c6..a0ae453 100644 --- a/src/config/images.ts +++ b/src/config/images.ts @@ -13,6 +13,7 @@ const IMAGES = { refresh: '/images/refresh_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg', more_horiz: '/images/more_horiz_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg', save: '/images/save_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg', + delete: '/images/delete_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg', } export default IMAGES; \ No newline at end of file