Files
tkPage/src/views/nav.vue

48 lines
1.6 KiB
Vue
Raw Normal View History

2025-07-01 21:02:39 +08:00
<template>
2026-01-16 19:00:07 +08:00
<div class="bg-background-light dark:bg-background-dark text-slate-800 dark:text-slate-200 subtle-grid shadow-2xl overflow-hidden mx-auto" style="width: 1600px; height: 900px;">
<div class="flex h-full overflow-hidden">
<Sidebar class="flex-none h-full" @activeIndex="activeIndexFn" />
<main class="flex-1 overflow-y-auto p-4 relative flex flex-col h-full bg-[#f3f5f9]">
<div v-show="activeIndexA == 1" class="h-full">
<workbenches />
</div>
<div v-show="activeIndexA == 2" class="h-full">
<hostsList />
</div>
<!-- Decorative blobs -->
<!-- <div class="absolute -top-24 -right-24 w-64 h-64 bg-primary/5 rounded-full blur-3xl pointer-events-none"></div> -->
<!-- <div class="absolute -bottom-24 -left-24 w-64 h-64 bg-secondary/5 rounded-full blur-3xl pointer-events-none"></div> -->
<!-- <div class="absolute bottom-2 right-4 text-xs text-slate-400">{{ version }}</div> -->
</main>
2025-07-01 21:02:39 +08:00
</div>
</div>
</template>
<script setup>
import Sidebar from '../components/Sidebar.vue';
import hostsList from '@/views/hosts/hostsList.vue'
import workbenches from '@/views/hosts/workbenches.vue'
import { ref } from 'vue'
let activeIndexA = ref(1)
2026-01-16 19:00:07 +08:00
const version = ref('v0.1.0')
2025-07-01 21:02:39 +08:00
function activeIndexFn(data) {
activeIndexA.value = data
console.log(data)
}
</script>
2026-01-16 19:00:07 +08:00
<style>
/* Global resets if needed, but Tailwind handles most */
body {
2025-07-01 21:02:39 +08:00
margin: 0;
padding: 0;
2026-01-16 19:00:07 +08:00
background-color: #f3f5f9; /* Match background */
2025-07-01 21:02:39 +08:00
display: flex;
2026-01-16 19:00:07 +08:00
justify-content: center;
2025-07-01 21:02:39 +08:00
align-items: center;
2026-01-16 19:00:07 +08:00
min-height: 100vh;
2025-07-01 21:02:39 +08:00
}
</style>