diff options
| author | 2026-01-13 15:19:50 +0800 | |
|---|---|---|
| committer | 2026-01-13 15:19:50 +0800 | |
| commit | 94bbf11e4e37b880b111316f1af8006b05d38e2a (patch) | |
| tree | 090908cd31d387c4cda683582719c3492b2bf31f /ui/main.js | |
| parent | 7ca72b953e1e42659376016e0eb048593e31ed6d (diff) | |
| download | DropOut-94bbf11e4e37b880b111316f1af8006b05d38e2a.tar.gz DropOut-94bbf11e4e37b880b111316f1af8006b05d38e2a.zip | |
feat: Initialize Svelte application with Tailwind CSS and Tauri integration
- Added main application structure in App.svelte with a sidebar and main content area.
- Implemented game launch functionality using Tauri's invoke API.
- Included SVG icons for Vite and Svelte in the assets.
- Set up Tailwind CSS for styling in app.css.
- Created a Counter component for demonstration purposes.
- Configured TypeScript support with appropriate tsconfig files.
- Established Vite configuration for building the application.
Diffstat (limited to 'ui/main.js')
| -rw-r--r-- | ui/main.js | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/ui/main.js b/ui/main.js deleted file mode 100644 index 33099cd..0000000 --- a/ui/main.js +++ /dev/null @@ -1,15 +0,0 @@ -const { invoke } = window.__TAURI__.core; - -const startBtn = document.getElementById("start-game-btn"); -const statusText = document.getElementById("status-text"); - -startBtn.addEventListener("click", async () => { - statusText.textContent = "正在获取 Manifest..."; - try { - const response = await invoke("start_game"); - statusText.textContent = response; - } catch (error) { - statusText.textContent = "错误: " + error; - console.error(error); - } -}); |