hide: promo alerts and notifications.

This commit is contained in:
Darshan committed 2025-11-13 16:42:48 +05:30
1 parent 2cee22f9bd
commit 9b5f6ffe3a
2 files changed
+9 -1

No files matched your search

+5 -1
View File
@@ -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;
+4
View File
@@ -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));
}