Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Add demo banner, only displayed in demo mode
Tianzhou Chend2a85aa57caa
diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vueindex 8d53d00019..3ac5feea84 100644--- a/frontend/src/layouts/DashboardLayout.vue+++ b/frontend/src/layouts/DashboardLayout.vue@@ -1,5 +1,5 @@<template>- <!-- This example requires Tailwind CSS v2.0+ -->+ <BannerDemo v-if="isDemo()" /><div class="relative h-screen overflow-hidden flex flex-col"><nav class="bg-white border-b border-block-border"><div class="max-w-full mx-auto px-6">@@ -19,8 +19,10 @@<script lang="ts">import { reactive, watchEffect } from "vue";import { useStore } from "vuex";-import { Notification } from "../types";import DashboardHeader from "../views/DashboardHeader.vue";+import BannerDemo from "../views/BannerDemo.vue";+import { Notification } from "../types";+import { isDemo } from "../utils";const NOTIFICAITON_DURATION = 4000;@@ -30,7 +32,7 @@ interface LocalState {export default {name: "DashboardLayout",- components: { DashboardHeader },+ components: { DashboardHeader, BannerDemo },setup(props, ctx) {const store = useStore();@@ -63,6 +65,7 @@ export default {return {state,+ isDemo,};},};diff --git a/frontend/src/views/BannerDemo.vue b/frontend/src/views/BannerDemo.vuenew file mode 100644index 0000000000..76e939b3ad--- /dev/null+++ b/frontend/src/views/BannerDemo.vue@@ -0,0 +1,80 @@+<template>+ <div v-if="show" class="bg-accent">+ <div class="max-w-7xl mx-auto py-3 px-3">+ <div class="flex items-center justify-between flex-wrap">+ <div class="w-0 flex-1 flex items-center">+ <span class="flex p-2 rounded-lg bg-accent-hover">+ <!-- Heroicon name: outline/speakerphone -->+ <svg+ class="h-6 w-6 text-white"+ xmlns="http://www.w3.org/2000/svg"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ aria-hidden="true"+ >+ <path+ stroke-linecap="round"+ stroke-linejoin="round"+ stroke-width="2"+ d="M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z"+ />+ </svg>+ </span>+ <p class="ml-3 font-medium text-white truncate">+ <span> You are playing with a demo version </span>+ </p>+ </div>+ <div+ class="order-3 mt-2 flex-shrink-0 w-full sm:order-2 sm:mt-0 sm:w-auto"+ >+ <a+ href="https://github.com/bytebase-com/bytebase"+ target="_blank"+ class="flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-accent bg-white hover:bg-indigo-50"+ >+ Download Now ->+ </a>+ </div>+ <div class="order-2 flex-shrink-0 sm:order-3 sm:ml-3">+ <button+ type="button"+ class="-mr-1 flex p-2 rounded-md hover:bg-accent-hover focus:outline-none focus:ring-2 focus:ring-white sm:-mr-2"+ @click.prevent="show = false"+ >+ <span class="sr-only">Dismiss</span>+ <!-- Heroicon name: outline/x -->+ <svg+ class="h-6 w-6 text-white"+ xmlns="http://www.w3.org/2000/svg"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ aria-hidden="true"+ >+ <path+ stroke-linecap="round"+ stroke-linejoin="round"+ stroke-width="2"+ d="M6 18L18 6M6 6l12 12"+ />+ </svg>+ </button>+ </div>+ </div>+ </div>+ </div>+</template>++<script lang="ts">+import { ref } from "vue";++export default {+ name: "BannerDemo",+ props: {},+ setup(props, ctx) {+ const show = ref(true);+ return { show };+ },+};+</script>