From a3de94cd9831cccee63f1af5bf92ffd32f021a6a Mon Sep 17 00:00:00 2001 From: ernstmul Date: Mon, 25 Nov 2024 11:39:50 +0100 Subject: [PATCH] Only add backups notification on cloud --- src/routes/(console)/bottomAlerts.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/routes/(console)/bottomAlerts.ts b/src/routes/(console)/bottomAlerts.ts index aa4c0ba22..fa3e2d508 100644 --- a/src/routes/(console)/bottomAlerts.ts +++ b/src/routes/(console)/bottomAlerts.ts @@ -3,9 +3,12 @@ import BackupsDark from '$lib/images/backups/promo/backups-dark.png'; import BackupsLight from '$lib/images/backups/promo/backups-light.png'; import { type BottomModalAlertItem, showBottomModalAlert } from '$lib/stores/bottom-alerts'; +import { isCloud } from '$lib/system'; -const listOfPromotions: BottomModalAlertItem[] = [ - { +const listOfPromotions: BottomModalAlertItem[] = []; + +if (isCloud) { + listOfPromotions.push({ id: 'modal:databaseBackups', src: { dark: BackupsDark, @@ -24,8 +27,8 @@ const listOfPromotions: BottomModalAlertItem[] = [ text: 'Learn more', link: () => 'http://appwrite.io/docs/products/databases/backups' } - } -]; + }); +} export function addBottomModalAlerts() { listOfPromotions.forEach((promotion) => showBottomModalAlert(promotion));