diff --git a/app/controllers/admin/content-report.js b/app/controllers/admin/content-report.js index 1fb071a..f15ad7f 100644 --- a/app/controllers/admin/content-report.js +++ b/app/controllers/admin/content-report.js @@ -23,7 +23,7 @@ class ContentReportController extends SiteController { const router = express.Router(); router.use(async (req, res, next) => { res.locals.currentView = 'admin'; - res.locals.adminView = 'host'; + res.locals.adminView = 'content-report'; return next(); }); diff --git a/app/services/user.js b/app/services/user.js index 83e9be4..ff5635f 100644 --- a/app/services/user.js +++ b/app/services/user.js @@ -303,7 +303,7 @@ class UserService { async getUserAccount (userId) { const user = await User .findById(userId) - .select('+email +flags +permissions') + .select('+email +flags +permissions +picture') .populate(this.populateUser) .lean(); if (!user) { diff --git a/app/views/admin/user/index.pug b/app/views/admin/user/index.pug index 5935971..096bd13 100644 --- a/app/views/admin/user/index.pug +++ b/app/views/admin/user/index.pug @@ -12,7 +12,7 @@ block content button(type="submit").uk-button.uk-button-secondary.uk-light Search .uk-overflow-auto - table.uk-table.uk-table-divider.uk-table-hover.uk-table-small.uk-table-justify + table.uk-table.uk-table-divider.uk-table-small.uk-table-justify thead th Username th Display Name diff --git a/app/views/comment/components/comment-review.pug b/app/views/comment/components/comment-review.pug index 0df8617..5237bd7 100644 --- a/app/views/comment/components/comment-review.pug +++ b/app/views/comment/components/comment-review.pug @@ -4,7 +4,10 @@ mixin renderCommentReview (comment) header.uk-comment-header div(uk-grid).uk-grid-medium.uk-flex-middle .uk-width-auto - img(src="/img/default-member.png").site-profile-picture.sb-small.uk-comment-avatar + if comment.author.picture.small + img(src= `/image/${comment.author.picture.small._id}`).site-profile-picture.sb-small.uk-comment-avatar + else + img(src="/img/default-member.png").site-profile-picture.sb-small.uk-comment-avatar .uk-width-expand h4.uk-comment-title.uk-margin-remove= comment.author.displayName || comment.author.username .uk-comment-meta= moment(comment.created).fromNow() diff --git a/app/views/comment/components/comment.pug b/app/views/comment/components/comment.pug index 8fe6fac..a229c38 100644 --- a/app/views/comment/components/comment.pug +++ b/app/views/comment/components/comment.pug @@ -4,7 +4,10 @@ mixin renderComment (comment) header.uk-comment-header div(uk-grid).uk-grid-medium.uk-flex-middle .uk-width-auto - img(src="/img/default-member.png").site-profile-picture.sb-small.uk-comment-avatar + if comment.author.picture.small + img(src= `/image/${comment.author.picture.small._id}`).site-profile-picture.sb-small.uk-comment-avatar + else + img(src="/img/default-member.png").site-profile-picture.sb-small.uk-comment-avatar .uk-width-expand h4.uk-comment-title.uk-margin-remove= comment.author.displayName || comment.author.username diff --git a/app/views/components/navbar.pug b/app/views/components/navbar.pug index 046c747..6ae2581 100644 --- a/app/views/components/navbar.pug +++ b/app/views/components/navbar.pug @@ -38,9 +38,9 @@ nav(uk-navbar).uk-navbar-container.uk-position-fixed.uk-position-top .uk-navbar-item if user div.no-select - if user.picture_url + if user.picture.small img( - src= user.picture_url, + src= `/image/${user.picture.small._id}`, title="Member Menu", ).site-profile-picture.sb-navbar else