|
|
@ -1,6 +1,8 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import { useProject, useRoute, useSidebar, useTabs } from '#imports' |
|
|
|
import { useProject, useRoute, useSidebar, useTabs, useToggle } from '#imports' |
|
|
|
import { TabType } from '~/composables' |
|
|
|
import { TabType } from '~/composables' |
|
|
|
|
|
|
|
import MaterialSymbolsChevronRightRounded from '~icons/material-symbols/chevron-right-rounded' |
|
|
|
|
|
|
|
import MaterialSymbolsChevronLeftRounded from '~icons/material-symbols/chevron-left-rounded' |
|
|
|
|
|
|
|
|
|
|
|
const route = useRoute() |
|
|
|
const route = useRoute() |
|
|
|
|
|
|
|
|
|
|
@ -8,7 +10,9 @@ const { loadProject, loadTables } = useProject(route.params.projectId as string) |
|
|
|
|
|
|
|
|
|
|
|
const { addTab, clearTabs } = useTabs() |
|
|
|
const { addTab, clearTabs } = useTabs() |
|
|
|
|
|
|
|
|
|
|
|
useSidebar({ isOpen: true }) |
|
|
|
useSidebar({ hasSidebar: true, isOpen: true }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [isOpen, toggle] = useToggle(true) |
|
|
|
|
|
|
|
|
|
|
|
clearTabs() |
|
|
|
clearTabs() |
|
|
|
if (!route.params.type) { |
|
|
|
if (!route.params.type) { |
|
|
@ -23,12 +27,28 @@ await loadTables() |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<NuxtLayout id="sidebar-right" class="flex"> |
|
|
|
<NuxtLayout id="sidebar-right" class="flex"> |
|
|
|
<a-layout-sider |
|
|
|
<a-layout-sider |
|
|
|
|
|
|
|
:collapsed="!isOpen" |
|
|
|
width="250" |
|
|
|
width="250" |
|
|
|
collapsed-width="0" |
|
|
|
collapsed-width="0" |
|
|
|
class="bg-white dark:!bg-gray-800 border-r-1 border-gray-200 dark:!border-gray-600 h-full" |
|
|
|
class="relative bg-white dark:!bg-gray-800 border-r-1 border-gray-200 dark:!border-gray-600 h-full" |
|
|
|
:trigger="null" |
|
|
|
:trigger="null" |
|
|
|
collapsible |
|
|
|
collapsible |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
class="group color-transition cursor-pointer hover:ring active:ring-pink-500 z-1 flex items-center absolute top-10 right-[-0.75rem] shadow bg-gray-200 rounded-full" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<MaterialSymbolsChevronLeftRounded |
|
|
|
|
|
|
|
v-if="isOpen" |
|
|
|
|
|
|
|
class="transform group-hover:(scale-110 text-pink-500) text-xl text-gray-400" |
|
|
|
|
|
|
|
@click="toggle(false)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<MaterialSymbolsChevronRightRounded |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
class="transform group-hover:(scale-110 text-pink-500) text-xl text-gray-400" |
|
|
|
|
|
|
|
@click="toggle(true)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
<DashboardTreeView /> |
|
|
|
<DashboardTreeView /> |
|
|
|
</a-layout-sider> |
|
|
|
</a-layout-sider> |
|
|
|
|
|
|
|
|
|
|
|