Skip to content

Commit 79b58da

Browse files
authored
Merge pull request #2068 from HarshMN2345/feat-GRO-1112-Console-Notification-Import-Csv
feat: added promo notification for csv-import
2 parents 2518d60 + db3a626 commit 79b58da

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed
371 KB
Loading
181 KB
Loading

src/routes/(console)/bottomAlerts.ts

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,50 @@
11
import { isCloud } from '$lib/system';
22
import { isSameDay } from '$lib/helpers/date';
3-
import { type BottomModalAlertItem, showBottomModalAlert } from '$lib/stores/bottom-alerts';
3+
import {
4+
type BottomModalAlertItem,
5+
showBottomModalAlert,
6+
setMobileSingleAlertLayout
7+
} from '$lib/stores/bottom-alerts';
8+
9+
import CSVImportDark from '$lib/images/promos/csv-import-placeholder-dark.png';
10+
import CSVImportLight from '$lib/images/promos/csv-import-placeholder-light.png';
411

512
const listOfPromotions: BottomModalAlertItem[] = [];
613

714
if (isCloud) {
8-
/* add promos here */
15+
const csvImportPromo: BottomModalAlertItem = {
16+
id: 'modal:csv_import_announcement',
17+
src: {
18+
dark: CSVImportDark,
19+
light: CSVImportLight
20+
},
21+
title: 'Introducing CSV import',
22+
message:
23+
"We're introducing a new way to populate your Appwrite databases: document imports from CSV files.",
24+
plan: 'free',
25+
importance: 8,
26+
scope: 'everywhere',
27+
cta: {
28+
text: 'Read announcement',
29+
link: () => 'https://appwrite.io/blog/post/announcing-csv-imports',
30+
external: true,
31+
hideOnClick: true
32+
},
33+
show: true
34+
};
35+
36+
listOfPromotions.push(csvImportPromo);
37+
38+
setMobileSingleAlertLayout({
39+
title: csvImportPromo.title,
40+
message: csvImportPromo.message,
41+
enabled: true,
42+
cta: {
43+
link: csvImportPromo.cta.link,
44+
external: csvImportPromo.cta.external,
45+
hideOnClick: csvImportPromo.cta.hideOnClick
46+
}
47+
});
948
}
1049

1150
export function addBottomModalAlerts() {

0 commit comments

Comments
 (0)