From 2543791d93785c6466c5fefb55a7cf431b162e98 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 30 Nov 2023 16:12:50 +0530 Subject: [PATCH 1/3] Updated receive notif page to show snap modal content --- .../receiveNotifs/MetamaskPushSnapModal.tsx | 16 ++++-- .../receiveNotifs/ReceiveNotifsModule.tsx | 53 +------------------ 2 files changed, 13 insertions(+), 56 deletions(-) diff --git a/src/modules/receiveNotifs/MetamaskPushSnapModal.tsx b/src/modules/receiveNotifs/MetamaskPushSnapModal.tsx index 351d77d3af..2bfb7fdef9 100644 --- a/src/modules/receiveNotifs/MetamaskPushSnapModal.tsx +++ b/src/modules/receiveNotifs/MetamaskPushSnapModal.tsx @@ -17,7 +17,11 @@ import GLOBALS, { device, globalsMargin } from "config/Globals"; import { useLocation } from 'react-router-dom'; const MetamaskPushSnapModal = ({ - onClose + onClose, + closeEnabled = true +}: { + onClose: () => void, + closeEnabled?: boolean }) => { const theme = useTheme(); const location = useLocation(); @@ -54,10 +58,12 @@ const MetamaskPushSnapModal = ({ > Receive Notifications } - + {closeEnabled && + + } {SnapState == 1 && } diff --git a/src/modules/receiveNotifs/ReceiveNotifsModule.tsx b/src/modules/receiveNotifs/ReceiveNotifsModule.tsx index a4aaf38d00..0a51ca8d46 100644 --- a/src/modules/receiveNotifs/ReceiveNotifsModule.tsx +++ b/src/modules/receiveNotifs/ReceiveNotifsModule.tsx @@ -22,58 +22,11 @@ function ReceiveNotifsModule() { // get theme const theme = useTheme(); - //notification modal - // const { - // isModalOpen: isMetamaskPushSnapOpen, - // showModal: showMetamaskPushSnap, - // ModalComponent: MetamaskPushSnapModalComponent, - // } = useModalBlur(); - - // React.useEffect(()=>{ - // showMetamaskPushSnap(); - // },[]) - - // React.useEffect(()=>{ - // showMetamaskPushSnap(); - // },[]) - // Render return ( - - {/* */} - - - - -

- - Receive Notifications - -

- - The following frontends enables receiving push alerts for your wallet. More coming soon! - -
- - - - - + {}} closeEnabled={false} />
); @@ -91,7 +44,7 @@ const Container = styled(Section)` flex: initial; justify-content: center; max-width: 1200px; - width: calc(100% - ${globalsMargin.MINI_MODULES.DESKTOP.RIGHT} - ${globalsMargin.MINI_MODULES.DESKTOP.LEFT} - ${GLOBALS.ADJUSTMENTS.PADDING.BIG} - ${GLOBALS.ADJUSTMENTS.PADDING.BIG}); + width: auto; padding: ${GLOBALS.ADJUSTMENTS.PADDING.BIG}; position: relative; margin: ${GLOBALS.ADJUSTMENTS.MARGIN.MINI_MODULES.DESKTOP}; @@ -99,13 +52,11 @@ const Container = styled(Section)` @media ${device.laptop} { margin: ${GLOBALS.ADJUSTMENTS.MARGIN.MINI_MODULES.TABLET}; padding: ${GLOBALS.ADJUSTMENTS.PADDING.DEFAULT}; - width: calc(100% - ${globalsMargin.MINI_MODULES.TABLET.RIGHT} - ${globalsMargin.MINI_MODULES.TABLET.LEFT} - ${GLOBALS.ADJUSTMENTS.PADDING.DEFAULT} - ${GLOBALS.ADJUSTMENTS.PADDING.DEFAULT}); } @media ${device.mobileL} { margin: ${GLOBALS.ADJUSTMENTS.MARGIN.MINI_MODULES.MOBILE}; padding: ${GLOBALS.ADJUSTMENTS.PADDING.DEFAULT}; - width: calc(100% - ${globalsMargin.MINI_MODULES.MOBILE.RIGHT} - ${globalsMargin.MINI_MODULES.MOBILE.LEFT} - ${GLOBALS.ADJUSTMENTS.PADDING.DEFAULT} - ${GLOBALS.ADJUSTMENTS.PADDING.DEFAULT}); } `; From 61a209627c10134d6f5e92c7deab13fbf615b1d4 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 30 Nov 2023 16:13:08 +0530 Subject: [PATCH 2/3] Updated push docs URL --- src/config/config-dev.js | 2 +- src/config/config-localhost.js | 2 +- src/config/config-prod.js | 2 +- src/config/config-staging.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/config-dev.js b/src/config/config-dev.js index 441f88c1e5..184b83523c 100644 --- a/src/config/config-dev.js +++ b/src/config/config-dev.js @@ -70,7 +70,7 @@ export const config = { ios: 'https://discord.gg/pushprotocol', android: 'https://play.google.com/store/apps/details?gl=US&hl=en&id=io.epns.epnsstaging', extension: 'https://chrome.google.com/webstore/detail/epns-staging-protocol-alp/bjiennpmhdcandkpigcploafccldlakj', - howto: 'https://docs.epns.io', + howto: 'https://push.org/docs', }, } diff --git a/src/config/config-localhost.js b/src/config/config-localhost.js index a95046ba2f..6e92ccbc76 100644 --- a/src/config/config-localhost.js +++ b/src/config/config-localhost.js @@ -65,7 +65,7 @@ export const config = { ios: 'https://discord.gg/pushprotocol', android: 'https://play.google.com/store/apps/details?gl=US&hl=en&id=io.epns.epnsstaging', extension: 'https://chrome.google.com/webstore/detail/epns-staging-protocol-alp/bjiennpmhdcandkpigcploafccldlakj', - howto: 'https://docs.epns.io', + howto: 'https://push.org/docs', }, }; diff --git a/src/config/config-prod.js b/src/config/config-prod.js index 7403016e7f..050efab953 100644 --- a/src/config/config-prod.js +++ b/src/config/config-prod.js @@ -69,7 +69,7 @@ export const config = { ios: 'https://apps.apple.com/app/ethereum-push-service-epns/id1528614910', android: 'https://play.google.com/store/apps/details?id=io.epns.epns', extension: 'https://chrome.google.com/webstore/detail/epns-protocol-beta/lbdcbpaldalgiieffakjhiccoeebchmg', - howto: 'https://docs.epns.io', + howto: 'https://push.org/docs', }, }; diff --git a/src/config/config-staging.js b/src/config/config-staging.js index edadfcf376..2c797a01aa 100644 --- a/src/config/config-staging.js +++ b/src/config/config-staging.js @@ -71,7 +71,7 @@ export const config = { ios: 'https://discord.gg/pushprotocol', android: 'https://play.google.com/store/apps/details?gl=US&hl=en&id=io.epns.epnsstaging', extension: 'https://chrome.google.com/webstore/detail/epns-staging-protocol-alp/bjiennpmhdcandkpigcploafccldlakj', - howto: 'https://docs.epns.io', + howto: 'https://push.org/docs', }, } From cd61e49da2e541f7accb3b84002922e238d722cb Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 30 Nov 2023 16:14:27 +0530 Subject: [PATCH 3/3] Added UD icon in push snap modal --- src/assets/PushSnaps/UDIcon.svg | 4 ++++ .../MetamaskSnap/InstallMetamaskSnapModal.tsx | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/assets/PushSnaps/UDIcon.svg diff --git a/src/assets/PushSnaps/UDIcon.svg b/src/assets/PushSnaps/UDIcon.svg new file mode 100644 index 0000000000..6d2556e8f1 --- /dev/null +++ b/src/assets/PushSnaps/UDIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx b/src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx index d9d1d08de4..9af39d7238 100644 --- a/src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx +++ b/src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx @@ -11,6 +11,7 @@ import { Button } from 'components/SharedStyling'; import Metamask from 'assets/PushSnaps/metamasksnap.svg'; import PushIcon from 'assets/PushSnaps/PushIcon.svg'; import VersoIcon from 'assets/PushSnaps/VersoIcon.svg'; +import UDIcon from 'assets/PushSnaps/UDIcon.svg'; import AppStoreQRCode from 'assets/PushSnaps/AppStoreQRCode.svg'; import PlayStoreQRCode from 'assets/PushSnaps/PlayStoreQRCode.svg'; import AppleIcon from 'assets/PushSnaps/AppleIcon.svg'; @@ -115,6 +116,29 @@ const InstallMetamaskSnapModal = ({ + + + + + Unstoppable Domains + + + + + App store + + + Play store + + +