Fix remixes view on phones

This commit is contained in:
Justin Edmund 2023-01-28 18:52:10 -08:00
parent eb1f68e7b5
commit da09a739f6
2 changed files with 97 additions and 64 deletions

View file

@ -3,11 +3,6 @@
flex-direction: column; flex-direction: column;
margin: $unit-4x auto 0 auto; margin: $unit-4x auto 0 auto;
max-width: $grid-width; max-width: $grid-width;
padding-bottom: $unit-12x;
@include breakpoint(phone) {
padding: 0 $unit;
}
.PartyDetails { .PartyDetails {
display: none; display: none;
@ -16,6 +11,10 @@
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
@include breakpoint(phone) {
padding: 0 $unit;
}
&.Visible { &.Visible {
// margin-bottom: $unit-12x; // margin-bottom: $unit-12x;
} }
@ -147,6 +146,7 @@
} }
&.ReadOnly { &.ReadOnly {
box-sizing: border-box;
line-height: 1.4; line-height: 1.4;
white-space: pre-wrap; white-space: pre-wrap;
@ -259,6 +259,7 @@
.PartyInfo { .PartyInfo {
align-items: center; align-items: center;
box-sizing: border-box;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
gap: $unit; gap: $unit;
@ -267,6 +268,10 @@
max-width: $unit * 94; max-width: $unit * 94;
width: 100%; width: 100%;
@include breakpoint(phone) {
padding: 0 $unit;
}
.Left { .Left {
flex-grow: 1; flex-grow: 1;
@ -339,25 +344,50 @@
} }
} }
} }
}
.Remixes { .Remixes {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: $unit-2x; gap: $unit-2x;
width: 752px; width: 752px;
h3 { @include breakpoint(tablet) {
font-size: $font-medium; gap: $unit;
font-weight: $medium; width: 100%;
}
h3 {
font-size: $font-medium;
font-weight: $medium;
@include breakpoint(phone) {
padding: 0 $unit;
}
}
.GridRepCollection {
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
margin-left: $unit-2x * -1;
margin-right: $unit-2x * -1;
@include breakpoint(tablet) {
grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
} }
.GridRepCollection { @include breakpoint(phone) {
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-template-columns: 1fr;
margin-left: $unit-2x * -1; margin-left: $unit * -1;
margin-right: $unit-2x * -1; margin-right: $unit * -1;
max-width: inherit;
width: 100%;
}
.GridRep { .GridRep {
min-width: 200px; min-width: 200px;
@include breakpoint(phone) {
min-width: 360px;
} }
} }
} }

View file

@ -702,57 +702,60 @@ const PartyDetails = (props: Props) => {
} }
return ( return (
<section className="DetailsWrapper"> <>
<div className="PartyInfo"> <section className="DetailsWrapper">
<div className="Left"> <div className="PartyInfo">
<div className="Header"> <div className="Left">
<h1 className={name ? '' : 'empty'}> <div className="Header">
{name ? name : t('no_title')} <h1 className={name ? '' : 'empty'}>
</h1> {name ? name : t('no_title')}
{party.remix && party.sourceParty ? ( </h1>
<Tooltip content={t('tooltips.source')}> {party.remix && party.sourceParty ? (
<Button <Tooltip content={t('tooltips.source')}>
className="IconButton Blended" <Button
leftAccessoryIcon={<RemixIcon />} className="IconButton Blended"
onClick={() => goTo(party.sourceParty?.shortcode)} leftAccessoryIcon={<RemixIcon />}
/> onClick={() => goTo(party.sourceParty?.shortcode)}
</Tooltip> />
) : ( </Tooltip>
'' ) : (
)} ''
)}
</div>
<div className="attribution">
{renderUserBlock()}
{party.raid ? linkedRaidBlock(party.raid) : ''}
{party.created_at != '' ? (
<time
className="last-updated"
dateTime={new Date(party.created_at).toString()}
>
{formatTimeAgo(new Date(party.created_at), locale)}
</time>
) : (
''
)}
</div>
</div> </div>
<div className="attribution"> <div className="Right">
{renderUserBlock()} {party.editable ? (
{party.raid ? linkedRaidBlock(party.raid) : ''} <Button
{party.created_at != '' ? ( leftAccessoryIcon={<EditIcon />}
<time text={t('buttons.show_info')}
className="last-updated" onClick={toggleDetails}
dateTime={new Date(party.created_at).toString()} />
>
{formatTimeAgo(new Date(party.created_at), locale)}
</time>
) : ( ) : (
'' <div />
)} )}
</div> </div>
</div> </div>
<div className="Right"> {readOnly}
{party.editable ? ( {editable}
<Button
leftAccessoryIcon={<EditIcon />} {deleteAlert()}
text={t('buttons.show_info')} </section>
onClick={toggleDetails}
/>
) : (
<div />
)}
</div>
</div>
{readOnly}
{editable}
{remixes && remixes.length > 0 ? remixSection() : ''} {remixes && remixes.length > 0 ? remixSection() : ''}
{deleteAlert()} </>
</section>
) )
} }