Skip to content

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

Add IntroBanner

天舟c4ef374c7d98
diff --git a/frontend/src/assets/illustration/guide.webp b/frontend/src/assets/illustration/guide.webp
new file mode 100644
index 0000000000..c032e26183
Binary files /dev/null and b/frontend/src/assets/illustration/guide.webp differ
diff --git a/frontend/src/components/IntroBanner.vue b/frontend/src/components/IntroBanner.vue
new file mode 100644
index 0000000000..24a0c346f4
--- /dev/null
+++ b/frontend/src/components/IntroBanner.vue
@@ -0,0 +1,48 @@
+<template>
+ <div class="flex justify-center items-center border m-4">
+ <img class="m-4 h-72" src="../assets/illustration/guide.webp" alt="" />
+ <div class="m-4">
+ <h2 class="text-xl text-main">
+ Bytebase is for DBAs and Developers to collaborate on database schemas
+ changes. One can construct a single pipeline to propagate the schema
+ change across multiple environments. Follow the
+ <span class="text-accent">Quickstart</span> on the bottom left to get
+ familar with the product. If you encounter problems, visit
+ <a class="normal-link" href="https://docs.bytebase.com" target="__blank"
+ >doc</a
+ >
+ or report
+ <a
+ class="normal-link"
+ href="https://github.com/bytebase/bytebase/issues"
+ target="__blank"
+ >issue</a
+ >
+ on GitHub.
+ </h2>
+ <div class="mt-4">
+ <button class="btn-normal" @click.prevent="dismiss">Dismiss</button>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+import { useStore } from "vuex";
+export default {
+ name: "IntroBanner",
+ components: {},
+ setup() {
+ const store = useStore();
+ const dismiss = () => {
+ store.dispatch("uistate/saveIntroStateByKey", {
+ key: "general.overview",
+ newState: true,
+ });
+ };
+ return {
+ dismiss,
+ };
+ },
+};
+</script>
diff --git a/frontend/src/components/ProfileDropdown.vue b/frontend/src/components/ProfileDropdown.vue
index 6c60f92a07..3f381cfa24 100644
--- a/frontend/src/components/ProfileDropdown.vue
+++ b/frontend/src/components/ProfileDropdown.vue
@@ -103,6 +103,10 @@ export default {
};
const resetQuickstart = () => {
+ store.dispatch("uistate/saveIntroStateByKey", {
+ key: "general.overview",
+ newState: false,
+ });
store.dispatch("uistate/saveIntroStateByKey", {
key: "bookmark.create",
newState: false,
diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vue
index 8bd8699ccd..d28b8bb035 100644
--- a/frontend/src/layouts/BodyLayout.vue
+++ b/frontend/src/layouts/BodyLayout.vue
@@ -256,6 +256,7 @@
<div v-if="showBreadcrumb" class="hidden md:block px-4 pt-4">
<Breadcrumb />
</div>
+ <IntroBanner v-if="showIntro" />
<div v-if="quickActionList.length > 0" class="mx-4 mt-4">
<QuickActionPanel :quickActionList="quickActionList" />
</div>
@@ -279,6 +280,7 @@ import { computed, reactive } from "vue";
import { useStore } from "vuex";
import { useRouter } from "vue-router";
import Breadcrumb from "../components/Breadcrumb.vue";
+import IntroBanner from "../components/IntroBanner.vue";
import Quickstart from "../components/Quickstart.vue";
import QuickActionPanel from "../components/QuickActionPanel.vue";
import { QuickActionType } from "../types";
@@ -292,6 +294,7 @@ export default {
name: "BodyLayout",
components: {
Breadcrumb,
+ IntroBanner,
Quickstart,
QuickActionPanel,
},
@@ -353,6 +356,10 @@ export default {
return !(name === "workspace.home" || name === "workspace.profile");
});
+ const showIntro = computed(() => {
+ return !store.getters["uistate/introStateByKey"]("general.overview");
+ });
+
const showQuickstart = computed(() => {
// Do not show quickstart in demo mode since we don't expect user to alter the data
return (
@@ -373,6 +380,7 @@ export default {
state,
quickActionList,
showBreadcrumb,
+ showIntro,
showQuickstart,
version,
};