1
1
import { isCloud } from '$lib/system' ;
2
2
import { isSameDay } from '$lib/helpers/date' ;
3
- import {
4
- type BottomModalAlertItem ,
5
- showBottomModalAlert ,
6
- setMobileSingleAlertLayout
7
- } from '$lib/stores/bottom-alerts' ;
3
+ import { type BottomModalAlertItem , showBottomModalAlert } from '$lib/stores/bottom-alerts' ;
8
4
9
5
import BulkApiDark from '$lib/images/promos/bulk-api-dark.png' ;
10
6
import BulkApiLight from '$lib/images/promos/bulk-api-light.png' ;
11
7
8
+ import CSVImportDark from '$lib/images/promos/csv-import-placeholder-dark.png' ;
9
+ import CSVImportLight from '$lib/images/promos/csv-import-placeholder-light.png' ;
10
+
12
11
const listOfPromotions : BottomModalAlertItem [ ] = [ ] ;
13
12
14
13
if ( isCloud ) {
14
+ const csvImportPromo : BottomModalAlertItem = {
15
+ id : 'modal:csv_import_announcement' ,
16
+ src : {
17
+ dark : CSVImportDark ,
18
+ light : CSVImportLight
19
+ } ,
20
+ title : 'Introducing CSV import' ,
21
+ message :
22
+ "We're introducing a new way to populate your Appwrite databases: document imports from CSV files." ,
23
+ plan : 'free' ,
24
+ importance : 8 ,
25
+ scope : 'everywhere' ,
26
+ cta : {
27
+ text : 'Read announcement' ,
28
+ link : ( ) => 'https://appwrite.io/blog/post/announcing-csv-imports' ,
29
+ external : true ,
30
+ hideOnClick : true
31
+ } ,
32
+ show : true
33
+ } ;
34
+
15
35
const bulkApiPromo : BottomModalAlertItem = {
16
36
id : 'modal:bulk_api_announcement' ,
17
37
src : {
@@ -33,18 +53,7 @@ if (isCloud) {
33
53
show : true
34
54
} ;
35
55
36
- listOfPromotions . push ( bulkApiPromo ) ;
37
-
38
- setMobileSingleAlertLayout ( {
39
- title : bulkApiPromo . title ,
40
- message : bulkApiPromo . message ,
41
- enabled : true ,
42
- cta : {
43
- link : bulkApiPromo . cta . link ,
44
- external : bulkApiPromo . cta . external ,
45
- hideOnClick : bulkApiPromo . cta . hideOnClick
46
- }
47
- } ) ;
56
+ listOfPromotions . push ( bulkApiPromo , csvImportPromo ) ;
48
57
}
49
58
50
59
export function addBottomModalAlerts ( ) {
0 commit comments