1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +01:00

Add what's new popup for snaps (#20686)

* Add what's new popup for snaps

* Update SVG

* Update copy and link out

* Update SVG and fix lint

* Fix unnecessary space in copy

---------

Co-authored-by: Howard Braham <howrad@gmail.com>
This commit is contained in:
Frederik Bolding 2023-09-04 16:41:06 +02:00 committed by GitHub
parent 51cdb73a5f
commit 6ee90ac8b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 148 additions and 1 deletions

View File

@ -2900,6 +2900,21 @@
"notificationsMarkAllAsRead": {
"message": "Mark all as read"
},
"notificationsOpenBetaSnapsActionText": {
"message": "Learn more"
},
"notificationsOpenBetaSnapsDescriptionOne": {
"message": "🎉 We're excited to announce the Open Beta of MetaMask Snaps!"
},
"notificationsOpenBetaSnapsDescriptionThree": {
"message": "Personalize your wallet with snaps built by the developer community!"
},
"notificationsOpenBetaSnapsDescriptionTwo": {
"message": "Snaps help you do more with MetaMask — like connect to more networks, see transaction insights, and get custom notifications."
},
"notificationsOpenBetaSnapsTitle": {
"message": "Introducing MetaMask Snaps"
},
"numberOfNewTokensDetectedPlural": {
"message": "$1 new tokens found in this account",
"description": "$1 is the number of new tokens detected"

View File

@ -0,0 +1,93 @@
<svg width="296" height="114" viewBox="0 0 296 114" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1357_4712)">
<rect width="296" height="114" rx="8" fill="#F2F4F6"/>
<g opacity="0.8" filter="url(#filter0_f_1357_4712)">
<path d="M277.679 215.325L152.424 402.875L598.645 423.026L583.771 -53.5996L277.679 215.325Z" fill="#E27625" stroke="#E27625" stroke-width="7.65217" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M-293.003 -294.625L-225.679 26.2251L-268.735 58.0001L-204.542 106.05L-253.078 143.25L-189.668 200.6L-229.593 229.275L-138 335.45L277.69 215.325L572.039 -31.1249L-192.799 -593L-293.003 -294.625Z" fill="#763E1A" stroke="#763E1A" stroke-width="7.65217" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<rect width="328" height="136" fill="url(#paint0_linear_1357_4712)"/>
<g clip-path="url(#clip1_1357_4712)">
<path opacity="0.5" d="M253.868 140.582C247.795 152.08 232.314 157.285 212.081 156.317C191.864 155.35 166.98 148.219 142.228 135.146C117.475 122.072 97.5563 105.54 85.3601 89.3881C73.1534 73.2222 68.725 57.5013 74.7978 46.0034C80.8706 34.5055 96.3515 29.3 116.585 30.2679C136.802 31.235 161.685 38.3657 186.438 51.4392C211.191 64.5128 231.109 81.045 243.306 97.197C255.512 113.363 259.941 129.084 253.868 140.582Z" fill="url(#paint1_radial_1357_4712)" fill-opacity="0.75" stroke="white" stroke-width="0.394925"/>
<path opacity="0.5" d="M226.842 122.668C219.528 136.517 203.475 144.122 183.364 145.168C163.258 146.215 139.14 140.701 115.784 128.365C92.428 116.029 74.2766 99.2183 63.8055 82.0222C53.3314 64.8213 50.5624 47.2762 57.8772 33.4267C65.192 19.5773 81.244 11.9728 101.356 10.9262C121.462 9.87988 145.58 15.394 168.936 27.7298C192.292 40.0655 210.443 56.8763 220.914 74.0724C231.388 91.2733 234.157 108.818 226.842 122.668Z" fill="url(#paint2_radial_1357_4712)" fill-opacity="0.5" stroke="white" stroke-width="0.474924"/>
<path opacity="0.5" d="M249.145 25.0877C251.823 29.726 251.557 35.808 248.719 42.8719C245.882 49.933 240.487 57.9416 232.969 66.3966C217.933 83.305 194.434 101.965 166.034 118.362C137.633 134.759 109.724 145.78 87.5628 150.347C76.4812 152.631 66.8482 153.298 59.3146 152.225C51.778 151.151 46.3779 148.34 43.7 143.702C41.0221 139.063 41.2881 132.981 44.1262 125.918C46.9632 118.856 52.3579 110.848 59.8766 102.393C74.9125 85.4844 98.4117 66.8245 126.812 50.4277C155.212 34.0308 183.122 23.0099 205.283 18.4427C216.364 16.1588 225.997 15.4911 233.531 16.5648C241.067 17.6389 246.468 20.4495 249.145 25.0877Z" fill="url(#paint3_radial_1357_4712)" fill-opacity="0.5" stroke="white" stroke-width="0.394925"/>
<path opacity="0.5" d="M269.805 75.1055C270.009 76.9384 269.375 78.8376 267.946 80.7825C266.517 82.7285 264.301 84.708 261.368 86.6911C255.502 90.6569 246.803 94.6129 235.908 98.3353C214.121 105.779 183.592 112.274 149.489 116.053C115.385 119.833 84.1756 120.179 61.2872 117.685C49.8413 116.439 40.4873 114.483 33.8953 111.898C30.5991 110.605 28.0036 109.159 26.1832 107.573C24.3638 105.988 23.3294 104.274 23.1263 102.441C22.9232 100.608 23.5571 98.7086 24.9854 96.7637C26.4144 94.8177 28.6303 92.8381 31.5635 90.8551C37.4296 86.8893 46.1285 82.9333 57.0237 79.2109C78.811 71.7672 109.339 65.2719 143.443 61.4928C177.546 57.7137 208.756 57.3677 231.645 59.8607C243.09 61.1074 252.444 63.0629 259.036 65.6482C262.333 66.941 264.928 68.3873 266.749 69.9733C268.568 71.5583 269.602 73.2726 269.805 75.1055Z" fill="url(#paint4_radial_1357_4712)" stroke="white" stroke-width="0.394925"/>
<rect x="35.9463" y="72.946" width="20.1589" height="20.1589" rx="10.0794" fill="#0376C9" fill-opacity="0.58"/>
<path d="M50.5298 79.1965L46.6773 77.1627C46.2718 76.9461 45.7802 76.9461 45.3747 77.1627L41.5222 79.1965C41.2395 79.3469 41.0675 79.6357 41.0675 79.9666C41.0675 80.2916 41.2395 80.5864 41.5222 80.7368L45.3747 82.7706C45.5775 82.8789 45.8048 82.9331 46.026 82.9331C46.2472 82.9331 46.4745 82.8789 46.6773 82.7706L50.5298 80.7368C50.8124 80.5864 50.9845 80.2976 50.9845 79.9666C50.9845 79.6357 50.8124 79.3469 50.5298 79.1965Z" fill="white"/>
<path d="M44.8689 83.309L41.3675 81.4499C41.0905 81.3167 40.6775 81.4203 40.419 81.5777C40.1544 81.7412 40.0005 82.0136 40.0005 82.3162V85.6516C40.0005 86.2266 40.3267 86.7825 40.8498 87.0428L44.4381 88.9586C44.5611 89.0191 44.6966 89.0494 44.832 89.0494C44.992 89.0494 45.152 89.007 45.2936 88.9222C45.5582 88.7649 45.7121 88.3029 45.7121 88.0002V84.6649C45.7182 84.0838 45.392 83.5632 44.8689 83.309Z" fill="white"/>
<path d="M51.633 81.5801C51.3683 81.4228 50.9528 81.3107 50.682 81.4499L47.1892 83.3108C46.666 83.571 46.3398 84.0854 46.3398 84.6663V88.0005C46.3398 88.3031 46.4937 88.7669 46.7584 88.9242C46.8999 89.0089 47.0599 89.0513 47.22 89.0513C47.3554 89.0513 47.4908 89.021 47.6139 88.9605L51.2021 87.0428C51.7253 86.7826 52.0515 86.2336 52.0515 85.6526V82.3184C52.0515 82.0158 51.8976 81.7435 51.633 81.5801Z" fill="white"/>
<rect x="35.9463" y="72.946" width="20.1589" height="20.1589" rx="10.0794" stroke="#ADD5F3" stroke-width="0.5"/>
<rect x="158.946" y="15.946" width="20.1589" height="20.1589" rx="10.0794" fill="#0376C9" fill-opacity="0.58"/>
<path d="M173.53 22.1965L169.677 20.1627C169.272 19.9461 168.78 19.9461 168.375 20.1627L164.522 22.1965C164.24 22.3469 164.068 22.6357 164.068 22.9666C164.068 23.2916 164.24 23.5864 164.522 23.7368L168.375 25.7706C168.577 25.8789 168.805 25.9331 169.026 25.9331C169.247 25.9331 169.475 25.8789 169.677 25.7706L173.53 23.7368C173.812 23.5864 173.984 23.2976 173.984 22.9666C173.984 22.6357 173.812 22.3469 173.53 22.1965Z" fill="white"/>
<path d="M167.869 26.309L164.368 24.4499C164.091 24.3167 163.678 24.4203 163.419 24.5777C163.154 24.7412 163 25.0136 163 25.3162V28.6516C163 29.2266 163.327 29.7825 163.85 30.0428L167.438 31.9586C167.561 32.0191 167.697 32.0494 167.832 32.0494C167.992 32.0494 168.152 32.007 168.294 31.9222C168.558 31.7649 168.712 31.3029 168.712 31.0002V27.6649C168.718 27.0838 168.392 26.5632 167.869 26.309Z" fill="white"/>
<path d="M174.633 24.5801C174.368 24.4228 173.953 24.3107 173.682 24.4499L170.189 26.3108C169.666 26.571 169.34 27.0854 169.34 27.6663V31.0005C169.34 31.3031 169.494 31.7669 169.758 31.9242C169.9 32.0089 170.06 32.0513 170.22 32.0513C170.355 32.0513 170.491 32.021 170.614 31.9605L174.202 30.0428C174.725 29.7826 175.052 29.2336 175.052 28.6526V25.3184C175.052 25.0158 174.898 24.7435 174.633 24.5801Z" fill="white"/>
<rect x="158.946" y="15.946" width="20.1589" height="20.1589" rx="10.0794" stroke="#D1E8FA" stroke-width="0.5"/>
<rect x="66.9463" y="6.94604" width="20.1589" height="20.1589" rx="10.0794" fill="#0376C9" fill-opacity="0.58"/>
<path d="M81.5298 13.1965L77.6773 11.1627C77.2718 10.9461 76.7802 10.9461 76.3747 11.1627L72.5222 13.1965C72.2395 13.3469 72.0675 13.6357 72.0675 13.9666C72.0675 14.2916 72.2395 14.5864 72.5222 14.7368L76.3747 16.7706C76.5775 16.8789 76.8048 16.9331 77.026 16.9331C77.2472 16.9331 77.4745 16.8789 77.6773 16.7706L81.5298 14.7368C81.8124 14.5864 81.9845 14.2976 81.9845 13.9666C81.9845 13.6357 81.8124 13.3469 81.5298 13.1965Z" fill="white"/>
<path d="M75.8689 17.309L72.3675 15.4499C72.0905 15.3167 71.6775 15.4203 71.419 15.5777C71.1544 15.7412 71.0005 16.0136 71.0005 16.3162V19.6516C71.0005 20.2266 71.3267 20.7825 71.8498 21.0428L75.4381 22.9586C75.5611 23.0191 75.6966 23.0494 75.832 23.0494C75.992 23.0494 76.152 23.007 76.2936 22.9222C76.5582 22.7649 76.7121 22.3029 76.7121 22.0002V18.6649C76.7182 18.0838 76.392 17.5632 75.8689 17.309Z" fill="white"/>
<path d="M82.633 15.5801C82.3683 15.4228 81.9528 15.3107 81.682 15.4499L78.1892 17.3108C77.666 17.571 77.3398 18.0854 77.3398 18.6663V22.0005C77.3398 22.3031 77.4937 22.7669 77.7584 22.9242C77.8999 23.0089 78.0599 23.0513 78.22 23.0513C78.3554 23.0513 78.4908 23.021 78.6139 22.9605L82.2021 21.0428C82.7253 20.7826 83.0515 20.2336 83.0515 19.6526V16.3184C83.0515 16.0158 82.8976 15.7435 82.633 15.5801Z" fill="white"/>
<rect x="66.9463" y="6.94604" width="20.1589" height="20.1589" rx="10.0794" stroke="#D1E8FA" stroke-width="0.5"/>
<rect x="228.946" y="7.94604" width="20.1589" height="20.1589" rx="10.0794" fill="#0376C9" fill-opacity="0.58"/>
<path d="M243.53 14.1965L239.677 12.1627C239.272 11.9461 238.78 11.9461 238.375 12.1627L234.522 14.1965C234.24 14.3469 234.068 14.6357 234.068 14.9666C234.068 15.2916 234.24 15.5864 234.522 15.7368L238.375 17.7706C238.577 17.8789 238.805 17.9331 239.026 17.9331C239.247 17.9331 239.475 17.8789 239.677 17.7706L243.53 15.7368C243.812 15.5864 243.984 15.2976 243.984 14.9666C243.984 14.6357 243.812 14.3469 243.53 14.1965Z" fill="white"/>
<path d="M237.869 18.309L234.368 16.4499C234.091 16.3167 233.678 16.4203 233.419 16.5777C233.154 16.7412 233 17.0136 233 17.3162V20.6516C233 21.2266 233.327 21.7825 233.85 22.0428L237.438 23.9586C237.561 24.0191 237.697 24.0494 237.832 24.0494C237.992 24.0494 238.152 24.007 238.294 23.9222C238.558 23.7649 238.712 23.3029 238.712 23.0002V19.6649C238.718 19.0838 238.392 18.5632 237.869 18.309Z" fill="white"/>
<path d="M244.633 16.5801C244.368 16.4228 243.953 16.3107 243.682 16.4499L240.189 18.3108C239.666 18.571 239.34 19.0854 239.34 19.6663V23.0005C239.34 23.3031 239.494 23.7669 239.758 23.9242C239.9 24.0089 240.06 24.0513 240.22 24.0513C240.355 24.0513 240.491 24.021 240.614 23.9605L244.202 22.0428C244.725 21.7826 245.052 21.2336 245.052 20.6526V17.3184C245.052 17.0158 244.898 16.7435 244.633 16.5801Z" fill="white"/>
<rect x="228.946" y="7.94604" width="20.1589" height="20.1589" rx="10.0794" stroke="#D1E8FA" stroke-width="0.5"/>
<rect x="234.095" y="84.0952" width="19.8607" height="19.8607" rx="9.93033" fill="#0376C9" fill-opacity="0.58"/>
<path d="M248.53 90.1965L244.677 88.1627C244.272 87.9461 243.78 87.9461 243.375 88.1627L239.522 90.1965C239.24 90.3469 239.068 90.6357 239.068 90.9666C239.068 91.2916 239.24 91.5864 239.522 91.7368L243.375 93.7706C243.577 93.8789 243.805 93.9331 244.026 93.9331C244.247 93.9331 244.475 93.8789 244.677 93.7706L248.53 91.7368C248.812 91.5864 248.984 91.2976 248.984 90.9666C248.984 90.6357 248.812 90.3469 248.53 90.1965Z" fill="white"/>
<path d="M242.869 94.309L239.368 92.4499C239.091 92.3167 238.678 92.4203 238.419 92.5777C238.154 92.7412 238 93.0136 238 93.3162V96.6516C238 97.2266 238.327 97.7825 238.85 98.0428L242.438 99.9586C242.561 100.019 242.697 100.049 242.832 100.049C242.992 100.049 243.152 100.007 243.294 99.9222C243.558 99.7649 243.712 99.3029 243.712 99.0002V95.6649C243.718 95.0838 243.392 94.5632 242.869 94.309Z" fill="white"/>
<path d="M249.633 92.5801C249.368 92.4228 248.953 92.3107 248.682 92.4499L245.189 94.3108C244.666 94.571 244.34 95.0854 244.34 95.6663V99.0005C244.34 99.3031 244.494 99.7669 244.758 99.9242C244.9 100.009 245.06 100.051 245.22 100.051C245.355 100.051 245.491 100.021 245.614 99.9605L249.202 98.0428C249.725 97.7826 250.052 97.2336 250.052 96.6526V93.3184C250.052 93.0158 249.898 92.7435 249.633 92.5801Z" fill="white"/>
<rect x="234.095" y="84.0952" width="19.8607" height="19.8607" rx="9.93033" stroke="#ADD5F3" stroke-width="0.79823"/>
</g>
<path d="M203.089 37L155.379 72.0625L164.251 51.399L203.089 37Z" fill="#E17726" stroke="#E17726" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M93.04 37L140.325 72.3898L131.878 51.399L93.04 37Z" fill="#E27625" stroke="#E27625" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M121.401 85.7603L113.851 97.0738L140.749 98.2893L139.853 69.5381L121.401 85.7603Z" fill="#E27625" stroke="#E27625" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M174.728 85.7602L155.993 69.2107L155.379 98.2892L182.278 97.0737L174.728 85.7602Z" fill="#E27625" stroke="#E27625" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M138.249 111.987L124.752 108.06L134.285 103.712L138.249 111.987Z" fill="#233447" stroke="#233447" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M157.881 111.987L161.845 103.712L171.425 108.06L157.881 111.987Z" fill="#233447" stroke="#233447" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M182.278 97.0737L155.379 98.2892L157.881 111.987L161.845 103.712L171.424 108.06L182.278 97.0737Z" fill="#CC6228" stroke="#CC6228" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M124.752 108.06L134.285 103.712L138.249 111.987L140.75 98.2892L113.851 97.0737L124.752 108.06Z" fill="#CC6228" stroke="#CC6228" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M113.851 97.0737L125.13 118.906L124.752 108.06L113.851 97.0737Z" fill="#E27525" stroke="#E27525" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M171.424 108.06L170.999 118.906L182.278 97.0737L171.424 108.06Z" fill="#E27525" stroke="#E27525" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M140.75 98.2893L138.249 111.987L141.41 128.163L142.118 106.845L140.75 98.2893Z" fill="#E27525" stroke="#E27525" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M155.378 98.2893L154.057 106.798L154.718 128.163L157.88 111.987L155.378 98.2893Z" fill="#E27525" stroke="#E27525" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M157.881 111.987L154.719 128.163L156.984 129.752L171 118.906L171.425 108.06L157.881 111.987Z" fill="#F5841F" stroke="#F5841F" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M124.752 108.06L125.13 118.906L139.146 129.752L141.411 128.163L138.249 111.987L124.752 108.06Z" fill="#F5841F" stroke="#F5841F" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M205.118 74.3533L209.129 54.9988L203.089 37L156.983 70.8938L174.727 85.7603L199.786 93.0065L205.307 86.6018L202.9 84.872L206.723 81.4125L203.797 79.1685L207.619 76.27L205.118 74.3533Z" fill="#763E1A" stroke="#763E1A" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M87 54.9988L91.0584 74.3533L88.4629 76.27L92.3326 79.1685L89.4067 81.4125L93.2292 84.872L90.8225 86.6018L96.3438 93.0065L121.402 85.7603L139.146 70.8938L93.0404 37L87 54.9988Z" fill="#763E1A" stroke="#763E1A" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M199.785 93.0065L174.727 85.7603L182.278 97.0738L170.999 118.906L185.911 118.719H208.185L199.785 93.0065Z" fill="#F5841F" stroke="#F5841F" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M121.402 85.7603L96.344 93.0065L87.9912 118.719H110.218L125.13 118.906L113.852 97.0738L121.402 85.7603Z" fill="#F5841F" stroke="#F5841F" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M155.379 98.2894L156.983 70.8939L164.25 51.3992H131.877L139.145 70.8939L140.749 98.2894L141.363 106.891L141.41 128.163H154.718L154.765 106.891L155.379 98.2894Z" fill="#F5841F" stroke="#F5841F" stroke-width="1.62609" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<filter id="filter0_f_1357_4712" x="-552.83" y="-852.827" width="2545.64" height="2379.65" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="128" result="effect1_foregroundBlur_1357_4712"/>
</filter>
<linearGradient id="paint0_linear_1357_4712" x1="164" y1="0" x2="164" y2="136" gradientUnits="userSpaceOnUse">
<stop stop-color="#D2E9FF"/>
<stop offset="1" stop-color="#2F93DC"/>
</linearGradient>
<radialGradient id="paint1_radial_1357_4712" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(164.333 93.2925) rotate(117.841) scale(47.5298 101.454)">
<stop stop-color="white" stop-opacity="0"/>
<stop offset="1" stop-color="#EBEBEB"/>
</radialGradient>
<radialGradient id="paint2_radial_1357_4712" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(142.36 78.0473) rotate(117.841) scale(57.142 95.7796)">
<stop stop-color="white" stop-opacity="0"/>
<stop offset="1" stop-color="#EBEBEB"/>
</radialGradient>
<radialGradient id="paint3_radial_1357_4712" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(146.423 84.3947) rotate(60) scale(39.4193 118.811)">
<stop stop-color="white" stop-opacity="0"/>
<stop offset="1" stop-color="#EBEBEB"/>
</radialGradient>
<radialGradient id="paint4_radial_1357_4712" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(146.466 88.7731) rotate(83.6767) scale(27.6448 124.292)">
<stop stop-color="white" stop-opacity="0"/>
<stop offset="1" stop-color="#EBEBEB"/>
</radialGradient>
<clipPath id="clip0_1357_4712">
<rect width="296" height="114" rx="8" fill="white"/>
</clipPath>
<clipPath id="clip1_1357_4712">
<rect width="262.027" height="130.9" fill="white" transform="translate(11 5)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -5,6 +5,7 @@
* into numbers in only one place. This should make merge conflicts easier.
*/
export const NOTIFICATION_DROP_LEDGER_FIREFOX = 25;
export const NOTIFICATION_OPEN_BETA_SNAPS = 26;
export const UI_NOTIFICATIONS = {
1: {
@ -147,6 +148,14 @@ export const UI_NOTIFICATIONS = {
id: Number(NOTIFICATION_DROP_LEDGER_FIREFOX),
date: null,
},
[NOTIFICATION_OPEN_BETA_SNAPS]: {
id: Number(NOTIFICATION_OPEN_BETA_SNAPS),
date: null,
image: {
src: 'images/introducing-snaps.svg',
width: '100%',
},
},
};
export const getTranslatedUINotifications = (t, locale) => {
@ -395,5 +404,20 @@ export const getTranslatedUINotifications = (t, locale) => {
)
: '',
},
[NOTIFICATION_OPEN_BETA_SNAPS]: {
...UI_NOTIFICATIONS[NOTIFICATION_OPEN_BETA_SNAPS],
title: t('notificationsOpenBetaSnapsTitle'),
description: [
t('notificationsOpenBetaSnapsDescriptionOne'),
t('notificationsOpenBetaSnapsDescriptionTwo'),
t('notificationsOpenBetaSnapsDescriptionThree'),
],
actionText: t('notificationsOpenBetaSnapsActionText'),
date: UI_NOTIFICATIONS[NOTIFICATION_OPEN_BETA_SNAPS].date
? new Intl.DateTimeFormat(formattedLocale).format(
new Date(UI_NOTIFICATIONS[NOTIFICATION_OPEN_BETA_SNAPS].date),
)
: '',
},
};
};

View File

@ -18,6 +18,7 @@ import {
import { updateViewedNotifications } from '../../../store/actions';
import {
NOTIFICATION_DROP_LEDGER_FIREFOX,
NOTIFICATION_OPEN_BETA_SNAPS,
getTranslatedUINotifications,
} from '../../../../shared/notifications';
import { getSortedAnnouncementsToShow } from '../../../selectors';
@ -115,6 +116,15 @@ function getActionFunctionById(id, history) {
24: () => {
updateViewedNotifications({ 24: true });
},
[NOTIFICATION_DROP_LEDGER_FIREFOX]: () => {
updateViewedNotifications({ [NOTIFICATION_DROP_LEDGER_FIREFOX]: true });
},
[NOTIFICATION_OPEN_BETA_SNAPS]: () => {
updateViewedNotifications({ [NOTIFICATION_OPEN_BETA_SNAPS]: true });
global.platform.openTab({
url: 'https://metamask.io/snaps/',
});
},
};
return actionFunctions[id];
@ -400,6 +410,7 @@ export default function WhatsNewPopup({
24: renderFirstNotification,
// This syntax is unusual, but very helpful here. It's equivalent to `notificationRenderers[NOTIFICATION_DROP_LEDGER_FIREFOX] =`
[NOTIFICATION_DROP_LEDGER_FIREFOX]: renderFirstNotification,
[NOTIFICATION_OPEN_BETA_SNAPS]: renderFirstNotification,
};
return (

View File

@ -93,7 +93,10 @@ import {
hexToDecimal,
} from '../../shared/modules/conversion.utils';
import { BackgroundColor } from '../helpers/constants/design-system';
import { NOTIFICATION_DROP_LEDGER_FIREFOX } from '../../shared/notifications';
import {
NOTIFICATION_DROP_LEDGER_FIREFOX,
NOTIFICATION_OPEN_BETA_SNAPS,
} from '../../shared/notifications';
///: BEGIN:ONLY_INCLUDE_IN(snaps)
import { SNAPS_VIEW_ROUTE } from '../helpers/constants/routes';
import { getPermissionSubjects } from './permissions';
@ -1052,6 +1055,7 @@ function getAllowedAnnouncementIds(state) {
24: state.metamask.hadAdvancedGasFeesSetPriorToMigration92_3 === true,
// This syntax is unusual, but very helpful here. It's equivalent to `unnamedObject[NOTIFICATION_DROP_LEDGER_FIREFOX] =`
[NOTIFICATION_DROP_LEDGER_FIREFOX]: currentKeyringIsLedger && isFirefox,
[NOTIFICATION_OPEN_BETA_SNAPS]: true,
};
}