Fixes to drawer and CWs

signup-info-prompt
kibi! 2018-01-14 15:31:00 -08:00
parent cd6674606f
commit b9f4896830
3 changed files with 16 additions and 50 deletions

View File

@ -73,14 +73,11 @@ class Drawer extends React.Component {
searchValue, searchValue,
submitted, submitted,
} = this.props; } = this.props;
const computedClass = classNames('drawer', `mbstobon-${elefriend}`);
let innerDrawerAttrs = {
className: classNames('drawer--inner', 'mbstobon-' + elefriend),
};
// The result. // The result.
return ( return (
<div className='drawer'> <div className={computedClass}>
{multiColumn ? ( {multiColumn ? (
<DrawerHeader <DrawerHeader
columns={columns} columns={columns}
@ -99,10 +96,8 @@ class Drawer extends React.Component {
/> />
<div className='contents'> <div className='contents'>
<DrawerAccount account={account} /> <DrawerAccount account={account} />
<div {...innerDrawerAttrs}> <Composer />
<Composer /> {multiColumn && <button className='mastodon' onClick={onClickElefriend} />}
{multiColumn && <button className='mastodon' onClick={onClickElefriend} />}
</div>
<DrawerResults <DrawerResults
results={results} results={results}
visible={submitted && !searchHidden} visible={submitted && !searchHidden}

View File

@ -40,7 +40,9 @@
.react-swipeable-view-container & { height: 100% } .react-swipeable-view-container & { height: 100% }
& > .contents { & > .contents {
display: flex;
position: relative; position: relative;
flex-direction: column;
padding: 0; padding: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -48,22 +50,8 @@
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
contain: strict; contain: strict;
}
.drawer--inner { & > .mastodon {
position: absolute;
top: 0;
left: 0;
box-sizing: border-box;
padding: 0;
display: flex;
flex-direction: column;
overflow: hidden;
overflow-y: auto;
width: 100%;
height: 100%;
.mastodon {
flex: 1; flex: 1;
border: none; border: none;
cursor: inherit; cursor: inherit;
@ -71,14 +59,14 @@
} }
@for $i from 0 through 3 { @for $i from 0 through 3 {
.drawer--inner.mbstobon-#{$i} { &.mbstobon-#{$i} > .contents {
@if $i == 3 { @if $i == 3 {
background: lighten($ui-base-color, 13%) url('~flavours/glitch/images/wave-drawer.png') no-repeat bottom / 100% auto; background: url('~flavours/glitch/images/wave-drawer.png') no-repeat bottom / 100% auto, lighten($ui-base-color, 13%);
} @else { } @else {
background: lighten($ui-base-color, 13%) url('~flavours/glitch/images/wave-drawer-glitched.png') no-repeat bottom / 100% auto; background: url('~flavours/glitch/images/wave-drawer-glitched.png') no-repeat bottom / 100% auto, lighten($ui-base-color, 13%);
} }
.mastodon { & > .mastodon {
background: url("~flavours/glitch/images/mbstobon-ui-#{$i}.png") no-repeat left bottom / contain; background: url("~flavours/glitch/images/mbstobon-ui-#{$i}.png") no-repeat left bottom / contain;
@if $i != 3 { @if $i != 3 {

View File

@ -12,21 +12,12 @@
word-wrap: break-word; word-wrap: break-word;
font-weight: 400; font-weight: 400;
overflow: visible; overflow: visible;
white-space: pre-wrap;
padding-top: 5px; padding-top: 5px;
&:focus { &:focus {
outline: 0; outline: 0;
} }
&.status__content--with-spoiler {
white-space: normal;
.status__content__text {
white-space: pre-wrap;
}
}
.emojione { .emojione {
width: 20px; width: 20px;
height: 20px; height: 20px;
@ -35,6 +26,7 @@
p { p {
margin-bottom: 20px; margin-bottom: 20px;
white-space: pre-wrap;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
@ -69,11 +61,10 @@
} }
.status__content__spoiler { .status__content__spoiler {
background: lighten($ui-base-color, 30%); display: none;
&:hover { &.status__content__spoiler--visible {
background: lighten($ui-base-color, 33%); display: block;
text-decoration: none;
} }
} }
@ -85,14 +76,6 @@
text-decoration: none; text-decoration: none;
} }
} }
.status__content__text {
display: none;
&.status__content__spoiler--visible {
display: block;
}
}
} }
.status__content__spoiler-link { .status__content__spoiler-link {