Skip to content

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

feat(frontend): Adds a hover effect when hovering an announcement (#8553)

yaguetoa69b245bcf45
diff --git a/frontend/src/views/BannerAnnouncement.vue b/frontend/src/views/BannerAnnouncement.vue
index d321c83dd7..3f7fd3d078 100644
--- a/frontend/src/views/BannerAnnouncement.vue
+++ b/frontend/src/views/BannerAnnouncement.vue
@@ -2,7 +2,7 @@
<div
v-if="showBanner"
class="max-auto py-1 px-3 w-full flex flex-row justify-center flex-wrap text-center text-white font-medium"
- :class="[`${bgColor}`]"
+ :class="[bgColor, bgColorHover]"
>
<a
v-if="announcementLink !== ''"
@@ -42,6 +42,19 @@ const bgColor = computed(() => {
}
});
+const bgColorHover = computed(() => {
+ switch (settingV1Store.workspaceProfileSetting?.announcement?.level) {
+ case Announcement_AlertLevel.ALERT_LEVEL_INFO:
+ return "hover:bg-info-hover";
+ case Announcement_AlertLevel.ALERT_LEVEL_WARNING:
+ return "hover:bg-warning-hover";
+ case Announcement_AlertLevel.ALERT_LEVEL_CRITICAL:
+ return "hover:bg-error-hover";
+ default:
+ return "hover:bg-info-hover";
+ }
+});
+
const announcementText = computed(() => {
return settingV1Store.workspaceProfileSetting?.announcement?.text ?? "";
});