Skip to content

Commit 9de0afb

Browse files
committed
update: design changes.
1 parent cd7ee26 commit 9de0afb

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

src/lib/components/bottomModalAlert.svelte

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@
108108
message: 'Explore new features to enhance your projects and improve security.'
109109
};
110110
111+
// override
112+
if (currentModalAlert?.sameContentOnMobileLayout) {
113+
fallback.title = currentModalAlert?.title;
114+
fallback.message = currentModalAlert?.message;
115+
}
116+
111117
const shouldApplyConfig = config?.enabled === true && visibleAlerts.length === 1;
112118
113119
return {
@@ -269,6 +275,7 @@
269275
<div
270276
class="buttons u-flex u-flex-vertical-mobile u-gap-4 u-padding-inline-8 u-padding-block-8">
271277
<Button
278+
size="xs"
272279
fullWidthMobile
273280
secondary={!hasOnlyPrimaryCta}
274281
class={`${hasOnlyPrimaryCta ? 'only-primary-cta' : ''}`}
@@ -288,6 +295,7 @@
288295
<!-- docs, learn-more, etc always external -->
289296
<Button
290297
text
298+
size="xs"
291299
class="button"
292300
external
293301
fullWidthMobile
@@ -377,7 +385,7 @@
377385
</div>
378386
{/if}
379387

380-
<div class="u-flex-vertical u-gap-8 u-padding-inline-8">
388+
<div class="u-flex-vertical u-gap-4 u-padding-inline-8">
381389
<Typography.Text variant="m-500" color="--fgcolor-neutral-primary">
382390
{currentModalAlert.title}
383391
</Typography.Text>
@@ -394,6 +402,7 @@
394402
<div
395403
class="buttons u-flex u-flex-vertical-mobile u-gap-4 u-padding-inline-8 u-padding-block-8">
396404
<Button
405+
size="xs"
397406
secondary={!hasOnlyPrimaryCta}
398407
class="button"
399408
fullWidthMobile
@@ -421,6 +430,7 @@
421430
<!-- docs, learn-more, etc always external -->
422431
<Button
423432
text
433+
size="xs"
424434
class="button"
425435
external
426436
fullWidthMobile
@@ -457,7 +467,7 @@
457467
<div class="u-flex-vertical u-gap-4">
458468
<div class="u-flex u-cross-center u-main-space-between">
459469
<Typography.Text variant="m-500" color="--fgcolor-neutral-primary">
460-
{currentModalAlert.title}
470+
{mobileConfig.title}
461471
</Typography.Text>
462472
<button onclick={hideAllModalAlerts} aria-label="Close">
463473
<span class="icon-x"></span>

src/lib/stores/bottom-alerts.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ export type BottomModalAlertItem = {
5050
closed?: () => void;
5151
scope: 'organization' | 'project' | 'everywhere';
5252
notificationHideOptions?: NotificationCoolOffOptions;
53+
54+
/**
55+
* if true,
56+
* uses same title, message on mobile floating window.
57+
*/
58+
sameContentOnMobileLayout?: boolean;
5359
};
5460

5561
type BottomModalAlertState = {

src/routes/(console)/bottomAlerts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ if (isCloud) {
3232
external: true,
3333
hideOnClick: true
3434
},
35-
show: true
35+
show: true,
36+
sameContentOnMobileLayout: true
3637
};
38+
3739
listOfPromotions.push(imaginePromo);
3840
}
3941

0 commit comments

Comments
 (0)