From 9b5f6ffe3ab19fcff9c6d29bc5c753f35f6c0f42 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 13 Nov 2025 16:42:48 +0530 Subject: [PATCH] hide: promo alerts and notifications. --- src/lib/stores/database.ts | 6 +++++- src/routes/(console)/bottomAlerts.ts | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/stores/database.ts b/src/lib/stores/database.ts index 4c93859ce..636345bcb 100644 --- a/src/lib/stores/database.ts +++ b/src/lib/stores/database.ts @@ -7,6 +7,7 @@ import BackupDatabase from '$lib/components/backupDatabaseAlert.svelte'; import { shouldShowNotification } from '$lib/helpers/notifications'; import { isCloud } from '$lib/system'; import { currentPlan } from '$lib/stores/organization'; +import { ProfileMode, resolvedProfile } from '$lib/profiles/index.svelte'; export const database = derived(page, ($page) => $page.data?.database as Models.Database); @@ -19,7 +20,10 @@ export async function checkForDatabaseBackupPolicies( projectId: string, database: Models.Database ) { - // fast path: return if user dismissed the banner + // fast path: not the valid profile to show this! + if (resolvedProfile.id !== ProfileMode.CONSOLE) return; + + // fast path: return if user dismissed the banner. if (!shouldShowNotification(backupsBannerId)) return; let total = 0; diff --git a/src/routes/(console)/bottomAlerts.ts b/src/routes/(console)/bottomAlerts.ts index b0316aeac..6e732786d 100644 --- a/src/routes/(console)/bottomAlerts.ts +++ b/src/routes/(console)/bottomAlerts.ts @@ -3,6 +3,7 @@ import { isSameDay } from '$lib/helpers/date'; import { type BottomModalAlertItem, showBottomModalAlert } from '$lib/stores/bottom-alerts'; import DbOperatorsDark from '$lib/images/promos/db-operators-dark.png'; import DbOperatorsLight from '$lib/images/promos/db-operators-light.png'; +import { ProfileMode, resolvedProfile } from '$lib/profiles/index.svelte'; const listOfPromotions: BottomModalAlertItem[] = []; @@ -30,6 +31,9 @@ if (isCloud) { } export function addBottomModalAlerts() { + // fast path: not the valid profile to show this! + if (resolvedProfile.id !== ProfileMode.CONSOLE) return; + listOfPromotions.forEach((promotion) => showBottomModalAlert(promotion)); }