Skip to content

Commit

Permalink
client-web: mobile layout improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
franzos committed Sep 5, 2023
1 parent 6666072 commit 32c30d5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
13 changes: 8 additions & 5 deletions client-web/src/components/event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,12 @@ export function Event({
<ModalHeader>Event</ModalHeader>
<ModalCloseButton />
<ModalBody overflowY="auto">
<pre>
<code>{JSON.stringify(event, null, 2)}</code>
</pre>
<Text>Relay: {eventRelayUrls[0]}</Text>
<Box m={4}>
<pre>
<code>{JSON.stringify(event, null, 2)}</code>
</pre>
</Box>
</ModalBody>
</ModalContent>
</Modal>
Expand Down Expand Up @@ -330,9 +333,10 @@ export function Event({
{showContent ? (
images &&
images.length > 0 && (
<Box className="image-container" marginBottom={4}>
<Box marginBottom={4}>
{images.map((i, index) => (
<Image
width={"100%"}
key={index}
src={i}
fallback={<Image src="/no-image.png" />}
Expand Down Expand Up @@ -369,7 +373,6 @@ export function Event({
<ActionButtons />

<Spacer />
<Text>{eventRelayUrls[0]}</Text>

<Button
size={"sm"}
Expand Down
6 changes: 3 additions & 3 deletions client-web/src/components/user-info.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
Flex,
Avatar,
Heading,
Spacer,
Button,
Box,
Image,
Text,
HStack,
} from "@chakra-ui/react";
import { Link } from "react-router-dom";
import { useNClient } from "../state/client";
Expand All @@ -33,7 +33,7 @@ export function UserInfo({
<Image src={banner} alt="banner" />
</Box>
)}
<Flex>
<HStack>
<Box mr="3">
<Link to={profileLink}>
<Avatar size="sm" src={picture} />
Expand Down Expand Up @@ -63,7 +63,7 @@ export function UserInfo({
{following ? "Unfollow" : "Follow"}
</Button>
)}
</Flex>
</HStack>
</>
);
}
2 changes: 1 addition & 1 deletion client-web/src/routes/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function WelcomeRoute() {
<Grid templateColumns={["1fr", "2fr 1fr"]} gap={20}>
<Box>
{connected ? (
<Box maxHeight="80vh" overflowY="auto">
<Box overflowY="auto">
<Events
userComponent={User}
view="welcome"
Expand Down
3 changes: 3 additions & 0 deletions client-web/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const config: ThemeConfig = {

const theme = extendTheme({
config,
breakpoints: {
sm: "500px",
},
});

export default theme;

0 comments on commit 32c30d5

Please sign in to comment.