Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: update demo style (#1948)
boojack8b36b801210c
diff --git a/frontend/public/demo/schema-migration-history/hint.json b/frontend/public/demo/schema-migration-history/hint.jsonindex 5201533767..8a1033711c 100644--- a/frontend/public/demo/schema-migration-history/hint.json+++ b/frontend/public/demo/schema-migration-history/hint.json@@ -1,17 +1,4 @@[- {- "selector": "[data-label='bb-dashboard-static-sidebar']",- "type": "shield",- "url": "^.+/(db|issue)/"- },- {- "selector": "[data-label='bb-dashboard-header']",- "type": "shield",- "url": "^.+/(db|issue)/",- "additionStyle": {- "zIndex": "1"- }- },{"selector": "[data-label='bb-database-detail-action-buttons-container']","type": "shield",@@ -61,13 +48,19 @@"zh-CN": "选择一个目标数据库"},"alwaysShow": true,- "position": "top"+ "position": "bottom"}},+ {+ "selector": "[data-label='bb-main-body-wrapper']",+ "url": ".+?/(db|issue)/.+",+ "cover": true+ },{"selector": "[data-label='bb-database-detail-tab'] button:nth-child(2)","url": ".+?/db/.+?#overview$","type": "tooltip",+ "position": "center","dialog": {"title": "","description": {@@ -75,9 +68,6 @@"zh-CN": "让我们专注在数据库变更管理场景"},"position": "right"- },- "additionStyle": {- "marginLeft": "-12px"}},{@@ -102,6 +92,9 @@},"alwaysShow": true,"position": "right"+ },+ "additionStyle": {+ "marginLeft": "-8px"}},{@@ -117,6 +110,9 @@},"alwaysShow": true,"position": "right"+ },+ "additionStyle": {+ "marginLeft": "-8px"}},{@@ -131,42 +127,16 @@"zh-CN": "BASELINE 记录了数据库 Schema 的初始状态,点我看看"},"position": "right"- }- },- {- "selector": "div.w-full.mx-auto nav[data-label='bb-breadcrumb'] > div:nth-child(3)",- "url": ".+?/db/.+?/history/.+",- "type": "tooltip",- "dialog": {- "title": "",- "description": {- "en-US": "Click here to go back",- "zh-CN": "点击这里来返回"- },- "position": "right"- }- },- {- "selector": "[data-label='bb-migration-history-diff-switch']",- "url": ".+?/db/.+?/history/.+",- "type": "tooltip",- "dialog": {- "title": "",- "description": {- "en-US": "You can also view the full Schema snapshot after the change",- "zh-CN": "也可以查看变更后的完整 Schema 快照"- },- "position": "right"},"additionStyle": {- "marginLeft": "-72px",- "marginTop": "-4px"+ "marginLeft": "-8px"}},{"selector": "[data-label='bb-migration-history-view-drift-button']","url": ".+?/db/.+?/history/.+","type": "tooltip",+ "position": "center","dialog": {"title": "","description": {@@ -174,9 +144,6 @@"zh-CN": "这次变更检查到了 Schema 偏差,说明这次变更之前发生了脱离 Bytebase 平台管控的变更"},"position": "right"- },- "additionStyle": {- "marginLeft": "8px"}},{diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vueindex 9a96a0a119..aef77f4773 100644--- a/frontend/src/layouts/BodyLayout.vue+++ b/frontend/src/layouts/BodyLayout.vue@@ -102,6 +102,7 @@</aside><divclass="flex flex-col min-w-0 flex-1 border-l border-r border-block-border"+ data-label="bb-main-body-wrapper"><!-- Static sidebar for mobile --><aside class="md:hidden">diff --git a/frontend/src/plugins/demo/hint.ts b/frontend/src/plugins/demo/hint.tsindex 1fef74dbd9..b0538f8a22 100644--- a/frontend/src/plugins/demo/hint.ts+++ b/frontend/src/plugins/demo/hint.ts@@ -126,7 +126,7 @@ const renderHintDialog = (hintDialogDiv.classList.add("tooltip-dialog");}- const maxZIndex = getElementMaxZIndex(targetElement);+ const maxZIndex = getComputedStyle(targetElement, "z-index");hintDialogDiv.style.zIndex = `${maxZIndex}`;if (!alwaysShow) {@@ -266,6 +266,7 @@ const renderTooltip = (});tooltipWrapper.addEventListener("click", () => {+ targetElement.click();closedHintIndexSet.add(hintIndex);removeHint(hintIndex);});@@ -303,6 +304,11 @@ const updateTooltipPosition = (} else if (position === "left") {hintWrapper.style.top = `${bounding.top}px`;hintWrapper.style.left = `${bounding.left}px`;+ } else if (position === "center") {+ hintWrapper.style.top = `${bounding.top + bounding.height / 2}px`;+ hintWrapper.style.left = `${bounding.left + bounding.width / 2}px`;+ hintWrapper.style.marginTop = `-12px`;+ hintWrapper.style.marginLeft = `-12px`;}requestAnimationFrame(() =>diff --git a/frontend/src/plugins/demo/style.css b/frontend/src/plugins/demo/style.cssindex 2bc0dcd6c2..83e79d6d71 100644--- a/frontend/src/plugins/demo/style.css+++ b/frontend/src/plugins/demo/style.css@@ -1,13 +1,12 @@.bb-guide-cover-wrapper,.bb-hint-cover-wrapper {@apply fixed inset-0 overflow-hidden;- z-index: 999998;pointer-events: auto !important;}.bb-guide-target-element,.bb-hint-target-element {- z-index: 999999;+ z-index: 1;background-color: white;}@@ -24,9 +23,11 @@.bb-guide-dialog,.bb-hint-dialog {- @apply fixed bg-white w-72 m-1 my-2 text-black p-2 px-4 rounded text-left -top-full -left-full;- box-shadow: 0 3px 30px rgb(33 33 33 / 30%);+ @apply fixed bg-white w-auto m-1 my-2 p-3 px-5 text-slate-900 rounded-lg text-left -top-full -left-full;z-index: 1000000;+ max-width: 300px;+ box-shadow: 0 4px 36px rgb(33 33 33 / 40%);+ font-size: 15px;}.bb-hint-dialog.tooltip-dialog {@@ -84,12 +85,12 @@}.bb-hint-dialog.right {- margin-top: -8px;+ margin-top: -10px;}.bb-hint-dialog.right::before {content: "";position: absolute;- top: 14px;+ top: 16px;left: -10px;border-top: 10px solid transparent;border-bottom: 10px solid transparent;@@ -137,7 +138,7 @@}.bb-hint-tooltip-wrapper {- @apply fixed text-xs w-6 h-6 m-0 shadow-none rounded-full cursor-default;+ @apply fixed text-xs w-6 h-6 m-0 shadow-none rounded-full cursor-pointer;padding: 7px;box-sizing: border-box;}@@ -154,4 +155,5 @@top: 6px;left: 6px;background-color: #4f46e5;+ animation-duration: 1.6s;}diff --git a/frontend/src/plugins/demo/types.ts b/frontend/src/plugins/demo/types.tsindex ce989a1c39..9006dca462 100644--- a/frontend/src/plugins/demo/types.ts+++ b/frontend/src/plugins/demo/types.ts@@ -1,6 +1,12 @@type StepType = "click" | "change";-export type Position = "bottom" | "top" | "left" | "right" | "topright";+export type Position =+ | "bottom"+ | "top"+ | "left"+ | "right"+ | "topright"+ | "center";export type I18NText = {[key: string]: string;