Merge pull request #2077 from appwrite/multiple-promos

This commit is contained in:
Darshan
2025-07-03 19:09:28 +05:30
committed by GitHub
4 changed files with 38 additions and 17 deletions
@@ -208,6 +208,7 @@
<button
aria-label="Previous"
class="icon-cheveron-left"
style:cursor={currentIndex !== 0 ? 'pointer' : undefined}
on:click={showPrevious}
disabled={currentIndex === 0}
class:active={currentIndex > 0}></button>
@@ -216,6 +217,10 @@
aria-label="Next"
class="icon-cheveron-right"
on:click={showNext}
style:cursor={currentIndex !==
filteredModalAlerts.length - 1
? 'pointer'
: undefined}
disabled={currentIndex === filteredModalAlerts.length - 1}
class:active={currentIndex !==
filteredModalAlerts.length - 1}></button>
@@ -314,6 +319,9 @@
<button
aria-label="Previous"
class="icon-cheveron-left"
style:cursor={currentIndex !== 0
? 'pointer'
: undefined}
on:click={showPrevious}
disabled={currentIndex === 0}
class:active={currentIndex > 0}></button>
@@ -322,6 +330,10 @@
aria-label="Next"
class="icon-cheveron-right"
on:click={showNext}
style:cursor={currentIndex !==
filteredModalAlerts.length - 1
? 'pointer'
: undefined}
disabled={currentIndex ===
filteredModalAlerts.length - 1}
class:active={currentIndex !==
Binary file not shown.

After

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

+26 -17
View File
@@ -1,17 +1,37 @@
import { isCloud } from '$lib/system';
import { isSameDay } from '$lib/helpers/date';
import {
type BottomModalAlertItem,
showBottomModalAlert,
setMobileSingleAlertLayout
} from '$lib/stores/bottom-alerts';
import { type BottomModalAlertItem, showBottomModalAlert } from '$lib/stores/bottom-alerts';
import BulkApiDark from '$lib/images/promos/bulk-api-dark.png';
import BulkApiLight from '$lib/images/promos/bulk-api-light.png';
import CSVImportDark from '$lib/images/promos/csv-import-placeholder-dark.png';
import CSVImportLight from '$lib/images/promos/csv-import-placeholder-light.png';
const listOfPromotions: BottomModalAlertItem[] = [];
if (isCloud) {
const csvImportPromo: BottomModalAlertItem = {
id: 'modal:csv_import_announcement',
src: {
dark: CSVImportDark,
light: CSVImportLight
},
title: 'Introducing CSV import',
message:
"We're introducing a new way to populate your Appwrite databases: document imports from CSV files.",
plan: 'free',
importance: 8,
scope: 'everywhere',
cta: {
text: 'Read announcement',
link: () => 'https://appwrite.io/blog/post/announcing-csv-imports',
external: true,
hideOnClick: true
},
show: true
};
const bulkApiPromo: BottomModalAlertItem = {
id: 'modal:bulk_api_announcement',
src: {
@@ -33,18 +53,7 @@ if (isCloud) {
show: true
};
listOfPromotions.push(bulkApiPromo);
setMobileSingleAlertLayout({
title: bulkApiPromo.title,
message: bulkApiPromo.message,
enabled: true,
cta: {
link: bulkApiPromo.cta.link,
external: bulkApiPromo.cta.external,
hideOnClick: bulkApiPromo.cta.hideOnClick
}
});
listOfPromotions.push(bulkApiPromo, csvImportPromo);
}
export function addBottomModalAlerts() {