mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
chat: style fix -- collapse ternary operators
This commit is contained in:
parent
9eca995eeb
commit
15bc1da3ba
File diff suppressed because one or more lines are too long
@ -23,14 +23,11 @@ export class ChatTabBar extends Component {
|
||||
setColor = 'gray3';
|
||||
}
|
||||
|
||||
(props.location.pathname.includes('/popout'))
|
||||
? popout = "popout/"
|
||||
: popout = "";
|
||||
popout = props.location.pathname.includes("/popout")
|
||||
? "popout/" : "";
|
||||
|
||||
let hidePopoutIcon = (this.props.popout)
|
||||
? "dn-m dn-l dn-xl"
|
||||
: "dib-m dib-l dib-xl";
|
||||
|
||||
? "dn-m dn-l dn-xl" : "dib-m dib-l dib-xl";
|
||||
|
||||
return (
|
||||
<div className="dib pt2 flex-shrink-0 flex-grow-1">
|
||||
|
@ -14,8 +14,7 @@ export class HeaderBar extends Component {
|
||||
// : null;
|
||||
|
||||
let popout = window.location.href.includes("popout/")
|
||||
? "dn"
|
||||
: "dn db-m db-l db-xl";
|
||||
? "dn" : "dn db-m db-l db-xl";
|
||||
|
||||
let title = document.title === "Home" ? "" : document.title;
|
||||
|
||||
|
@ -82,8 +82,7 @@ export class Message extends Component {
|
||||
contents = (
|
||||
<div className={'embed-container mb2 w-100 w-75-l w-50-xl ' +
|
||||
((this.state.unfold === true)
|
||||
? "db"
|
||||
: "dn")}>
|
||||
? "db" : "dn")}>
|
||||
<iframe
|
||||
ref="iframe"
|
||||
width="560"
|
||||
@ -175,8 +174,7 @@ export class Message extends Component {
|
||||
size={24}
|
||||
color={((props.msg.author === window.ship)
|
||||
|| (props.msg.author.substr(1) === window.ship))
|
||||
? "#4330FC"
|
||||
: "#000000"}
|
||||
? "#4330FC" : "#000000"}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
|
@ -7,16 +7,13 @@ export class Skeleton extends Component {
|
||||
|
||||
// sidebar and chat panel conditional classes
|
||||
let sidebarHide = (!this.props.sidebarShown || this.props.popout)
|
||||
? "dn"
|
||||
: "";
|
||||
? "dn" : "";
|
||||
|
||||
let sidebarHideOnMobile = this.props.sidebarHideOnMobile
|
||||
? "dn-s"
|
||||
: "";
|
||||
? "dn-s" : "";
|
||||
|
||||
let chatHideOnMobile = this.props.chatHideonMobile
|
||||
? "dn-s"
|
||||
: "";
|
||||
? "dn-s" : "";
|
||||
|
||||
// mobile-specific navigation classes
|
||||
let mobileNavClasses = classnames({
|
||||
@ -27,12 +24,10 @@ export class Skeleton extends Component {
|
||||
|
||||
// popout switches out window chrome and borders
|
||||
let popoutWindow = this.props.popout
|
||||
? ""
|
||||
: "ph4-m ph4-l ph4-xl pb4-m pb4-l pb4-xl";
|
||||
? "" : "ph4-m ph4-l ph4-xl pb4-m pb4-l pb4-xl";
|
||||
|
||||
let popoutBorder = this.props.popout
|
||||
? ""
|
||||
: "ba-m ba-l ba-xl b--gray2 br1 ";
|
||||
? "" : "ba-m ba-l ba-xl b--gray2 br1 ";
|
||||
|
||||
return (
|
||||
// app outer skeleton
|
||||
|
Loading…
Reference in New Issue
Block a user