1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00
metamask-extension/shared/notifications/index.js
Dan J Miller a082a2ca75
Whats new popup design fixes (#10964)
* Remove padding on QR code image

* Allow the qr code to be below the description in the whats new popup

* Fix size and position of QR code in whats new notification

* Add right caret to action links in whats new popup

* Clean up placeImageBelowDescription logic

* Fix display of whats-new-popup image

* Improve spacing and sizing of whats new popup in both full screen and popup view

* refactor
2021-05-03 15:09:26 -02:30

53 lines
1.3 KiB
JavaScript

// Messages and descriptions for these locale keys are in app/_locales/en/messages.json
export const UI_NOTIFICATIONS = {
1: {
id: 1,
date: '2021-03-17',
image: {
src: 'images/mobile-link-qr.svg',
height: '230px',
width: '230px',
placeImageBelowDescription: true,
},
},
2: {
id: 2,
date: '2020-08-31',
},
3: {
id: 3,
date: '2021-03-8',
},
};
export const getTranslatedUINoficiations = (t, locale) => {
return {
1: {
...UI_NOTIFICATIONS[1],
title: t('notifications1Title'),
description: t('notifications1Description'),
date: new Intl.DateTimeFormat(locale).format(
new Date(UI_NOTIFICATIONS[1].date),
),
},
2: {
...UI_NOTIFICATIONS[2],
title: t('notifications2Title'),
description: t('notifications2Description'),
actionText: t('notifications2ActionText'),
date: new Intl.DateTimeFormat(locale).format(
new Date(UI_NOTIFICATIONS[2].date),
),
},
3: {
...UI_NOTIFICATIONS[3],
title: t('notifications3Title'),
description: t('notifications3Description'),
actionText: t('notifications3ActionText'),
date: new Intl.DateTimeFormat(locale).format(
new Date(UI_NOTIFICATIONS[3].date),
),
},
};
};