feat: Implement server endpoints, store, and live dashboard
Backend: Server connection/config/admins DB queries, server API routes with auth-gated endpoints (overview, config CRUD, admin management). Frontend: Server store wired to API, dashboard fetches server data on mount with live status indicators, uptime formatting, and server config display. Logout now redirects to /login. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { RouterView, RouterLink, useRoute } from 'vue-router'
|
||||
import { RouterView, RouterLink, useRoute, useRouter } from 'vue-router'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
import { useServerStore } from '@/stores/server'
|
||||
import {
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
} from 'lucide-vue-next'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const auth = useAuthStore()
|
||||
const server = useServerStore()
|
||||
|
||||
@@ -48,6 +49,7 @@ function isActive(path: string): boolean {
|
||||
|
||||
function handleLogout() {
|
||||
auth.logout()
|
||||
router.push('/login')
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user