diff options
author | Dessalines <tyhou13@gmx.com> | 2019-12-29 15:39:48 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-12-29 15:39:48 -0500 |
commit | a4428528e30b18eb85596edf9c26bc8b6b7d11ee (patch) | |
tree | 450f5662ada20a7f66f809033d57fbc12dcc963d /ui/src/components/navbar.tsx | |
parent | 106aaf4f28ef34d68848f48e5673f955a04b6deb (diff) |
Adding user avatars / icons. Requires pictshare.
- Fixes #188
Diffstat (limited to 'ui/src/components/navbar.tsx')
-rw-r--r-- | ui/src/components/navbar.tsx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index 306dc74f..f1a98941 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -13,7 +13,7 @@ import { GetSiteResponse, Comment, } from '../interfaces'; -import { msgOp } from '../utils'; +import { msgOp, pictshareAvatarThumbnail } from '../utils'; import { version } from '../version'; import { i18n } from '../i18next'; import { T } from 'inferno-i18next'; @@ -151,7 +151,19 @@ export class Navbar extends Component<any, NavbarState> { class="nav-link" to={`/u/${UserService.Instance.user.username}`} > - {UserService.Instance.user.username} + <span> + {UserService.Instance.user.avatar && ( + <img + src={pictshareAvatarThumbnail( + UserService.Instance.user.avatar + )} + height="32" + width="32" + class="rounded-circle mr-2" + /> + )} + {UserService.Instance.user.username} + </span> </Link> </li> </> |