From: Dessalines Date: Fri, 20 Mar 2020 20:13:54 +0000 (-0400) Subject: Notification improvements. X-Git-Url: http://these/git/%7Burl.unwrap%28%29%7D?a=commitdiff_plain;h=522649d9d3c21c15cb00740fb8c86a51a64468a4;p=lemmy.git Notification improvements. - Adding a navbar notification icon for mobile. - Adding an in-app notification toast. To be improved later. - Fixes #607 --- 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} + + )} + + )}