Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions page/src/components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
</div>

<div class="nav-links">
<router-link
to="/"
<router-link
to="/"
class="nav-link"
:class="{ active: $route.path === '/' }"
>
<span class="nav-icon">📊</span>
<span class="nav-text">仪表盘</span>
</router-link>
<router-link
to="/backends"

<router-link
to="/backends"
class="nav-link"
:class="{ active: $route.path === '/backends' }"
>
Expand All @@ -27,6 +27,15 @@
{{ backendStore.connectedBackendsCount }}
</span>
</router-link>

<router-link
to="/beagle-cam"
class="nav-link"
:class="{ active: $route.path === '/beagle-cam' }"
>
<span class="nav-icon">🐶</span>
<span class="nav-text">比格潜伏</span>
</router-link>
</div>

<div class="nav-actions">
Expand Down
6 changes: 6 additions & 0 deletions page/src/router/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createRouter, createWebHistory } from 'vue-router'
import DashboardView from '../views/DashboardView.vue'
import BackendView from '../views/BackendView.vue'
import BeagleCamHideoutView from '../views/BeagleCamHideoutView.vue'

const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
Expand All @@ -15,6 +16,11 @@ const router = createRouter({
name: 'backends',
component: BackendView,
},
{
path: '/beagle-cam',
name: 'beagle-cam',
component: BeagleCamHideoutView,
},
// 重定向所有其他路径到仪表盘
{
path: '/:pathMatch(.*)*',
Expand Down
Loading