|
1 | 1 | import { isCloud } from '$lib/system';
|
2 | 2 | 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'; |
4 | 11 |
|
5 | 12 | const listOfPromotions: BottomModalAlertItem[] = [];
|
6 | 13 |
|
7 | 14 | 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 | + }); |
9 | 48 | }
|
10 | 49 |
|
11 | 50 | export function addBottomModalAlerts() {
|
|
0 commit comments