refactor: 新增 ui.js 和 main.js 模組,啟用 ES6 Modules

新增檔案:
- js/ui.js - UI 操作、模組切換、預覽更新、表單資料收集
- js/main.js - 主程式初始化、事件監聽器設置、快捷鍵

更新檔案:
- index.html - 引用 ES6 模組 (type="module")

功能:
 模組切換功能
 標籤頁切換
 表單欄位監聽
 JSON 預覽更新
 快捷鍵支援 (Ctrl+S, Ctrl+N)
 用戶信息載入
 登出功能

注意:
- 大部分 JavaScript 代碼仍在 HTML 中(約 2400 行)
- 已建立核心模組架構,便於後續逐步遷移
- 使用 ES6 Modules,需要通過 HTTP Server 運行

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-05 17:18:28 +08:00
parent ee3db29c32
commit 12ceccc3d3
27 changed files with 9712 additions and 19 deletions

39
logo.svg Normal file
View File

@@ -0,0 +1,39 @@
<svg width="300" height="300" xmlns="http://www.w3.org/2000/svg">
<!-- 背景圓形 -->
<defs>
<linearGradient id="bgGradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#667eea;stop-opacity:1" />
<stop offset="100%" style="stop-color:#764ba2;stop-opacity:1" />
</linearGradient>
<linearGradient id="robotGradient" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:#f093fb;stop-opacity:1" />
<stop offset="100%" style="stop-color:#f5576c;stop-opacity:1" />
</linearGradient>
</defs>
<!-- 背景 -->
<circle cx="150" cy="150" r="145" fill="url(#bgGradient)"/>
<!-- AI 機器人頭部 -->
<rect x="90" y="80" width="120" height="100" rx="20" fill="url(#robotGradient)"/>
<!-- 天線 -->
<line x1="150" y1="60" x2="150" y2="80" stroke="#fff" stroke-width="4" stroke-linecap="round"/>
<circle cx="150" cy="55" r="8" fill="#ffd700"/>
<!-- 眼睛 -->
<circle cx="120" cy="120" r="15" fill="#fff"/>
<circle cx="180" cy="120" r="15" fill="#fff"/>
<circle cx="123" cy="123" r="8" fill="#2d3748"/>
<circle cx="183" cy="123" r="8" fill="#2d3748"/>
<!-- 嘴巴 - 顯示為困惑的表情 -->
<path d="M 120 155 Q 150 145 180 155" stroke="#fff" stroke-width="4" fill="none" stroke-linecap="round"/>
<!-- 問號裝飾 -->
<text x="70" y="200" font-family="Arial, sans-serif" font-size="40" fill="#fff" font-weight="bold">?</text>
<text x="210" y="200" font-family="Arial, sans-serif" font-size="40" fill="#fff" font-weight="bold">?</text>
<!-- AI 文字 -->
<text x="150" y="250" font-family="Arial, sans-serif" font-size="32" fill="#fff" font-weight="bold" text-anchor="middle">AI</text>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB