From 94bbf11e4e37b880b111316f1af8006b05d38e2a Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Tue, 13 Jan 2026 15:19:50 +0800 Subject: 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. --- ui/src/App.svelte | 110 ++++++++++++++++++++++++++++++++++++++++++++++ ui/src/app.css | 1 + ui/src/assets/svelte.svg | 1 + ui/src/lib/Counter.svelte | 10 +++++ ui/src/main.ts | 9 ++++ 5 files changed, 131 insertions(+) create mode 100644 ui/src/App.svelte create mode 100644 ui/src/app.css create mode 100644 ui/src/assets/svelte.svg create mode 100644 ui/src/lib/Counter.svelte create mode 100644 ui/src/main.ts (limited to 'ui/src') diff --git a/ui/src/App.svelte b/ui/src/App.svelte new file mode 100644 index 0000000..a648f98 --- /dev/null +++ b/ui/src/App.svelte @@ -0,0 +1,110 @@ + + +
+ + + + +
+ +
+ +
+ + +
+ +
+
+ +
+

MINECRAFT

+
+ JAVA EDITION + Release 1.20.4 +
+
+
+ + +
+
+
S
+
+
Steve
+
+ Online +
+
+
+ +
+
+ + +
+ + +
+
+
+ + + {#if status !== "Ready"} +
+
Status
+
{status}
+
+ {/if} +
diff --git a/ui/src/app.css b/ui/src/app.css new file mode 100644 index 0000000..f1d8c73 --- /dev/null +++ b/ui/src/app.css @@ -0,0 +1 @@ +@import "tailwindcss"; diff --git a/ui/src/assets/svelte.svg b/ui/src/assets/svelte.svg new file mode 100644 index 0000000..c5e0848 --- /dev/null +++ b/ui/src/assets/svelte.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ui/src/lib/Counter.svelte b/ui/src/lib/Counter.svelte new file mode 100644 index 0000000..37d75ce --- /dev/null +++ b/ui/src/lib/Counter.svelte @@ -0,0 +1,10 @@ + + + diff --git a/ui/src/main.ts b/ui/src/main.ts new file mode 100644 index 0000000..664a057 --- /dev/null +++ b/ui/src/main.ts @@ -0,0 +1,9 @@ +import { mount } from 'svelte' +import './app.css' +import App from './App.svelte' + +const app = mount(App, { + target: document.getElementById('app')!, +}) + +export default app -- cgit v1.2.3-70-g09d2