mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
add: multiple promos.
This commit is contained in:
1 parent
11c324d9ea
commit
bb4096f8b7
4 files changed
+32
-17
No files matched your search
@@ -208,6 +208,7 @@
|
||||
<button
|
||||
aria-label="Previous"
|
||||
class="icon-cheveron-left"
|
||||
class:u-cursor-pointer={currentIndex === 0}
|
||||
on:click={showPrevious}
|
||||
disabled={currentIndex === 0}
|
||||
class:active={currentIndex > 0}></button>
|
||||
@@ -216,6 +217,8 @@
|
||||
aria-label="Next"
|
||||
class="icon-cheveron-right"
|
||||
on:click={showNext}
|
||||
class:u-cursor-pointer={currentIndex ===
|
||||
filteredModalAlerts.length - 1}
|
||||
disabled={currentIndex === filteredModalAlerts.length - 1}
|
||||
class:active={currentIndex !==
|
||||
filteredModalAlerts.length - 1}></button>
|
||||
@@ -314,6 +317,7 @@
|
||||
<button
|
||||
aria-label="Previous"
|
||||
class="icon-cheveron-left"
|
||||
class:u-cursor-pointer={currentIndex === 0}
|
||||
on:click={showPrevious}
|
||||
disabled={currentIndex === 0}
|
||||
class:active={currentIndex > 0}></button>
|
||||
@@ -322,6 +326,8 @@
|
||||
aria-label="Next"
|
||||
class="icon-cheveron-right"
|
||||
on:click={showNext}
|
||||
class:u-cursor-pointer={currentIndex ===
|
||||
filteredModalAlerts.length - 1}
|
||||
disabled={currentIndex ===
|
||||
filteredModalAlerts.length - 1}
|
||||
class:active={currentIndex !==
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 371 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 181 KiB |
@@ -1,17 +1,37 @@
|
||||
import { isCloud } from '$lib/system';
|
||||
import { isSameDay } from '$lib/helpers/date';
|
||||
import {
|
||||
type BottomModalAlertItem,
|
||||
showBottomModalAlert,
|
||||
setMobileSingleAlertLayout
|
||||
} from '$lib/stores/bottom-alerts';
|
||||
import { type BottomModalAlertItem, showBottomModalAlert } from '$lib/stores/bottom-alerts';
|
||||
|
||||
import BulkApiDark from '$lib/images/promos/bulk-api-dark.png';
|
||||
import BulkApiLight from '$lib/images/promos/bulk-api-light.png';
|
||||
|
||||
import CSVImportDark from '$lib/images/promos/csv-import-placeholder-dark.png';
|
||||
import CSVImportLight from '$lib/images/promos/csv-import-placeholder-light.png';
|
||||
|
||||
const listOfPromotions: BottomModalAlertItem[] = [];
|
||||
|
||||
if (isCloud) {
|
||||
const csvImportPromo: BottomModalAlertItem = {
|
||||
id: 'modal:csv_import_announcement',
|
||||
src: {
|
||||
dark: CSVImportDark,
|
||||
light: CSVImportLight
|
||||
},
|
||||
title: 'Introducing CSV import',
|
||||
message:
|
||||
"We're introducing a new way to populate your Appwrite databases: document imports from CSV files.",
|
||||
plan: 'free',
|
||||
importance: 8,
|
||||
scope: 'everywhere',
|
||||
cta: {
|
||||
text: 'Read announcement',
|
||||
link: () => 'https://appwrite.io/blog/post/announcing-csv-imports',
|
||||
external: true,
|
||||
hideOnClick: true
|
||||
},
|
||||
show: true
|
||||
};
|
||||
|
||||
const bulkApiPromo: BottomModalAlertItem = {
|
||||
id: 'modal:bulk_api_announcement',
|
||||
src: {
|
||||
@@ -33,18 +53,7 @@ if (isCloud) {
|
||||
show: true
|
||||
};
|
||||
|
||||
listOfPromotions.push(bulkApiPromo);
|
||||
|
||||
setMobileSingleAlertLayout({
|
||||
title: bulkApiPromo.title,
|
||||
message: bulkApiPromo.message,
|
||||
enabled: true,
|
||||
cta: {
|
||||
link: bulkApiPromo.cta.link,
|
||||
external: bulkApiPromo.cta.external,
|
||||
hideOnClick: bulkApiPromo.cta.hideOnClick
|
||||
}
|
||||
});
|
||||
listOfPromotions.push(bulkApiPromo, csvImportPromo);
|
||||
}
|
||||
|
||||
export function addBottomModalAlerts() {
|
||||
|
||||
Reference in new issue
Block a user