From 4e8d6a551fe4ba9de0254e27b5f5f94cca63da74 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 19 Mar 2020 20:56:21 -0400 Subject: [PATCH 1/6] Adding score spacing, hiding user tags on thin screen. --- ui/src/components/comment-node.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 8809c5b7..d5d872f5 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -166,17 +166,17 @@ export class CommentNode extends Component { {this.isMod && ( -
  • +
  • {i18n.t('mod')}
  • )} {this.isAdmin && ( -
  • +
  • {i18n.t('admin')}
  • )} {this.isPostCreator && ( -
  • +
  • {i18n.t('creator')}
  • )} @@ -209,8 +209,7 @@ export class CommentNode extends Component { )} -
  • -
  • +
  • Date: Fri, 20 Mar 2020 16:13:54 -0400 Subject: [PATCH 2/6] Notification improvements. - Adding a navbar notification icon for mobile. - Adding an in-app notification toast. To be improved later. - Fixes #607 --- docs/src/about_goals.md | 2 ++ ui/.eslintrc.json | 1 + ui/src/components/navbar.tsx | 48 +++++++++++++++++++++++++++++------- ui/src/utils.ts | 24 +++++++++++++++++- 4 files changed, 65 insertions(+), 10 deletions(-) diff --git a/docs/src/about_goals.md b/docs/src/about_goals.md index 1463eeb0..0d666f4f 100644 --- a/docs/src/about_goals.md +++ b/docs/src/about_goals.md @@ -47,3 +47,5 @@ - https://docs.rs/activitypub/0.1.4/activitypub/ - [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) - [Activitypub main](https://www.w3.org/TR/activitypub/) +- [Federation.md](https://github.com/dariusk/gathio/blob/7fc93dbe9d4d99457a0e85c6c532112f415b7af2/FEDERATION.md) +- [Activitypub implementers guide](https://socialhub.activitypub.rocks/t/draft-guide-for-new-activitypub-implementers/479) diff --git a/ui/.eslintrc.json b/ui/.eslintrc.json index bee9e538..a4aecfa0 100644 --- a/ui/.eslintrc.json +++ b/ui/.eslintrc.json @@ -38,6 +38,7 @@ "inferno/no-direct-mutation-state": 0, "inferno/no-unknown-property": 0, "max-statements": 0, + "max-params": 0, "new-cap": 0, "no-console": 0, "no-duplicate-imports": 0, diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index ef3f8430..76930e3b 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -26,6 +26,8 @@ import { fetchLimit, isCommentType, toast, + messageToastify, + md, } from '../utils'; import { version } from '../version'; import { i18n } from '../i18next'; @@ -100,6 +102,22 @@ export class Navbar extends Component { {this.state.siteName} + {this.state.isLoggedIn && ( + + + + + {this.state.unreadCount > 0 && ( + + {this.state.unreadCount} + + )} + + )}
  • - {this.props.markable && this.linkBtn} {!this.state.showAdvanced ? (
  • @@ -555,7 +555,7 @@ export class PostListing extends Component { <>
  • @@ -555,7 +555,7 @@ export class PostListing extends Component { <>