Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update layout for quickstart (#5685)

Liu Ji5c6a09e75ed8
diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vue
index 3fc2f7e1ea..d3ce0c8d54 100644
--- a/frontend/src/layouts/BodyLayout.vue
+++ b/frontend/src/layouts/BodyLayout.vue
@@ -1,28 +1,100 @@
<template>
- <div class="h-full flex overflow-hidden">
- <!-- Off-canvas menu for mobile, show/hide based on off-canvas menu state. -->
- <div v-if="state.showMobileOverlay" class="md:hidden">
- <div class="fixed inset-0 flex z-40">
- <div class="fixed inset-0">
- <div class="absolute inset-0 bg-gray-600 opacity-75"></div>
- </div>
- <div
- tabindex="0"
- class="relative flex-1 flex flex-col max-w-xs w-full bg-white focus:outline-none"
- >
- <div class="absolute top-0 right-0 -mr-12 pt-2">
- <button
- type="button"
- class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white"
- @click.prevent="state.showMobileOverlay = false"
+ <div class="h-full flex flex-col overflow-hidden">
+ <div class="flex-1 flex overflow-hidden">
+ <!-- Off-canvas menu for mobile, show/hide based on off-canvas menu state. -->
+ <div v-if="state.showMobileOverlay" class="md:hidden">
+ <div class="fixed inset-0 flex z-40">
+ <div class="fixed inset-0">
+ <div class="absolute inset-0 bg-gray-600 opacity-75"></div>
+ </div>
+ <div
+ tabindex="0"
+ class="relative flex-1 flex flex-col max-w-xs w-full bg-white focus:outline-none"
+ >
+ <div class="absolute top-0 right-0 -mr-12 pt-2">
+ <button
+ type="button"
+ class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white"
+ @click.prevent="state.showMobileOverlay = false"
+ >
+ <span class="sr-only">Close sidebar</span>
+ <!-- Heroicon name: x -->
+ <heroicons-solid:x class="h-6 w-6 text-white" />
+ </button>
+ </div>
+ <!-- Mobile Sidebar -->
+ <div class="flex-1 h-0 py-4 overflow-y-auto">
+ <router-view name="leftSidebar" />
+ </div>
+ <router-link
+ to="/archive"
+ class="outline-item group flex items-center px-4 py-2"
+ >
+ <heroicons-outline:archive class="w-5 h-5 mr-2" />
+ {{ $t("common.archive") }}
+ </router-link>
+ <div
+ class="flex-shrink-0 flex border-t border-block-border px-3 py-2"
>
- <span class="sr-only">Close sidebar</span>
- <!-- Heroicon name: x -->
- <heroicons-solid:x class="h-6 w-6 text-white" />
- </button>
+ <div
+ v-if="isDemo"
+ class="text-sm flex whitespace-nowrap text-accent"
+ >
+ <heroicons-outline:presentation-chart-bar
+ class="w-5 h-5 mr-1"
+ />
+ {{ $t("common.demo-mode") }}
+ </div>
+ <router-link
+ v-else-if="!isFreePlan"
+ to="/setting/subscription"
+ exact-active-class=""
+ class="text-sm flex"
+ >
+ {{ $t(currentPlan) }}
+ </router-link>
+ <div
+ v-else
+ class="text-sm flex whitespace-nowrap mr-1 text-accent cursor-pointer"
+ @click="state.showTrialModal = true"
+ >
+ <heroicons-solid:sparkles class="w-5 h-5" />
+ {{ $t(currentPlan) }}
+ </div>
+ <div
+ class="text-sm flex items-center gap-x-1 ml-auto tooltip-wrapper"
+ :class="
+ canUpgrade
+ ? 'text-success cursor-pointer'
+ : 'text-control-light cursor-default'
+ "
+ @click="state.showReleaseModal = canUpgrade"
+ >
+ <heroicons-outline:volume-up
+ v-if="canUpgrade"
+ class="h-4 w-4"
+ />
+ {{ version }}
+ <span v-if="gitCommit" class="tooltip"
+ >Git hash {{ gitCommit }}</span
+ >
+ </div>
+ </div>
+ </div>
+ <div class="flex-shrink-0 w-14" aria-hidden="true">
+ <!-- Force sidebar to shrink to fit close icon -->
</div>
- <!-- Mobile Sidebar -->
- <div class="flex-1 h-0 py-4 overflow-y-auto">
+ </div>
+ </div>
+
+ <!-- Static sidebar for desktop -->
+ <aside
+ class="hidden md:flex md:flex-shrink-0"
+ data-label="bb-dashboard-static-sidebar"
+ >
+ <div class="flex flex-col w-52 bg-control-bg">
+ <!-- Sidebar component, swap this element with another sidebar if you like -->
+ <div class="flex-1 flex flex-col py-2 overflow-y-auto">
<router-view name="leftSidebar" />
</div>
<router-link
@@ -46,7 +118,7 @@
v-else-if="!isFreePlan"
to="/setting/subscription"
exact-active-class=""
- class="text-sm flex"
+ class="text-sm flex whitespace-nowrap mr-1"
>
{{ $t(currentPlan) }}
</router-link>
@@ -59,7 +131,7 @@
{{ $t(currentPlan) }}
</div>
<div
- class="text-sm flex items-center gap-x-1 ml-auto tooltip-wrapper"
+ class="text-xs flex items-center gap-x-1 ml-auto tooltip-wrapper whitespace-nowrap"
:class="
canUpgrade
? 'text-success cursor-pointer'
@@ -69,152 +141,93 @@
>
<heroicons-outline:volume-up v-if="canUpgrade" class="h-4 w-4" />
{{ version }}
- <span v-if="gitCommit" class="tooltip"
- >Git hash {{ gitCommit }}</span
- >
+ <span v-if="canUpgrade" class="tooltip whitespace-nowrap">
+ {{ $t("settings.release.new-version-available") }}
+ </span>
+ <span v-else-if="gitCommit" class="tooltip">
+ Git hash {{ gitCommit }}
+ </span>
</div>
</div>
</div>
- <div class="flex-shrink-0 w-14" aria-hidden="true">
- <!-- Force sidebar to shrink to fit close icon -->
- </div>
- </div>
- </div>
-
- <!-- Static sidebar for desktop -->
- <aside
- class="hidden md:flex md:flex-shrink-0"
- data-label="bb-dashboard-static-sidebar"
- >
- <div class="flex flex-col w-52 bg-control-bg">
- <!-- Sidebar component, swap this element with another sidebar if you like -->
- <div class="flex-1 flex flex-col py-2 overflow-y-auto">
- <router-view name="leftSidebar" />
- </div>
- <router-link
- to="/archive"
- class="outline-item group flex items-center px-4 py-2"
+ </aside>
+ <div
+ class="flex flex-col min-w-0 flex-1 border-l border-r border-block-border"
+ data-label="bb-main-body-wrapper"
+ >
+ <nav
+ class="bg-white border-b border-block-border"
+ data-label="bb-dashboard-header"
>
- <heroicons-outline:archive class="w-5 h-5 mr-2" />
- {{ $t("common.archive") }}
- </router-link>
- <div class="flex-shrink-0 flex border-t border-block-border px-3 py-2">
- <div v-if="isDemo" class="text-sm flex whitespace-nowrap text-accent">
- <heroicons-outline:presentation-chart-bar class="w-5 h-5 mr-1" />
- {{ $t("common.demo-mode") }}
- </div>
- <router-link
- v-else-if="!isFreePlan"
- to="/setting/subscription"
- exact-active-class=""
- class="text-sm flex whitespace-nowrap mr-1"
- >
- {{ $t(currentPlan) }}
- </router-link>
- <div
- v-else
- class="text-sm flex whitespace-nowrap mr-1 text-accent cursor-pointer"
- @click="state.showTrialModal = true"
- >
- <heroicons-solid:sparkles class="w-5 h-5" />
- {{ $t(currentPlan) }}
+ <div class="max-w-full mx-auto">
+ <DashboardHeader />
</div>
+ </nav>
+
+ <!-- Static sidebar for mobile -->
+ <aside class="md:hidden">
<div
- class="text-xs flex items-center gap-x-1 ml-auto tooltip-wrapper whitespace-nowrap"
- :class="
- canUpgrade
- ? 'text-success cursor-pointer'
- : 'text-control-light cursor-default'
- "
- @click="state.showReleaseModal = canUpgrade"
+ class="flex items-center justify-start bg-gray-50 border-b border-block-border px-4 py-1.5"
>
- <heroicons-outline:volume-up v-if="canUpgrade" class="h-4 w-4" />
- {{ version }}
- <span v-if="canUpgrade" class="tooltip whitespace-nowrap">
- {{ $t("settings.release.new-version-available") }}
- </span>
- <span v-else-if="gitCommit" class="tooltip">
- Git hash {{ gitCommit }}
- </span>
- </div>
- </div>
- </div>
- </aside>
- <div
- class="flex flex-col min-w-0 flex-1 border-l border-r border-block-border"
- data-label="bb-main-body-wrapper"
- >
- <nav
- class="bg-white border-b border-block-border"
- data-label="bb-dashboard-header"
- >
- <div class="max-w-full mx-auto">
- <DashboardHeader />
- </div>
- </nav>
-
- <!-- Static sidebar for mobile -->
- <aside class="md:hidden">
- <div
- class="flex items-center justify-start bg-gray-50 border-b border-block-border px-4 py-1.5"
- >
- <div>
- <button
- type="button"
- class="-mr-3 h-12 w-12 inline-flex items-center justify-center rounded-md text-gray-500 hover:text-gray-900"
- @click.prevent="state.showMobileOverlay = true"
- >
- <span class="sr-only">Open sidebar</span>
- <!-- Heroicon name: menu -->
- <heroicons-outline:menu class="h-6 w-6" />
- </button>
- </div>
- <div v-if="showBreadcrumb" class="ml-4">
- <Breadcrumb />
+ <div>
+ <button
+ type="button"
+ class="-mr-3 h-12 w-12 inline-flex items-center justify-center rounded-md text-gray-500 hover:text-gray-900"
+ @click.prevent="state.showMobileOverlay = true"
+ >
+ <span class="sr-only">Open sidebar</span>
+ <!-- Heroicon name: menu -->
+ <heroicons-outline:menu class="h-6 w-6" />
+ </button>
+ </div>
+ <div v-if="showBreadcrumb" class="ml-4">
+ <Breadcrumb />
+ </div>
</div>
- </div>
- </aside>
+ </aside>
- <div class="w-full mx-auto md:flex">
- <div class="md:min-w-0 md:flex-1">
- <div v-if="showBreadcrumb" class="hidden md:block px-4 pt-4">
- <Breadcrumb />
- </div>
- <div class="flex items-start flex-wrap px-4 gap-x-4">
- <div v-if="quickActionList.length > 0" class="flex-1 mt-4">
- <QuickActionPanel :quick-action-list="quickActionList" />
+ <div class="w-full mx-auto md:flex">
+ <div class="md:min-w-0 md:flex-1">
+ <div v-if="showBreadcrumb" class="hidden md:block px-4 pt-4">
+ <Breadcrumb />
</div>
- <div
- v-if="route.name === 'workspace.home'"
- class="mt-8 hidden md:flex"
- >
- <a
- href="/sql-editor"
- target="_blank"
- class="btn-normal items-center !px-4 !text-base"
+ <div class="flex items-start flex-wrap px-4 gap-x-4">
+ <div v-if="quickActionList.length > 0" class="flex-1 mt-4">
+ <QuickActionPanel :quick-action-list="quickActionList" />
+ </div>
+ <div
+ v-if="route.name === 'workspace.home'"
+ class="mt-8 hidden md:flex"
>
- <heroicons-solid:terminal class="text-accent w-6 h-6 mr-2" />
- <span class="whitespace-nowrap">{{
- $t("sql-editor.self")
- }}</span>
- </a>
+ <a
+ href="/sql-editor"
+ target="_blank"
+ class="btn-normal items-center !px-4 !text-base"
+ >
+ <heroicons-solid:terminal class="text-accent w-6 h-6 mr-2" />
+ <span class="whitespace-nowrap">{{
+ $t("sql-editor.self")
+ }}</span>
+ </a>
+ </div>
</div>
</div>
</div>
+ <!-- This area may scroll -->
+ <div
+ class="md:min-w-0 md:flex-1 overflow-y-auto"
+ :class="showBreadcrumb || quickActionList.length > 0 ? 'mt-2' : ''"
+ >
+ <!-- Start main area-->
+ <router-view name="content" />
+ <!-- End main area -->
+ </div>
</div>
- <!-- This area may scroll -->
- <div
- class="md:min-w-0 md:flex-1 overflow-y-auto"
- :class="showBreadcrumb || quickActionList.length > 0 ? 'mt-2' : ''"
- >
- <!-- Start main area-->
- <router-view name="content" />
- <!-- End main area -->
- </div>
-
- <Quickstart v-if="showQuickstart" />
</div>
+
+ <Quickstart v-if="showQuickstart" />
</div>
+
<TrialModal
v-if="state.showTrialModal"
@cancel="state.showTrialModal = false"