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