Skip to content

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

chore: update demo style (#1927)

boojacka3de8b6c1065
diff --git a/frontend/src/plugins/demo/hint.ts b/frontend/src/plugins/demo/hint.ts
index bc6c498525..1fef74dbd9 100644
--- a/frontend/src/plugins/demo/hint.ts
+++ b/frontend/src/plugins/demo/hint.ts
@@ -6,6 +6,7 @@ import {
checkUrlMatched,
getElementBounding,
getElementMaxZIndex,
+ getStylePropertyValue,
waitForTargetElement,
} from "./utils";
@@ -69,6 +70,8 @@ const renderHint = (
hintWrapper.style[key] = hintData.additionStyle[key];
}
}
+ const borderRadius = getStylePropertyValue(targetElement, "border-radius");
+ hintWrapper.style.borderRadius = borderRadius;
const bounding = getElementBounding(targetElement);
hintWrapper.style.top = `${bounding.top}px`;
@@ -236,6 +239,9 @@ const renderTooltip = (
const pingElement = document.createElement("span");
pingElement.className = "bb-hint-tooltip-ping";
tooltipWrapper.appendChild(pingElement);
+ const blockElement = document.createElement("span");
+ blockElement.className = "bb-hint-tooltip-block";
+ tooltipWrapper.appendChild(blockElement);
tooltipWrapper.style.zIndex = `${getElementMaxZIndex(targetElement)}`;
if (hintData.additionStyle) {
diff --git a/frontend/src/plugins/demo/style.css b/frontend/src/plugins/demo/style.css
index 4d8bfada26..2bc0dcd6c2 100644
--- a/frontend/src/plugins/demo/style.css
+++ b/frontend/src/plugins/demo/style.css
@@ -84,13 +84,13 @@
}
.bb-hint-dialog.right {
- margin-top: -14px;
+ margin-top: -8px;
}
.bb-hint-dialog.right::before {
content: "";
position: absolute;
- top: 13px;
- left: -6px;
+ top: 14px;
+ left: -10px;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-right: 10px solid white;
@@ -126,8 +126,7 @@
}
.bb-hint-wrapper.covered {
- box-shadow: rgb(33 33 33 / 80%) 0px 0px 1px 1px,
- rgb(0 0 0 / 30%) 0px 0px 0px 100vw !important;
+ box-shadow: 0 3px 30px rgb(33 33 33 / 30%), rgb(0 0 0 / 30%) 0px 0px 0px 100vw !important;
}
.bb-hint-wrapper.shield {
@@ -138,15 +137,21 @@
}
.bb-hint-tooltip-wrapper {
- @apply fixed text-xs text-center leading-4 shadow-none rounded-full m-0 bg-white cursor-default;
+ @apply fixed text-xs w-6 h-6 m-0 shadow-none rounded-full cursor-default;
+ padding: 7px;
+ box-sizing: border-box;
+}
+
+.bb-hint-tooltip-wrapper > .bb-hint-tooltip-block {
+ @apply block rounded-full;
width: 10px;
height: 10px;
background-color: #4f46e5;
}
.bb-hint-tooltip-wrapper > .bb-hint-tooltip-ping {
- @apply absolute top-0 left-0 w-3 h-3 animate-ping rounded-full;
- top: -1px;
- left: -1px;
+ @apply absolute w-3 h-3 animate-ping rounded-full;
+ top: 6px;
+ left: 6px;
background-color: #4f46e5;
}