Skip to content

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

chore: hide guide in demo mode (#1843)

boojack934092d49a88
diff --git a/frontend/src/plugins/demo/index.ts b/frontend/src/plugins/demo/index.ts
index 908fe69ca3..c4f0dc8022 100644
--- a/frontend/src/plugins/demo/index.ts
+++ b/frontend/src/plugins/demo/index.ts
@@ -2,6 +2,22 @@ import { isNull } from "lodash-es";
import { initGuideListeners, initHintListeners } from "./listener";
import * as storage from "./storage";
+// TODO(steven): after we using help to replace the guide, we should remove this.
+// In live demo mode, we should not show the guide dialog.
+const hideConsoleGuides = () => {
+ const tempData = {
+ "database.visit": true,
+ "instance.visit": true,
+ "project.visit": true,
+ "environment.visit": true,
+ "guide.database": true,
+ "guide.instance": true,
+ "guide.project": true,
+ "guide.environment": true,
+ };
+ window.localStorage.setItem("ui.intro", JSON.stringify(tempData));
+};
+
// initial guide listeners when window loaded
window.addEventListener(
"load",
@@ -24,9 +40,11 @@ window.addEventListener(
if (paramGuide || storageGuide) {
initGuideListeners();
+ hideConsoleGuides();
}
if (paramHint || storageHint) {
initHintListeners();
+ hideConsoleGuides();
}
},
{