diff --git a/src/lib/components/bottomModalAlert.svelte b/src/lib/components/bottomModalAlert.svelte
index 0eb797cc9..77fd688dc 100644
--- a/src/lib/components/bottomModalAlert.svelte
+++ b/src/lib/components/bottomModalAlert.svelte
@@ -9,9 +9,11 @@
dismissBottomModalAlert,
hideAllModalAlerts
} from '$lib/stores/bottom-alerts';
+ import { onMount } from 'svelte';
import { organization } from '$lib/stores/organization';
import { BillingPlan } from '$lib/constants';
import { upgradeURL } from '$lib/stores/billing';
+ import { addBottomModalAlerts } from '$routes/(console)/project-[project]/bottomAlerts';
let currentIndex = 0;
let openModalOnMobile = false;
@@ -57,6 +59,11 @@
);
}
}
+
+ onMount(() => {
+ addBottomModalAlerts();
+ });
+
{#if filteredModalAlerts.length > 0 && currentModalAlert}
diff --git a/src/lib/images/samples/backups-dark.png b/src/lib/images/samples/backups-dark.png
deleted file mode 100644
index 6b31eab88..000000000
Binary files a/src/lib/images/samples/backups-dark.png and /dev/null differ
diff --git a/src/lib/images/samples/backups-light.png b/src/lib/images/samples/backups-light.png
deleted file mode 100644
index aa675d86b..000000000
Binary files a/src/lib/images/samples/backups-light.png and /dev/null differ
diff --git a/src/lib/images/samples/roles-dark.png b/src/lib/images/samples/roles-dark.png
deleted file mode 100644
index 2bb41d259..000000000
Binary files a/src/lib/images/samples/roles-dark.png and /dev/null differ
diff --git a/src/lib/images/samples/roles-light.png b/src/lib/images/samples/roles-light.png
deleted file mode 100644
index 24b88238a..000000000
Binary files a/src/lib/images/samples/roles-light.png and /dev/null differ
diff --git a/src/routes/(console)/project-[project]/+layout.svelte b/src/routes/(console)/project-[project]/+layout.svelte
index d5e7f2b52..a7fb16954 100644
--- a/src/routes/(console)/project-[project]/+layout.svelte
+++ b/src/routes/(console)/project-[project]/+layout.svelte
@@ -3,7 +3,6 @@
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
import { project, stats } from './store';
- import { addBottomModalAlerts } from './bottomAlerts';
import { goto } from '$app/navigation';
import { registerCommands, registerSearchers } from '$lib/commandCenter';
@@ -18,8 +17,6 @@
import { page } from '$app/stores';
import { base } from '$app/paths';
- addBottomModalAlerts();
-
onMount(() => {
return sdk.forConsole.client.subscribe(['project', 'console'], (response) => {
if (response.events.includes('stats.connections')) {
diff --git a/src/routes/(console)/project-[project]/bottomAlerts.ts b/src/routes/(console)/project-[project]/bottomAlerts.ts
index a7181dfc5..16ccf43b0 100644
--- a/src/routes/(console)/project-[project]/bottomAlerts.ts
+++ b/src/routes/(console)/project-[project]/bottomAlerts.ts
@@ -1,54 +1,6 @@
-import RolesSampleDark from '$lib/images/samples/roles-dark.png';
-import RolesSampleLight from '$lib/images/samples/roles-light.png';
-import BackupsSampleDark from '$lib/images/samples/backups-dark.png';
-import BackupsSampleLight from '$lib/images/samples/backups-light.png';
-
import { type BottomModalAlertItem, showBottomModalAlert } from '$lib/stores/bottom-alerts';
-const listOfPromotions: BottomModalAlertItem[] = [
- {
- id: 'memberRoles',
- src: {
- dark: RolesSampleDark,
- light: RolesSampleLight
- },
- title: 'Member roles now on Pro plans',
- message:
- 'Enhance your workflow and security by assigning roles to members.
Try it now for free until Dec 2024.',
-
- isHtml: true,
- plan: 'pro',
- cta: {
- text: 'Try Now',
- link: 'https://appwrite.io'
- },
- learnMore: {
- link: 'https://appwrite.io/docs'
- }
- },
-
- {
- id: 'databaseBackups',
- src: {
- dark: BackupsSampleDark,
- light: BackupsSampleLight
- },
- title: 'Database backups now on Pro plans',
- message:
- 'Protect your data and ensure quick recovery with our new backups.
Try it now for free until Nov 2024.',
-
- isHtml: true,
- importance: 10,
- plan: 'pro',
- cta: {
- text: 'Try Now',
- link: 'https://appwrite.io'
- },
- learnMore: {
- link: 'https://appwrite.io/docs'
- }
- }
-];
+const listOfPromotions: BottomModalAlertItem[] = [];
export function addBottomModalAlerts() {
listOfPromotions.forEach((promotion) => showBottomModalAlert(promotion));