feat: restructure application with new routing and layout components

- Added react-router configuration for improved navigation.
- Created a new AppLayout component for consistent layout structure.
- Implemented TopNavigation and BottomNavigation for enhanced user experience.
- Introduced a new Button component with customizable variants and sizes.
- Migrated existing App logic to a new structure, removing the old App.tsx.
- Updated styles with Tailwind CSS and custom utility functions.
- Added error boundary handling for better error management.
- Integrated new routes for home and other pages.
- Removed unused files and optimized the project structure.
This commit is contained in:
GW_MC
2026-05-28 04:05:07 +00:00
parent be74bf5fc1
commit 6d983b6cd9
17 changed files with 6355 additions and 215 deletions

View File

@@ -1,17 +1,26 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { reactRouter } from '@react-router/dev/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
// import react from '@vitejs/plugin-react';
// @ts-expect-error process is a nodejs global
const host = process.env.TAURI_DEV_HOST;
// https://vite.dev/config/
export default defineConfig(async () => ({
plugins: [react()],
plugins: [
// react(),
tailwindcss(),
reactRouter(),
],
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
// 1. prevent Vite from obscuring rust errors
clearScreen: false,
resolve: {
tsconfigPaths: true,
},
// 2. tauri expects a fixed port, fail if that port is not available
server: {
port: 1420,
@@ -19,14 +28,14 @@ export default defineConfig(async () => ({
host: host || false,
hmr: host
? {
protocol: "ws",
protocol: 'ws',
host,
port: 1421,
}
: undefined,
watch: {
// 3. tell Vite to ignore watching `src-tauri`
ignored: ["**/src-tauri/**"],
ignored: ['**/src-tauri/**'],
},
},
}));