Commit Graph

3 Commits

Author SHA1 Message Date
鄭沛軒 d742cf52f9 feat: BluePlayButton 內建 TTS 邏輯重構 + TypeScript 錯誤修復
重構亮點:
• BluePlayButton 內建完整 TTS 播放邏輯
• 移除 8 個組件中 97 行重複代碼
• 組件使用極度簡化:複雜配置 → 一行代碼

技術優化:
• 修復 TypeScript "Type 'never'" 錯誤
• 重新設計邏輯流程,清晰的條件分支
• 支援標準 TTS + 自定義播放兩種模式

使用簡化:
• 從: <BluePlayButton isPlaying={state} onToggle={handler} />
• 到: <BluePlayButton text="hello" />

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 16:51:45 +08:00
鄭沛軒 df1c2b92ef feat: 全應用播放按鈕統一為藍底漸層設計 + 架構簡化
組件統一:
• 創建 BluePlayButton 統一組件 - 支援 sm/md/lg 三種尺寸
• 替換 10 個組件中的播放按鈕為統一的藍底漸層設計
• 移除 AudioPlayer 中間層抽象,直接使用 BluePlayButton

清理優化:
• 刪除未使用的 TTSButton 和 AudioPlayer 組件
• 簡化組件架構,每個組件內建 TTS 播放邏輯
• 統一 speechSynthesis API 使用方式

視覺統一:
• 藍底漸層 + 綠色播放中狀態 + 波紋動畫
• 響應式尺寸適配不同使用場景
• 完整的播放/暫停/禁用狀態設計

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 15:11:02 +08:00
鄭沛軒 b7e7a723bf feat: 新增Generate頁面組件重構架構 + 語法錯誤修復
• 新增專用組件庫:
  - GrammarCorrectionPanel: 語法修正面板組件
  - IdiomDetailModal: 慣用語詳情彈窗組件
  - IdiomDisplaySection: 慣用語展示區組件

• 修復Generate頁面語法錯誤,確保前端正常編譯
• 更新重構計劃文檔,記錄進度統計

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 03:00:04 +08:00