| |
@@ -22,8 +22,24 @@
|
| |
}
|
| |
|
| |
render() {
|
| |
+ let Element, props;
|
| |
+ if (this.props.item.link) {
|
| |
+ Element = "a";
|
| |
+ props = {
|
| |
+ className: "list-group-item list-group-item-action d-flex",
|
| |
+ href: this.props.item.link,
|
| |
+ target: "_blank",
|
| |
+ };
|
| |
+ } else {
|
| |
+ Element = "div";
|
| |
+ props = {
|
| |
+ className: "list-group-item d-flex",
|
| |
+ };
|
| |
+ }
|
| |
return (
|
| |
- <div className="media py-3 px-2" id={this.props.item.id}>
|
| |
+ <Element {...props}
|
| |
+ id={this.props.item.id}
|
| |
+ >
|
| |
<Icon item={this.props.item} />
|
| |
<Markup
|
| |
{...this.props}
|
| |
@@ -37,12 +53,12 @@
|
| |
Object.keys(this.props.item.msg_ids).length > 1) &&
|
| |
<div className="mt-auto">
|
| |
<small>
|
| |
- <button className="btn btn-link" onClick={this.toggleDetails}>details</button>
|
| |
+ <button className="btn btn-link p-0" onClick={this.toggleDetails}>details</button>
|
| |
</small>
|
| |
</div>
|
| |
}
|
| |
</div>
|
| |
- </div>
|
| |
+ </Element>
|
| |
);
|
| |
}
|
| |
|
| |
this makes the feeds use the bootstrap list-groups,
and makes the whole feed item a link to the thing that
relates to the feed item. Other links will still work inside
the item, like username urls and buttons.
fixes #562