@ -28,6 +28,7 @@ import { wrap } from 'flavours/glitch/util/redux_helpers';
const mapStateToProps = state => ( {
const mapStateToProps = state => ( {
account : state . getIn ( [ 'accounts' , me ] ) ,
account : state . getIn ( [ 'accounts' , me ] ) ,
columns : state . getIn ( [ 'settings' , 'columns' ] ) ,
columns : state . getIn ( [ 'settings' , 'columns' ] ) ,
elefriend : state . getIn ( [ 'compose' , 'elefriend' ] ) ,
results : state . getIn ( [ 'search' , 'results' ] ) ,
results : state . getIn ( [ 'search' , 'results' ] ) ,
searchHidden : state . getIn ( [ 'search' , 'hidden' ] ) ,
searchHidden : state . getIn ( [ 'search' , 'hidden' ] ) ,
searchValue : state . getIn ( [ 'search' , 'value' ] ) ,
searchValue : state . getIn ( [ 'search' , 'value' ] ) ,
@ -56,6 +57,7 @@ class Drawer extends React.Component {
const {
const {
account ,
account ,
columns ,
columns ,
elefriend ,
intl ,
intl ,
multiColumn ,
multiColumn ,
onChange ,
onChange ,
@ -69,10 +71,8 @@ class Drawer extends React.Component {
submitted ,
submitted ,
} = this . props ;
} = this . props ;
let choices = [ 'mbstobon-bg-1' , 'mbstobon-bg-2' , 'mbstobon-bg-3' ] ;
let elefriendAttrs = {
let glitchyFriendDecision = choices [ Math . floor ( Math . random ( ) * choices . length ) ] ;
className : classNames ( 'mastodon' , 'mbstobon-' + elefriend ) ,
let drawerAttrs = {
className : classNames ( 'contents' , glitchyFriendDecision )
} ;
} ;
// The result.
// The result.
@ -98,7 +98,7 @@ class Drawer extends React.Component {
< DrawerAccount account = { account } / >
< DrawerAccount account = { account } / >
< div className = 'drawer__inner' >
< div className = 'drawer__inner' >
< Composer / >
< Composer / >
{ multiColumn && < div className = "mastodon mbstobon-bg-1" / > }
{ multiColumn && < div { ... elefriendAttrs } / > }
< / d i v >
< / d i v >
< DrawerResults
< DrawerResults
results = { results }
results = { results }
@ -120,6 +120,7 @@ Drawer.propTypes = {
account : ImmutablePropTypes . map ,
account : ImmutablePropTypes . map ,
columns : ImmutablePropTypes . list ,
columns : ImmutablePropTypes . list ,
results : ImmutablePropTypes . map ,
results : ImmutablePropTypes . map ,
elefriend : PropTypes . number ,
searchHidden : PropTypes . bool ,
searchHidden : PropTypes . bool ,
searchValue : PropTypes . string ,
searchValue : PropTypes . string ,
submitted : PropTypes . bool ,
submitted : PropTypes . bool ,