diff --git a/gui/src-frontend/src/App.tsx b/gui/src-frontend/src/App.tsx index d94ed79..08c9835 100644 --- a/gui/src-frontend/src/App.tsx +++ b/gui/src-frontend/src/App.tsx @@ -1,9 +1,55 @@ -export default function App() { +import { QrProvider, useQrState } from './store/qrContext'; +import ModePanel from './components/ModePanel'; +import QrPreview from './components/QrPreview'; +import ExportPanel from './components/ExportPanel'; +import HistoryList from './components/HistoryList'; + +function AppLayout() { return ( -
-

- 🀫 QRGen GUI — 开发中 -

+
+ {/* 顶部标题栏 */} +
+ + 🀫 QRGen + +
+ + {/* 三栏主体 */} +
+ +
+ +
+
+ +
+ +
+
+
+ + {/* 底部输入区 */} +
+ +
); } + +function BottomInput() { + const { state } = useQrState(); + + return ( +
+ 输入区 — 开发中(当前模式: {state.mode}) +
+ ); +} + +export default function App() { + return ( + + + + ); +} diff --git a/gui/src-frontend/src/components/ExportPanel.tsx b/gui/src-frontend/src/components/ExportPanel.tsx new file mode 100644 index 0000000..3d718ee --- /dev/null +++ b/gui/src-frontend/src/components/ExportPanel.tsx @@ -0,0 +1,8 @@ +export default function ExportPanel() { + return ( +
+
导出选项
+
开发中...
+
+ ); +} diff --git a/gui/src-frontend/src/components/HistoryList.tsx b/gui/src-frontend/src/components/HistoryList.tsx new file mode 100644 index 0000000..c5a7309 --- /dev/null +++ b/gui/src-frontend/src/components/HistoryList.tsx @@ -0,0 +1,8 @@ +export default function HistoryList() { + return ( +
+
📋 历史记录
+

暂无记录

+
+ ); +} diff --git a/gui/src-frontend/src/components/ModePanel.tsx b/gui/src-frontend/src/components/ModePanel.tsx new file mode 100644 index 0000000..8f92ef6 --- /dev/null +++ b/gui/src-frontend/src/components/ModePanel.tsx @@ -0,0 +1,27 @@ +import { useQrState } from '../store/qrContext'; +import { MODES, MODE_LABELS } from '../types'; + +export default function ModePanel() { + const { state, dispatch } = useQrState(); + + return ( +
+
+ 编码模式 +
+ {MODES.map(mode => ( + + ))} +
+ ); +} diff --git a/gui/src-frontend/src/components/QrPreview.tsx b/gui/src-frontend/src/components/QrPreview.tsx new file mode 100644 index 0000000..ca8f919 --- /dev/null +++ b/gui/src-frontend/src/components/QrPreview.tsx @@ -0,0 +1,9 @@ +export default function QrPreview() { + return ( +
+
+ 输入内容生成 QR 码 +
+
+ ); +}