mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Revert "Revert "Dark Mode: What's New Announcement (#14346)""
This reverts commit 9cea6f57ef
.
This commit is contained in:
parent
f19173b0f2
commit
fd3eabf327
9
app/_locales/en/messages.json
generated
9
app/_locales/en/messages.json
generated
@ -2139,6 +2139,15 @@
|
|||||||
"notifications11Title": {
|
"notifications11Title": {
|
||||||
"message": "Scam and security risks"
|
"message": "Scam and security risks"
|
||||||
},
|
},
|
||||||
|
"notifications12ActionText": {
|
||||||
|
"message": "Enable dark mode"
|
||||||
|
},
|
||||||
|
"notifications12Description": {
|
||||||
|
"message": "Dark mode on Extension is finally here! To turn it on, go to Settings -> Experimental and select one of the display options: Light, Dark, System."
|
||||||
|
},
|
||||||
|
"notifications12Title": {
|
||||||
|
"message": "Wen dark mode? Now dark mode! 🕶️🦊"
|
||||||
|
},
|
||||||
"notifications1Description": {
|
"notifications1Description": {
|
||||||
"message": "MetaMask Mobile users can now swap tokens inside their mobile wallet. Scan the QR code to get the mobile app and start swapping.",
|
"message": "MetaMask Mobile users can now swap tokens inside their mobile wallet. Scan the QR code to get the mobile app and start swapping.",
|
||||||
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
"description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature."
|
||||||
|
BIN
app/images/darkmode-banner.png
Normal file
BIN
app/images/darkmode-banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -58,6 +58,14 @@ export const UI_NOTIFICATIONS = {
|
|||||||
id: 11,
|
id: 11,
|
||||||
date: '2022-04-18',
|
date: '2022-04-18',
|
||||||
},
|
},
|
||||||
|
12: {
|
||||||
|
id: 12,
|
||||||
|
date: '2022-05-18',
|
||||||
|
image: {
|
||||||
|
src: 'images/darkmode-banner.png',
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getTranslatedUINoficiations = (t, locale) => {
|
export const getTranslatedUINoficiations = (t, locale) => {
|
||||||
@ -165,5 +173,14 @@ export const getTranslatedUINoficiations = (t, locale) => {
|
|||||||
new Date(UI_NOTIFICATIONS[11].date),
|
new Date(UI_NOTIFICATIONS[11].date),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
12: {
|
||||||
|
...UI_NOTIFICATIONS[12],
|
||||||
|
title: t('notifications12Title'),
|
||||||
|
description: t('notifications12Description'),
|
||||||
|
actionText: t('notifications12ActionText'),
|
||||||
|
date: new Intl.DateTimeFormat(formattedLocale).format(
|
||||||
|
new Date(UI_NOTIFICATIONS[12].date),
|
||||||
|
),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -66,6 +66,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -56,6 +56,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -52,6 +52,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -70,6 +70,9 @@
|
|||||||
"notifications": {
|
"notifications": {
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -53,6 +53,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -53,6 +53,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -107,6 +107,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -52,6 +52,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -52,6 +52,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -56,6 +56,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -52,6 +52,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -26,6 +26,13 @@
|
|||||||
},
|
},
|
||||||
"network": "1337"
|
"network": "1337"
|
||||||
},
|
},
|
||||||
|
"NotificationController": {
|
||||||
|
"notifications": {
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"CurrencyController": {
|
"CurrencyController": {
|
||||||
"conversionDate": 1617927806.941,
|
"conversionDate": 1617927806.941,
|
||||||
"conversionRate": 2084.64,
|
"conversionRate": 2084.64,
|
||||||
|
@ -53,6 +53,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -53,6 +53,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -63,6 +63,9 @@
|
|||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
|
},
|
||||||
|
"12": {
|
||||||
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -15,6 +15,7 @@ import { getSortedAnnouncementsToShow } from '../../../selectors';
|
|||||||
import {
|
import {
|
||||||
BUILD_QUOTE_ROUTE,
|
BUILD_QUOTE_ROUTE,
|
||||||
ADVANCED_ROUTE,
|
ADVANCED_ROUTE,
|
||||||
|
EXPERIMENTAL_ROUTE,
|
||||||
} from '../../../helpers/constants/routes';
|
} from '../../../helpers/constants/routes';
|
||||||
import { TYPOGRAPHY } from '../../../helpers/constants/design-system';
|
import { TYPOGRAPHY } from '../../../helpers/constants/design-system';
|
||||||
|
|
||||||
@ -49,6 +50,10 @@ function getActionFunctionById(id, history) {
|
|||||||
updateViewedNotifications({ 10: true });
|
updateViewedNotifications({ 10: true });
|
||||||
history.push(`${ADVANCED_ROUTE}#token-description`);
|
history.push(`${ADVANCED_ROUTE}#token-description`);
|
||||||
},
|
},
|
||||||
|
12: () => {
|
||||||
|
updateViewedNotifications({ 12: true });
|
||||||
|
history.push(EXPERIMENTAL_ROUTE);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
return actionFunctions[id];
|
return actionFunctions[id];
|
||||||
|
@ -751,6 +751,7 @@ function getAllowedAnnouncementIds(state) {
|
|||||||
9: getIsMainnet(state),
|
9: getIsMainnet(state),
|
||||||
10: Boolean(process.env.TOKEN_DETECTION_V2),
|
10: Boolean(process.env.TOKEN_DETECTION_V2),
|
||||||
11: Boolean(process.env.TOKEN_DETECTION_V2),
|
11: Boolean(process.env.TOKEN_DETECTION_V2),
|
||||||
|
12: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user