From 4866ff8e9c68d932550e409eba5d243f5ffb3baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=84=AD=E6=B2=9B=E8=BB=92?= Date: Wed, 8 Oct 2025 01:11:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=84=AA=E5=8C=96=E8=A9=9E=E5=8D=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A0=81=E9=9D=A2=E9=AB=94=E9=A9=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 重新設計手機版詞卡布局,圖片放左上角,翻譯在詞彙下方 - 新增播放按鈕到詞卡列表,桌面版在音標旁,手機版在詞性旁 - 移除手機版音標顯示,精簡界面 - 調整 CEFR 和詞性標籤位置,底部左右分布更合理 - Logo 導航從儀表板改為詞卡頁面,保持導航一致性 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- frontend/app/login/page.tsx | 8 +- frontend/app/register/page.tsx | 4 +- .../components/flashcards/FlashcardCard.tsx | 126 +++++++++++------- frontend/components/shared/Navigation.tsx | 10 +- 4 files changed, 91 insertions(+), 57 deletions(-) diff --git a/frontend/app/login/page.tsx b/frontend/app/login/page.tsx index 2298004..62b6334 100644 --- a/frontend/app/login/page.tsx +++ b/frontend/app/login/page.tsx @@ -104,9 +104,9 @@ export default function LoginPage() { /> 記住我 - + {/* 忘記密碼? - + */} - + */}

還沒有帳號?{' '} diff --git a/frontend/app/register/page.tsx b/frontend/app/register/page.tsx index 374be46..1d0289c 100644 --- a/frontend/app/register/page.tsx +++ b/frontend/app/register/page.tsx @@ -206,7 +206,7 @@ export default function RegisterPage() { -

+ {/*
@@ -229,7 +229,7 @@ export default function RegisterPage() { 使用 Google 註冊 -
+
*/}

已經有帳號?{' '} diff --git a/frontend/components/flashcards/FlashcardCard.tsx b/frontend/components/flashcards/FlashcardCard.tsx index 71ac485..70c9f6e 100644 --- a/frontend/components/flashcards/FlashcardCard.tsx +++ b/frontend/components/flashcards/FlashcardCard.tsx @@ -2,6 +2,7 @@ import React from 'react' import Link from 'next/link' import { Flashcard } from '@/lib/services/flashcards' import { getCEFRColor, getFlashcardImageUrl, getPartOfSpeechDisplay } from '@/lib/utils/flashcardUtils' +import { BluePlayButton } from '@/components/shared/BluePlayButton' interface FlashcardCardProps { flashcard: Flashcard @@ -36,8 +37,8 @@ export const FlashcardCard: React.FC = ({ return (

- {/* CEFR標註 */} -
+ {/* CEFR標註 - 只在桌面版顯示 */} +
{flashcard.cefr || 'A1'} @@ -45,26 +46,66 @@ export const FlashcardCard: React.FC = ({ {/* 手機版布局 */}
- {/* 主要內容區 */} -
-

- {searchTerm ? highlightSearchTerm(flashcard.word || '未設定', searchTerm) : (flashcard.word || '未設定')} -

-

- {searchTerm ? highlightSearchTerm(flashcard.translation || '未設定', searchTerm) : (flashcard.translation || '未設定')} -

-
- - {getPartOfSpeechDisplay(flashcard.partOfSpeech)} - - {flashcard.pronunciation && ( - {flashcard.pronunciation} + {/* 頂部區域:圖片和詞彙信息 */} +
+ {/* 圖片區域 */} +
+ {hasExampleImage(flashcard) ? ( + {`${flashcard.word} + ) : ( +
+ {isGenerating ? ( +
+ ) : ( + + + + )} +
)}
+ + {/* 詞彙信息 */} +
+

+ {searchTerm ? highlightSearchTerm(flashcard.word || '未設定', searchTerm) : (flashcard.word || '未設定')} +

+

+ {searchTerm ? highlightSearchTerm(flashcard.translation || '未設定', searchTerm) : (flashcard.translation || '未設定')} +

+
- {/* 操作按鈕區 */} -
+ {/* 底部操作區域 */} +
+ {/* 左側:CEFR + 詞性 + 播放按鈕 */} +
+ + {flashcard.cefr || 'A1'} + + + {getPartOfSpeechDisplay(flashcard.partOfSpeech)} + + {flashcard.word && ( + + )} +
+ + {/* 右側:操作按鈕 */}
- {hasExampleImage(flashcard) ? ( -
- -
- ) : ( - - )} -
- -
- - 詳細 - + + + + + +
@@ -176,7 +199,18 @@ export const FlashcardCard: React.FC = ({ {searchTerm ? highlightSearchTerm(flashcard.translation || '未設定', searchTerm) : (flashcard.translation || '未設定')} {flashcard.pronunciation && ( - {flashcard.pronunciation} +
+ {flashcard.pronunciation} + {flashcard.word && ( + + )} +
)}
diff --git a/frontend/components/shared/Navigation.tsx b/frontend/components/shared/Navigation.tsx index 2eb5b0c..3eec2e8 100644 --- a/frontend/components/shared/Navigation.tsx +++ b/frontend/components/shared/Navigation.tsx @@ -41,7 +41,7 @@ export function Navigation({ showExitLearning = false, onExitLearning }: Navigat - + DramaLing @@ -91,12 +91,12 @@ export function Navigation({ showExitLearning = false, onExitLearning }: Navigat
{user?.displayName || user?.username} - + */}
)} @@ -134,7 +134,7 @@ export function Navigation({ showExitLearning = false, onExitLearning }: Navigat
{user?.username} - + */}