diff options
author | Dessalines <tyhou13@gmx.com> | 2020-03-20 16:53:54 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-03-20 16:55:59 -0400 |
commit | f76c3af557c88b382fba14c8ab19f64664dcda38 (patch) | |
tree | 77f76673068bd5250e2d78ad5cc6af1564595f31 /ui/src/components/inbox.tsx | |
parent | 522649d9d3c21c15cb00740fb8c86a51a64468a4 (diff) |
Adding clearer goto context.
- Adding context props.
- Making link / context the first selectable on user and inbox page.
- Making icons a little bigger.
- #609
Diffstat (limited to 'ui/src/components/inbox.tsx')
-rw-r--r-- | ui/src/components/inbox.tsx | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/ui/src/components/inbox.tsx b/ui/src/components/inbox.tsx index afd9bf95..fa6bd397 100644 --- a/ui/src/components/inbox.tsx +++ b/ui/src/components/inbox.tsx @@ -1,5 +1,4 @@ import { Component, linkEvent } from 'inferno'; -import { Link } from 'inferno-router'; import { Subscription } from 'rxjs'; import { retryWhen, delay, take } from 'rxjs/operators'; import { @@ -34,7 +33,6 @@ import { CommentNodes } from './comment-nodes'; import { PrivateMessage } from './private-message'; import { SortSelect } from './sort-select'; import { i18n } from '../i18next'; -import { T } from 'inferno-i18next'; enum UnreadOrAll { Unread, @@ -100,26 +98,19 @@ export class Inbox extends Component<any, InboxState> { } render() { - let user = UserService.Instance.user; return ( <div class="container"> <div class="row"> <div class="col-12"> - <h5 class="mb-0"> - <T - class="d-inline" - i18nKey="inbox_for" - interpolation={{ user: user.username }} - > - #<Link to={`/u/${user.username}`}>#</Link> - </T> + <h5 class="mb-1"> + {i18n.t('inbox')} <small> <a href={`/feeds/inbox/${UserService.Instance.auth}.xml`} target="_blank" title="RSS" > - <svg class="icon mx-2 text-muted small"> + <svg class="icon ml-2 text-muted small"> <use xlinkHref="#icon-rss">#</use> </svg> </a> @@ -196,7 +187,12 @@ export class Inbox extends Component<any, InboxState> { <div> {combined.map(i => isCommentType(i) ? ( - <CommentNodes nodes={[{ comment: i }]} noIndent markable /> + <CommentNodes + nodes={[{ comment: i }]} + noIndent + markable + showContext + /> ) : ( <PrivateMessage privateMessage={i} /> ) @@ -212,6 +208,7 @@ export class Inbox extends Component<any, InboxState> { nodes={commentsToFlatNodes(this.state.replies)} noIndent markable + showContext /> </div> ); @@ -221,7 +218,12 @@ export class Inbox extends Component<any, InboxState> { return ( <div> {this.state.mentions.map(mention => ( - <CommentNodes nodes={[{ comment: mention }]} noIndent markable /> + <CommentNodes + nodes={[{ comment: mention }]} + noIndent + markable + showContext + /> ))} </div> ); |