1
1
import { isCloud } from '$lib/system' ;
2
2
import { isSameDay } from '$lib/helpers/date' ;
3
3
import { type BottomModalAlertItem , showBottomModalAlert } from '$lib/stores/bottom-alerts' ;
4
- import DatabaseUpsertDark from '$lib/images/promos/database-upsert -dark.png' ;
5
- import DatabaseUpsertLight from '$lib/images/promos/database-upsert -light.png' ;
4
+ import AutoIncrementDark from '$lib/images/promos/auto-increment -dark.png' ;
5
+ import AutoIncrementLight from '$lib/images/promos/auto-increment -light.png' ;
6
6
import EncryptedDatabasesDark from '$lib/images/promos/encrypted-attribute-dark.png' ;
7
7
import EncryptedDatabasesLight from '$lib/images/promos/encrypted-attribute-light.png' ;
8
8
import OptInRelationDark from '$lib/images/promos/opt-relation-dark.png' ;
@@ -11,39 +11,40 @@ import OptInRelationLight from '$lib/images/promos/opt-relation-light.png';
11
11
const listOfPromotions : BottomModalAlertItem [ ] = [ ] ;
12
12
13
13
if ( isCloud ) {
14
- const databaseUpsert : BottomModalAlertItem = {
15
- id : 'modal:database_upsert_announcement ' ,
14
+ const encryptedAttributePromo : BottomModalAlertItem = {
15
+ id : 'modal:encrypted_attribute_announcement ' ,
16
16
src : {
17
- dark : DatabaseUpsertDark ,
18
- light : DatabaseUpsertLight
17
+ dark : EncryptedDatabasesDark ,
18
+ light : EncryptedDatabasesLight
19
19
} ,
20
- title : 'Introducing Database Upsert ' ,
21
- message : 'A new Appwrite Database feature, built to simplify your database interactions .' ,
20
+ title : 'Introducing Encrypted string attribute support ' ,
21
+ message : 'Encrypt string attributes at rest, directly from the Appwrite Console .' ,
22
22
plan : 'free' ,
23
23
importance : 8 ,
24
24
scope : 'project' ,
25
25
cta : {
26
26
text : 'Read announcement' ,
27
- link : ( ) => 'https://appwrite.io/blog/post/announcing-database-upsert ' ,
27
+ link : ( ) => 'https://appwrite.io/blog/post/announcing-encrypted-string-attributes ' ,
28
28
external : true ,
29
29
hideOnClick : true
30
30
} ,
31
31
show : true
32
32
} ;
33
- const encryptedAttributePromo : BottomModalAlertItem = {
34
- id : 'modal:encrypted_attribute_announcement ' ,
33
+ const autoIncrementPromo : BottomModalAlertItem = {
34
+ id : 'modal:auto_increment_announcement ' ,
35
35
src : {
36
- dark : EncryptedDatabasesDark ,
37
- light : EncryptedDatabasesLight
36
+ dark : AutoIncrementDark ,
37
+ light : AutoIncrementLight
38
38
} ,
39
- title : 'Introducing Encrypted string attribute support' ,
40
- message : 'Encrypt string attributes at rest, directly from the Appwrite Console.' ,
39
+ title : 'Announcing Auto-increment support' ,
40
+ message :
41
+ 'Get a built-in numeric identifier that increases predictably with every new document added.' ,
41
42
plan : 'free' ,
42
43
importance : 8 ,
43
44
scope : 'project' ,
44
45
cta : {
45
46
text : 'Read announcement' ,
46
- link : ( ) => 'https://appwrite.io/blog/post/announcing-encrypted-string-attributes ' ,
47
+ link : ( ) => 'https://appwrite.io/blog/post/announcing-auto-increment-support ' ,
47
48
external : true ,
48
49
hideOnClick : true
49
50
} ,
@@ -69,7 +70,7 @@ if (isCloud) {
69
70
} ,
70
71
show : true
71
72
} ;
72
- listOfPromotions . push ( optInRelationPromo , encryptedAttributePromo , databaseUpsert ) ;
73
+ listOfPromotions . push ( optInRelationPromo , autoIncrementPromo , encryptedAttributePromo ) ;
73
74
}
74
75
75
76
export function addBottomModalAlerts ( ) {
@@ -87,5 +88,5 @@ export function isPromoLive(
87
88
const targetString = `${ date } T${ time } :00` ;
88
89
const target = new Date ( new Date ( targetString ) . toLocaleString ( 'en-US' , { timeZone } ) ) ;
89
90
90
- return isSameDay ( now , target ) && now >= target ;
91
+ return isSameDay ( now , target ) && now > target ;
91
92
}
0 commit comments