|
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 |
| - |
5 |
| -import BulkApiDark from '$lib/images/promos/bulk-api-dark.png'; |
6 |
| -import BulkApiLight from '$lib/images/promos/bulk-api-light.png'; |
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 |
| - |
11 |
| -import DatabaseUpsertDark from '$lib/images/promos/database-upsert-dark.png'; |
12 |
| -import DatabaseUpsertLight from '$lib/images/promos/database-upsert-light.png'; |
13 |
| -import EncryptedDatabasesDark from '$lib/images/promos/encrypted-attribute-dark.png'; |
14 |
| -import EncryptedDatabasesLight from '$lib/images/promos/encrypted-attribute-light.png'; |
15 | 4 | import AutoIncrementDark from '$lib/images/promos/auto-increment-dark.png';
|
16 | 5 | import AutoIncrementLight from '$lib/images/promos/auto-increment-light.png';
|
| 6 | +import EncryptedDatabasesDark from '$lib/images/promos/encrypted-attribute-dark.png'; |
| 7 | +import EncryptedDatabasesLight from '$lib/images/promos/encrypted-attribute-light.png'; |
| 8 | +import OptInRelationDark from '$lib/images/promos/opt-relation-dark.png'; |
| 9 | +import OptInRelationLight from '$lib/images/promos/opt-relation-light.png'; |
17 | 10 |
|
18 | 11 | const listOfPromotions: BottomModalAlertItem[] = [];
|
19 | 12 |
|
20 | 13 | if (isCloud) {
|
21 |
| - const csvImportPromo: BottomModalAlertItem = { |
22 |
| - id: 'modal:csv_import_announcement', |
23 |
| - src: { |
24 |
| - dark: CSVImportDark, |
25 |
| - light: CSVImportLight |
26 |
| - }, |
27 |
| - title: 'Introducing CSV import', |
28 |
| - message: |
29 |
| - "We're introducing a new way to populate your Appwrite databases: document imports from CSV files.", |
30 |
| - plan: 'free', |
31 |
| - importance: 8, |
32 |
| - scope: 'everywhere', |
33 |
| - cta: { |
34 |
| - text: 'Read announcement', |
35 |
| - link: () => 'https://appwrite.io/blog/post/announcing-csv-imports', |
36 |
| - external: true, |
37 |
| - hideOnClick: true |
38 |
| - }, |
39 |
| - show: true |
40 |
| - }; |
41 |
| - |
42 |
| - const bulkApiPromo: BottomModalAlertItem = { |
43 |
| - id: 'modal:bulk_api_announcement', |
44 |
| - src: { |
45 |
| - dark: BulkApiDark, |
46 |
| - light: BulkApiLight |
47 |
| - }, |
48 |
| - title: 'Introducing Bulk API', |
49 |
| - message: |
50 |
| - 'A new Appwrite Databases feature, explicitly designed to handle heavy write workloads.', |
51 |
| - plan: 'free', |
52 |
| - importance: 8, |
53 |
| - scope: 'project', |
54 |
| - cta: { |
55 |
| - text: 'Read announcement', |
56 |
| - link: () => 'https://appwrite.io/blog/post/announcing-bulk-api', |
57 |
| - external: true, |
58 |
| - hideOnClick: true |
59 |
| - }, |
60 |
| - show: true |
61 |
| - }; |
62 |
| - const databaseUpsert: BottomModalAlertItem = { |
63 |
| - id: 'modal:database_upsert_announcement', |
64 |
| - src: { |
65 |
| - dark: DatabaseUpsertDark, |
66 |
| - light: DatabaseUpsertLight |
67 |
| - }, |
68 |
| - title: 'Introducing Database Upsert', |
69 |
| - message: 'A new Appwrite Database feature, built to simplify your database interactions.', |
70 |
| - plan: 'free', |
71 |
| - importance: 8, |
72 |
| - scope: 'project', |
73 |
| - cta: { |
74 |
| - text: 'Read announcement', |
75 |
| - link: () => 'https://appwrite.io/blog/post/announcing-database-upsert', |
76 |
| - external: true, |
77 |
| - hideOnClick: true |
78 |
| - }, |
79 |
| - show: true |
80 |
| - }; |
81 | 14 | const encryptedAttributePromo: BottomModalAlertItem = {
|
82 | 15 | id: 'modal:encrypted_attribute_announcement',
|
83 | 16 | src: {
|
@@ -117,13 +50,27 @@ if (isCloud) {
|
117 | 50 | },
|
118 | 51 | show: true
|
119 | 52 | };
|
120 |
| - listOfPromotions.push( |
121 |
| - autoIncrementPromo, |
122 |
| - encryptedAttributePromo, |
123 |
| - databaseUpsert, |
124 |
| - bulkApiPromo, |
125 |
| - csvImportPromo |
126 |
| - ); |
| 53 | + const optInRelationPromo: BottomModalAlertItem = { |
| 54 | + id: 'modal:opt_in_relation_announcement', |
| 55 | + src: { |
| 56 | + dark: OptInRelationDark, |
| 57 | + light: OptInRelationLight |
| 58 | + }, |
| 59 | + title: 'Introducing Opt-in relationship loading', |
| 60 | + message: |
| 61 | + 'Gain full control over which related documents to fetch and drastically reduce payload sizes.', |
| 62 | + plan: 'free', |
| 63 | + importance: 8, |
| 64 | + scope: 'project', |
| 65 | + cta: { |
| 66 | + text: 'Read announcement', |
| 67 | + link: () => 'https://appwrite.io/blog/post/announcing-opt-in-relationship-loading', |
| 68 | + external: true, |
| 69 | + hideOnClick: true |
| 70 | + }, |
| 71 | + show: true |
| 72 | + }; |
| 73 | + listOfPromotions.push(optInRelationPromo, autoIncrementPromo, encryptedAttributePromo); |
127 | 74 | }
|
128 | 75 |
|
129 | 76 | export function addBottomModalAlerts() {
|
|
0 commit comments