Skip to content

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

chore: hide banners in live demo (#1918)

boojack902eef6680f1
diff --git a/frontend/public/demo/schema-migration-history/hint.json b/frontend/public/demo/schema-migration-history/hint.json
index d0e2c381b7..c04b7b25bd 100644
--- a/frontend/public/demo/schema-migration-history/hint.json
+++ b/frontend/public/demo/schema-migration-history/hint.json
@@ -14,7 +14,7 @@
"type": "shield",
"url": ".*",
"additionStyle": {
- "zIndex": "10"
+ "zIndex": "1"
}
},
{
diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vue
index 9cf9668598..4d4e8c2145 100644
--- a/frontend/src/layouts/DashboardLayout.vue
+++ b/frontend/src/layouts/DashboardLayout.vue
@@ -1,6 +1,6 @@
<template>
<div class="relative h-screen overflow-hidden flex flex-col">
- <template v-if="isDemo">
+ <template v-if="isDemo && !isLiveDemo">
<BannerDemo />
</template>
<template v-if="showDebugBanner">
@@ -9,7 +9,7 @@
<template v-else-if="isExpired || isTrialing">
<BannerSubscription />
</template>
- <template v-else-if="isReadonly">
+ <template v-else-if="isReadonly && !isLiveDemo">
<div
class="px-3 py-1 w-full text-lg font-medium bg-yellow-500 text-white flex justify-center items-center"
>
@@ -89,7 +89,7 @@ export default defineComponent({
});
};
- const { isDemo, isReadonly } = storeToRefs(actuatorStore);
+ const { isDemo, isReadonly, isLiveDemo } = storeToRefs(actuatorStore);
const { isExpired, isTrialing } = storeToRefs(subscriptionStore);
const { isDebug } = storeToRefs(debugStore);
@@ -109,6 +109,7 @@ export default defineComponent({
isReadonly,
isTrialing,
isExpired,
+ isLiveDemo,
showDebugBanner,
};
},
diff --git a/frontend/src/plugins/demo/style.css b/frontend/src/plugins/demo/style.css
index 47986049f6..4bc9f276a0 100644
--- a/frontend/src/plugins/demo/style.css
+++ b/frontend/src/plugins/demo/style.css
@@ -4,12 +4,12 @@
z-index: 999998;
pointer-events: auto !important;
backdrop-filter: blur(2px);
- background: rgba(255, 255, 255, 0.4);
}
.bb-guide-target-element,
.bb-hint-target-element {
z-index: 999999;
+ background-color: white;
}
.bb-guide-highlight-wrapper {
@@ -124,7 +124,8 @@
}
.bb-hint-wrapper.covered {
- box-shadow: rgb(33 33 33 / 80%) 0px 0px 1px 2px, transparent 0px 0px 0px 100vw !important;
+ box-shadow: rgb(33 33 33 / 80%) 0px 0px 1px 1px,
+ rgb(0 0 0 / 40%) 0px 0px 0px 100vw !important;
}
.bb-hint-wrapper.shield {
diff --git a/frontend/src/store/modules/actuator.ts b/frontend/src/store/modules/actuator.ts
index efae87bfd5..82c6299217 100644
--- a/frontend/src/store/modules/actuator.ts
+++ b/frontend/src/store/modules/actuator.ts
@@ -25,6 +25,14 @@ export const useActuatorStore = defineStore("actuator", {
needAdminSetup: (state) => {
return state.serverInfo?.needAdminSetup || false;
},
+ isLiveDemo: (state) => {
+ return (
+ state.serverInfo?.demo &&
+ !state.serverInfo?.demoName &&
+ state.serverInfo?.demoName !== "dev" &&
+ state.serverInfo?.demoName !== "prod"
+ );
+ },
},
actions: {
async fetchInfo() {
diff --git a/frontend/src/types/actuator.ts b/frontend/src/types/actuator.ts
index 90f64a7655..b789b23f89 100644
--- a/frontend/src/types/actuator.ts
+++ b/frontend/src/types/actuator.ts
@@ -3,6 +3,7 @@ export type ServerInfo = {
gitCommit: string;
readonly: boolean;
demo: boolean;
+ demoName: string;
host: string;
port: string;
needAdminSetup: boolean;