Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated receive page, docs url and added UD icon in snap modal #1325

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/assets/PushSnaps/UDIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -115,6 +116,29 @@ const InstallMetamaskSnapModal = ({
</a>
</SnapInner>
</SnapContainer>
<SnapContainer>
<SnapInner>
<Logo
src={UDIcon}
alt="UD Icon"
/>
<SpanV2
fontSize="16px"
fontWeight="400"
color={theme.modalMessageColor}
>
Unstoppable Domains
</SpanV2>
</SnapInner>
<SnapInner>
<a href="https://apps.apple.com/nz/app/unstoppable-domains/id1544748602" target="_blank">
<AppstoreInstallBtn><Image src={AppleIcon} width="16px" height="20px" alt='App store' /></AppstoreInstallBtn>
</a>
<a href="https://play.google.com/store/apps/details?id=com.unstoppabledomains.manager&hl=en&gl=US" target="_blank">
<AppstoreInstallBtn><Image src={PlayStore} width="16px" height="20px" alt='Play store' /></AppstoreInstallBtn>
</a>
</SnapInner>
</SnapContainer>

<ItemHV2 gap='14px'>

Expand Down
2 changes: 1 addition & 1 deletion src/config/config-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
}

Expand Down
2 changes: 1 addition & 1 deletion src/config/config-localhost.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/config/config-prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/config/config-staging.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
}

Expand Down
16 changes: 11 additions & 5 deletions src/modules/receiveNotifs/MetamaskPushSnapModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -54,10 +58,12 @@ const MetamaskPushSnapModal = ({
>
Receive Notifications
</SpanV2>}
<Close
onClick={handleCloseModal}
style={{ cursor: 'pointer' }}
/>
{closeEnabled &&
<Close
onClick={handleCloseModal}
style={{ cursor: 'pointer' }}
/>
}
</ItemHV2>

{SnapState == 1 && <InstallMetamaskSnapModal setSnapState={setSnapState} setConfigure={setConfigure} configure={configure} />}
Expand Down
53 changes: 2 additions & 51 deletions src/modules/receiveNotifs/ReceiveNotifsModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Container>

{/* <MetamaskPushSnapModalComponent
InnerComponent={MetamaskPushSnapModal}
modalPadding='0px'
// InnerComponentProps={}
modalPosition={MODAL_POSITION.ON_PARENT}
/> */}



<ItemVV2 alignItems="stretch">
<ItemVV2 align="stretch" justify="flex-start" margin="0px 0px 40px 0px">
<H2>
<Span weight="400" size="32px" color={theme.color}>
Receive Notifications
</Span>
</H2>
<Span
color={theme.default.secondaryColor}
weight="400"
size="16px"
textTransform="none"
textAlign="center"
spacing="0.03em"
margin="0px 0px"
>
The following frontends enables receiving push alerts for your wallet. More coming soon!
</Span>
</ItemVV2>

<Item align="stretch" justify="flex-start" margin="0px 0px 20px 0px">
<Info />
</Item>

<MetamaskPushSnapModal onClose={() => {}} closeEnabled={false} />
</ItemVV2>
</Container>
);
Expand All @@ -91,21 +44,19 @@ 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};

@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});
}
`;

Expand Down
Loading