Skip to content

Commit

Permalink
Fix channel view on smaller devices
Browse files Browse the repository at this point in the history
  • Loading branch information
ikprk committed May 18, 2024
1 parent c53b9c5 commit 25ea288
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/atlas/atlas.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ general:
pioneerMemberUrlPrefix: 'https://dao.joystream.org/#/members' # URL prefix for Pioneer member profile page - used to link to member details
joystreamLandingPageUrl: 'https://www.joystream.org' # URL for Joystream landing page - used in the footer and in "Learn more" links
joystreamDiscordUrl: 'https://discord.gg/DE9UN3YpRP' # URL for Joystream Discord - used for support when errors occur
appContentFocus: 'web3 & crypto' # Content focus of given app. Provide a string, for example `web & crypto` or `sport`
appContentFocus: '' # Content focus of given app. Provide a string, for example `web & crypto` or `sport`
crtMaintenanceMode: false
storage:
assetResponseTimeout: 2_000 # Timeout for asset response in ms - after this timeout, different distributor will be tried
Expand Down
8 changes: 7 additions & 1 deletion packages/atlas/src/components/ChannelTitle/ChannelTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ReactNode } from 'react'
import { SvgActionCreatorToken, SvgActionVerified } from '@/assets/icons'
import { Text, TextVariant } from '@/components/Text'
import { TextBaseProps } from '@/components/Text/Text.styles'
import { cVar } from '@/styles'
import { cVar, media } from '@/styles'

import { FlexBox } from '../FlexBox'

Expand Down Expand Up @@ -35,7 +35,13 @@ export const ChannelTitleText = styled(Text)`
`

const StyledFlexBox = styled(FlexBox)`
justify-content: center;
path {
fill: ${cVar('colorText')};
}
${media.sm} {
justify-content: start;
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { css } from '@emotion/react'
import styled from '@emotion/styled'

import { SvgJoyTokenMonochrome16 } from '@/assets/icons'
import { FlexBox } from '@/components/FlexBox'
import { Tabs } from '@/components/Tabs'
import { Text } from '@/components/Text'
import { Button } from '@/components/_buttons/Button'
Expand Down Expand Up @@ -32,6 +33,12 @@ export const TitleSection = styled.div`
}
`

export const FollowButtonWrapper = styled(FlexBox)`
> *:nth-child(1) {
width: 100%;
}
`

export const TitleContainer = styled.div`
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -110,6 +117,7 @@ export const StyledChannelLink = styled(ChannelLink)`
position: relative;
width: fit-content;
justify-self: start;
margin: 0 auto;
border: solid 8px ${cVar('colorCoreBaseBlack')};
border-radius: 100%;
${media.sm} {
Expand Down
6 changes: 3 additions & 3 deletions packages/atlas/src/views/viewer/ChannelView/ChannelView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { SvgActionCheck, SvgActionFilters, SvgActionFlag, SvgActionMore, SvgActi
import { ChannelTitle } from '@/components/ChannelTitle'
import { EmptyFallback } from '@/components/EmptyFallback'
import { FiltersBar, useFiltersBar } from '@/components/FiltersBar'
import { FlexBox } from '@/components/FlexBox'
import { LimitedWidthContainer } from '@/components/LimitedWidthContainer'
import { NumberFormat } from '@/components/NumberFormat'
import { ViewErrorFallback } from '@/components/ViewErrorFallback'
Expand Down Expand Up @@ -43,6 +42,7 @@ import {
ChannelInfoContainer,
CollectorsBoxContainer,
FilterButton,
FollowButtonWrapper,
NotFoundChannelContainer,
StyledButton,
StyledButtonContainer,
Expand Down Expand Up @@ -366,7 +366,7 @@ export const ChannelView: FC = () => {
)}
</StyledButtonContainer>
) : (
<FlexBox width="100%">
<FollowButtonWrapper width="100%">
<ProtectedActionWrapper
title="You want to follow this channel?"
description={`Sign in to follow ${channel?.title}`}
Expand All @@ -391,7 +391,7 @@ export const ChannelView: FC = () => {
]}
trigger={<Button icon={<SvgActionMore />} variant="tertiary" size="large" />}
/>
</FlexBox>
</FollowButtonWrapper>
)}

{channel?.id && (
Expand Down

0 comments on commit 25ea288

Please sign in to comment.