diff --git a/frontend/app/flashcards/page.tsx b/frontend/app/flashcards/page.tsx
index 9e4f5a6..ba5f572 100644
--- a/frontend/app/flashcards/page.tsx
+++ b/frontend/app/flashcards/page.tsx
@@ -32,7 +32,7 @@ const getPartOfSpeechDisplay = (partOfSpeech: string): string => {
}
// 重構後的FlashcardsContent組件
-function FlashcardsContent() {
+function FlashcardsContent({ showForm, setShowForm }: { showForm: boolean; setShowForm: (show: boolean) => void }) {
const router = useRouter()
const toast = useToast()
const [activeTab, setActiveTab] = useState<'all-cards' | 'favorites'>('all-cards')
@@ -821,14 +821,69 @@ function PaginationControls({ searchState, searchActions }: PaginationControlsPr
下一頁
+
)
}
export default function FlashcardsPage() {
+ const [showForm, setShowForm] = useState(false)
+
return (
-
+
+
+ {/* 全域模態框 - 在最外層 */}
+ {showForm && (
+ setShowForm(false)}
+ >
+
e.stopPropagation()}
+ >
+
+
新增詞卡
+
+
+
+
{
+ console.log('詞卡創建成功');
+ setShowForm(false);
+ // TODO: 刷新詞卡列表
+ }}
+ onCancel={() => setShowForm(false)}
+ />
+
+
+ )}
)
}
\ No newline at end of file
diff --git a/frontend/app/learn/page.tsx b/frontend/app/learn/page.tsx
index 14065a9..29a19af 100644
--- a/frontend/app/learn/page.tsx
+++ b/frontend/app/learn/page.tsx
@@ -799,39 +799,6 @@ export default function LearnPage() {
- {/* 當前選擇突出顯示 */}
-
-
-
- {currentCard && (() => {
- const userCEFR = localStorage.getItem('userEnglishLevel') || 'A2';
- const wordCEFR = currentCard.difficultyLevel || 'A2';
- const context = getCurrentContext(userCEFR, wordCEFR);
- const contextData = generateContextTable(userCEFR, wordCEFR).find(c => c.isCurrent);
-
- return (
- <>
-
-
- 當前情境: {contextData?.icon} {context}
-
-
- 可用題型: {contextData?.reviewTypes.join(' | ')}
-
-
- >
- );
- })()}
-
-
-
系統已選擇
-
- {getModeIcon(mode)}
- {getModeLabel(mode)}
-
-
-
-
{/* 完整四情境對照表 */}
@@ -879,11 +846,6 @@ export default function LearnPage() {
-
-
-
🧠 智能適配說明:
-
系統根據您的CEFR等級和詞彙CEFR等級自動判斷學習情境,並智能選擇最適合的複習題型。
-
@@ -899,13 +861,6 @@ export default function LearnPage() {
)}
- {/* System Auto-Selected Review Type Indicator */}
-
-
{mode === 'flip-memory' ? (
/* Flip Card Mode */