mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 03:32:06 +00:00
ae4eef53de
### Motivation - Provide a multi-tab dashboard layout so users can navigate between logical sections (Dashboard, Players, Graphics, Settings, About) via a persistent sidebar. - Integrate `vue-router` to manage in-app navigation inside the Quasar layout for a cleaner, scalable dashboard structure. ### Description - Added `vue-router` as a dev dependency and created `src/dashboard/example/router.ts` with routes for the five views (`/`, `/players`, `/graphics`, `/settings`, `/about`). - Replaced the example dashboard UI with a Quasar `QLayout` in `src/dashboard/example/main.vue` that includes a left `QDrawer` sidebar and a `RouterView` outlet, and wired the app to the router in `src/dashboard/example/main.ts`. - Added simple stub views for each tab under `src/dashboard/example/views/` (`Dashboard.vue`, `Players.vue`, `Graphics.vue`, `Settings.vue`, `About.vue`). - Adjusted `src/dashboard/template.html` to remove the default NodeCG body margin (`margin: 0`) so the layout can occupy the full panel area. ### Testing - Ran `npm install` which completed and added the new package with audit warnings about vulnerabilities reported. (succeeded) - Started the dev server with `npx vite` which reported the inputs and served the bundle at `http://localhost:4173/bundles/scoreko-dev/` and `vue-tsc` reported `Found 0 errors` while watching. (succeeded) - Attempted a Playwright screenshot run to capture the dashboard UI, but the Chromium process crashed (`TargetClosedError` / SIGSEGV) so no screenshot was produced. (failed) ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69876e97329c832a8af7179a9175d88b)
20 lines
747 B
TypeScript
20 lines
747 B
TypeScript
import { createRouter, createWebHashHistory } from 'vue-router';
|
|
import AboutView from './views/About.vue';
|
|
import DashboardView from './views/Dashboard.vue';
|
|
import GraphicsView from './views/Graphics.vue';
|
|
import PlayersView from './views/Players.vue';
|
|
import SettingsView from './views/Settings.vue';
|
|
|
|
const router = createRouter({
|
|
history: createWebHashHistory(),
|
|
routes: [
|
|
{ path: '/', name: 'dashboard', component: DashboardView },
|
|
{ path: '/players', name: 'players', component: PlayersView },
|
|
{ path: '/graphics', name: 'graphics', component: GraphicsView },
|
|
{ path: '/settings', name: 'settings', component: SettingsView },
|
|
{ path: '/about', name: 'about', component: AboutView },
|
|
],
|
|
});
|
|
|
|
export default router;
|