launch: fix hash color and mobile position
fixes
@@ -25,12 +25,38 @@ const ScrollbarLessBox = styled(Box)`
export default function LaunchApp(props) {
const [hashText, setHashText] = useState(props.baseHash);
+ const hashBox = (
+ <Box
+ position={["relative", "absolute"]}
+ fontFamily="mono"
+ left="0"
+ bottom="0"
+ color="scales.black20"
+ bg="white"
+ ml={3}
+ mb={3}
+ borderRadius={2}
+ fontSize={0}
+ p={2}
+ boxShadow="0 0 0px 1px inset"
+ cursor="pointer"
+ onClick={() => {
+ writeText(props.baseHash);
+ setHashText('copied');
+ setTimeout(() => {
+ setHashText(props.baseHash);
+ }, 2000);
+ }}
+ >
+ <Text color="gray">{hashText || props.baseHash}</Text>
+ </Box>
+ );
return (
<>
<Helmet defer={false}>
<title>{ props.notificationsCount ? `(${String(props.notificationsCount) }) `: '' }Landscape</title>
</Helmet>
- <ScrollbarLessBox height='100%' overflowY='scroll'>
+ <ScrollbarLessBox height='100%' overflowY='scroll' display="flex" flexDirection="column">
<Welcome firstTime={props.launch.firstTime} api={props.api} />
<Box
mx='2'
@@ -82,30 +108,9 @@ export default function LaunchApp(props) {
</ModalButton>
<Groups unreads={props.unreads} groups={props.groups} associations={props.associations} />
</Box>
+ <Box alignSelf="flex-start" display={["block", "none"]}>{hashBox}</Box>
</ScrollbarLessBox>
- <Box
- position="absolute"
- fontFamily="mono"
- left="0"
- bottom="0"
- color="gray"
- bg="white"
- ml={3}
- mb={3}
- borderRadius={2}
- fontSize={0}
- p={2}
- cursor="pointer"
- onClick={() => {
- writeText(props.baseHash);
- setHashText('copied');
- setTimeout(() => {
- setHashText(props.baseHash);
- }, 2000);
- }}
- >
- {hashText || props.baseHash}
- </Box>
+ <Box display={["none", "block"]}>{hashBox}</Box>
</>
);
}
