mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 01:54:43 +03:00
link: remove trailing whitespace
This commit is contained in:
parent
4e4f005689
commit
e26d2537c7
@ -56,9 +56,9 @@ export class ChannelsSidebar extends Component {
|
||||
let activeClasses = (this.props.active === "channels") ? " " : "dn-s ";
|
||||
|
||||
let hiddenClasses = true;
|
||||
|
||||
|
||||
// probably a more concise way to write this
|
||||
|
||||
|
||||
if (this.props.popout) {
|
||||
hiddenClasses = false;
|
||||
} else {
|
||||
@ -73,10 +73,10 @@ export class ChannelsSidebar extends Component {
|
||||
: "dn")}>
|
||||
<a className="db dn-m dn-l dn-xl f8 pb3 pl3" href="/">⟵ Landscape</a>
|
||||
<div className="overflow-y-scroll h-100">
|
||||
<h2 className={`f8 f9-m f9-l f9-xl
|
||||
pt1 pt4-m pt4-l pt4-xl
|
||||
<h2 className={`f8 f9-m f9-l f9-xl
|
||||
pt1 pt4-m pt4-l pt4-xl
|
||||
pr4 pb3 pb2-m pb2-l pb2-xl
|
||||
pl3 pl4-m pl4-l pl4-xl
|
||||
pl3 pl4-m pl4-l pl4-xl
|
||||
black-s gray2 white-d c-default
|
||||
bb bn-m bn-l bn-xl b--gray4 mb2 mb0-m mb0-l mb0-xl`}>
|
||||
Your Collections
|
||||
|
@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
||||
import { CommentItem } from './comment-item';
|
||||
import { CommentsPagination } from './comments-pagination';
|
||||
|
||||
import { uxToHex } from '../../lib/util';
|
||||
import { uxToHex } from '../../lib/util';
|
||||
import { api } from '../../api';
|
||||
|
||||
export class Comments extends Component {
|
||||
@ -37,7 +37,7 @@ export class Comments extends Component {
|
||||
|
||||
render() {
|
||||
let props = this.props;
|
||||
|
||||
|
||||
let page = "page" + props.commentPage;
|
||||
|
||||
let commentsObj = !!props.comments
|
||||
@ -58,7 +58,7 @@ export class Comments extends Component {
|
||||
let commentObj = commentsPage[entry]
|
||||
let { ship, time, udon } = commentObj;
|
||||
|
||||
let members = !!props.members
|
||||
let members = !!props.members
|
||||
? props.members
|
||||
: {};
|
||||
|
||||
|
@ -46,7 +46,7 @@ export class LinkItem extends Component {
|
||||
}
|
||||
|
||||
let comments = props.comments + " comment" + ((props.comments === 1) ? "" : "s");
|
||||
|
||||
|
||||
return (
|
||||
<div className="w-100 pv3 flex">
|
||||
<Sigil
|
||||
@ -63,8 +63,8 @@ export class LinkItem extends Component {
|
||||
</p>
|
||||
</a>
|
||||
<div className="w-100 pt1">
|
||||
<span className={"f9 pr2 v-mid " + mono}>{(props.nickname)
|
||||
? props.nickname
|
||||
<span className={"f9 pr2 v-mid " + mono}>{(props.nickname)
|
||||
? props.nickname
|
||||
: "~" + props.ship}</span>
|
||||
<span className="f9 inter gray2 pr3 v-mid">{this.state.timeSinceLinkPost}</span>
|
||||
<Link to=
|
||||
|
@ -56,7 +56,7 @@ export class LinkSubmit extends Component {
|
||||
let activeClasses = (this.state.linkValid)
|
||||
? "green2 pointer"
|
||||
: "gray2";
|
||||
|
||||
|
||||
return (
|
||||
<div className="relative ba b--gray4 b--gray2-d br1 w-100 mb6">
|
||||
<textarea
|
||||
|
@ -18,7 +18,7 @@ export class LinkDetail extends Component {
|
||||
|
||||
this.setComment = this.setComment.bind(this);
|
||||
}
|
||||
|
||||
|
||||
componentDidMount() {
|
||||
// if we have no preloaded data, and we aren't expecting it, get it
|
||||
if (this.props.page != 0 && (!this.props.data || !this.props.data.url)) {
|
||||
@ -37,7 +37,7 @@ export class LinkDetail extends Component {
|
||||
this.setState({timeSinceLinkPost: this.getTimeSinceLinkPost()});
|
||||
}, 60000);
|
||||
}
|
||||
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
// if we came to this page *directly*,
|
||||
// load the comments -- DidMount will fail
|
||||
@ -72,10 +72,10 @@ export class LinkDetail extends Component {
|
||||
let url = this.props.data.url || "";
|
||||
|
||||
let request = api.postComment(
|
||||
this.props.path,
|
||||
url,
|
||||
this.state.comment,
|
||||
this.props.page,
|
||||
this.props.path,
|
||||
url,
|
||||
this.state.comment,
|
||||
this.props.page,
|
||||
this.props.link
|
||||
);
|
||||
|
||||
@ -87,7 +87,7 @@ export class LinkDetail extends Component {
|
||||
setComment(event) {
|
||||
this.setState({comment: event.target.value});
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
let props = this.props;
|
||||
let popout = (props.popout) ? "/popout" : "";
|
||||
@ -108,7 +108,7 @@ export class LinkDetail extends Component {
|
||||
let commentCount = props.data.commentCount || 0;
|
||||
|
||||
let comments = commentCount + " comment" + ((commentCount === 1) ? "" : "s");
|
||||
|
||||
|
||||
let nickname = !!props.members[props.data.ship]
|
||||
? props.members[props.data.ship].nickname
|
||||
: "";
|
||||
@ -122,18 +122,18 @@ export class LinkDetail extends Component {
|
||||
let activeClasses = (this.state.comment)
|
||||
? "black b--black pointer"
|
||||
: "gray2 b--gray2";
|
||||
|
||||
|
||||
return (
|
||||
<div className="h-100 w-100 overflow-hidden flex flex-column">
|
||||
<div
|
||||
className={`pl3 pt2 flex relative overflow-x-scroll
|
||||
className={`pl3 pt2 flex relative overflow-x-scroll
|
||||
overflow-x-auto-l overflow-x-auto-xl flex-shrink-0
|
||||
bb bn-m bn-l bn-xl b--gray4`}
|
||||
style={{ height: 48 }}>
|
||||
<SidebarSwitcher
|
||||
sidebarShown={props.sidebarShown}
|
||||
popout={props.popout}/>
|
||||
<Link
|
||||
<Link
|
||||
className="dib f8 fw4 v-top pt2 gray2"
|
||||
to={"/~link" + popout + props.path + "/" + props.page}>
|
||||
{"<- Collection index"}
|
||||
@ -160,8 +160,8 @@ export class LinkDetail extends Component {
|
||||
</p>
|
||||
</a>
|
||||
<div className="w-100 pt1">
|
||||
<span className={"f9 pr2 white-d v-mid " + nameClass}>{(nickname)
|
||||
? nickname
|
||||
<span className={"f9 pr2 white-d v-mid " + nameClass}>{(nickname)
|
||||
? nickname
|
||||
: "~" + ship}
|
||||
</span>
|
||||
<span className="f9 inter gray2 pr3 v-mid">
|
||||
@ -186,7 +186,7 @@ export class LinkDetail extends Component {
|
||||
onChange={this.setComment}
|
||||
value={this.state.comment}
|
||||
/>
|
||||
<button className={"f8 bg-gray0-d white-d ml2 absolute "
|
||||
<button className={"f8 bg-gray0-d white-d ml2 absolute "
|
||||
+ activeClasses}
|
||||
disabled={!this.state.comment}
|
||||
onClick={this.onClickPost.bind(this)}
|
||||
@ -197,11 +197,11 @@ export class LinkDetail extends Component {
|
||||
Post
|
||||
</button>
|
||||
</div>
|
||||
<Comments
|
||||
path={props.path}
|
||||
<Comments
|
||||
path={props.path}
|
||||
key={props.path + props.commentPage}
|
||||
comments={props.data.comments}
|
||||
commentPage={props.commentPage}
|
||||
comments={props.comments}
|
||||
commentPage={props.commentPage}
|
||||
members={props.members}
|
||||
popout={props.popout}
|
||||
url={props.data.url}
|
||||
@ -214,6 +214,5 @@ export class LinkDetail extends Component {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default LinkDetail;
|
||||
|
@ -92,7 +92,7 @@ export class Links extends Component {
|
||||
<Link to="/~link/">{"⟵ All Channels"}</Link>
|
||||
</div>
|
||||
<div
|
||||
className={`pl3 pt2 flex relative overflow-x-scroll
|
||||
className={`pl3 pt2 flex relative overflow-x-scroll
|
||||
overflow-x-auto-l overflow-x-auto-xl flex-shrink-0
|
||||
bb bn-m bn-l bn-xl b--gray4`}
|
||||
style={{ height: 48 }}>
|
||||
@ -101,7 +101,7 @@ export class Links extends Component {
|
||||
popout={props.popout}/>
|
||||
<Link to={`/~link` + popout + props.path} className="pt2">
|
||||
<h2
|
||||
className={`dib f8 fw4 v-top ` +
|
||||
className={`dib f8 fw4 v-top ` +
|
||||
(props.path.includes("/~/")
|
||||
? ""
|
||||
: "mono")}>
|
||||
|
@ -39,8 +39,8 @@ export class Root extends Component {
|
||||
<Route exact path="/~link"
|
||||
render={ (props) => {
|
||||
return (
|
||||
<Skeleton
|
||||
active="channels"
|
||||
<Skeleton
|
||||
active="channels"
|
||||
paths={paths}
|
||||
rightPanelHide={true}
|
||||
sidebarShown={true}
|
||||
@ -59,7 +59,7 @@ export class Root extends Component {
|
||||
render={ (props) => {
|
||||
// groups/contacts and link channels are the same thing in ver 1
|
||||
|
||||
let groupPath =
|
||||
let groupPath =
|
||||
`/${props.match.params.ship}/${props.match.params.channel}`;
|
||||
let groupMembers = paths[groupPath] || {};
|
||||
|
||||
@ -67,8 +67,8 @@ export class Root extends Component {
|
||||
|
||||
let popout = props.match.url.includes("/popout/");
|
||||
|
||||
let channelLinks = !!links[groupPath]
|
||||
? links[groupPath]
|
||||
let channelLinks = !!links[groupPath]
|
||||
? links[groupPath]
|
||||
: {};
|
||||
|
||||
return (
|
||||
@ -96,7 +96,7 @@ export class Root extends Component {
|
||||
/>
|
||||
<Route exact path="/~link/(popout)?/:ship/:channel/:page/:index/(comments)?/:commentpage?"
|
||||
render={ (props) => {
|
||||
let groupPath =
|
||||
let groupPath =
|
||||
`/${props.match.params.ship}/${props.match.params.channel}`;
|
||||
|
||||
let popout = props.match.url.includes("/popout/");
|
||||
|
@ -14,7 +14,7 @@ export class InitialReducer {
|
||||
state.groups[group] = new Set(data[group]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
data = _.get(json, 'link', false);
|
||||
if (data) {
|
||||
let name = Object.keys(data)[0];
|
||||
|
@ -46,6 +46,6 @@ export class PermissionUpdateReducer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user