Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Wrap ProvideContext around the root router-view
天舟657b04bd9fa1
diff --git a/frontend/src/App.vue b/frontend/src/App.vueindex 279655a9fd..3def084286 100644--- a/frontend/src/App.vue+++ b/frontend/src/App.vue@@ -1,14 +1,25 @@<template>- <router-view />+ <!-- Suspense is experimental, be aware of the potential change -->+ <Suspense>+ <template #default>+ <ProvideContext>+ <router-view />+ </ProvideContext>+ </template>+ <template #fallback>+ <span>Loading...</span>+ </template>+ </Suspense></template><script lang="ts">import { onErrorCaptured } from "vue";import { useStore } from "vuex";+import ProvideContext from "./components/ProvideContext.vue";export default {name: "App",- components: {},+ components: { ProvideContext },setup(props, ctx) {const store = useStore();diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vueindex 36771e8775..09c5958aaa 100644--- a/frontend/src/layouts/DashboardLayout.vue+++ b/frontend/src/layouts/DashboardLayout.vue@@ -1,23 +1,13 @@<template>- <!-- Suspense is experimental, be aware of the potential change -->- <Suspense>- <template #default>- <ProvideContext>- <div class="relative h-screen overflow-hidden flex flex-col">- <BannerDemo v-if="isDemo()" />- <nav class="bg-white border-b border-block-border">- <div class="max-w-full mx-auto px-4">- <DashboardHeader />- </div>- </nav>- <router-view name="body" />- </div>- </ProvideContext>- </template>- <template #fallback>- <span>Loading...</span>- </template>- </Suspense>+ <div class="relative h-screen overflow-hidden flex flex-col">+ <BannerDemo v-if="isDemo" />+ <nav class="bg-white border-b border-block-border">+ <div class="max-w-full mx-auto px-4">+ <DashboardHeader />+ </div>+ </nav>+ <router-view name="body" />+ </div><BBNotification:placement="'BOTTOM_RIGHT'":showing="state.notification != null"@@ -36,7 +26,6 @@ import ProvideContext from "../components/ProvideContext.vue";import DashboardHeader from "../views/DashboardHeader.vue";import BannerDemo from "../views/BannerDemo.vue";import { Notification } from "../types";-import { isDemo } from "../utils";const NOTIFICAITON_DURATION = 8000;@@ -90,7 +79,6 @@ export default {return {state,- isDemo,removeNotification,};},diff --git a/frontend/src/main.js b/frontend/src/main.jsindex cd6709eb75..3e16f825e8 100644--- a/frontend/src/main.js+++ b/frontend/src/main.js@@ -24,7 +24,7 @@ import {BBTableSearch,BBTableTabFilter,} from "./bbkit";-import { isDevOrDemo, humanizeTs, sizeToFit } from "./utils";+import { isDemo, isDevOrDemo, humanizeTs, sizeToFit } from "./utils";if (isDevOrDemo()) {makeServer();@@ -37,6 +37,7 @@ app.config.globalProperties.window = window;app.config.globalProperties.console = console;app.config.globalProperties.moment = moment;app.config.globalProperties.humanizeTs = humanizeTs;+app.config.globalProperties.isDemo = isDemo();app.config.globalProperties.isDevOrDemo = isDevOrDemo();app.config.globalProperties.sizeToFit = sizeToFit;