mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-19 21:10:19 +02:00
feat: add selected group to all profile pages
add new lang strings
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
"reputation": "Reputation",
|
||||
"lastpost": "Last post",
|
||||
"firstpost": "First post",
|
||||
"about": "About",
|
||||
|
||||
"read_more": "read more",
|
||||
"more": "More",
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
"followers": "Followers",
|
||||
"following": "Following",
|
||||
"blocks": "Blocks",
|
||||
"blocked-users": "Blocked users",
|
||||
"block_toggle": "Toggle Block",
|
||||
"block_user": "Block User",
|
||||
"unblock_user": "Unblock User",
|
||||
|
||||
@@ -78,6 +78,8 @@ helpers.getUserDataByUserSlug = async function (userslug, callerUID, query = {})
|
||||
userData.hasPrivateChat = results.hasPrivateChat;
|
||||
userData.showHidden = results.canEdit; // remove in v1.19.0
|
||||
userData.groups = Array.isArray(results.groups) && results.groups.length ? results.groups[0] : [];
|
||||
userData.selectedGroup = userData.groups.filter(group => group && userData.groupTitleArray.includes(group.name))
|
||||
.sort((a, b) => userData.groupTitleArray.indexOf(a.name) - userData.groupTitleArray.indexOf(b.name));
|
||||
userData.disableSignatures = meta.config.disableSignatures === 1;
|
||||
userData['reputation:disabled'] = meta.config['reputation:disabled'] === 1;
|
||||
userData['downvote:disabled'] = meta.config['downvote:disabled'] === 1;
|
||||
|
||||
@@ -61,9 +61,6 @@ profileController.get = async function (req, res, next) {
|
||||
|
||||
addMetaTags(res, userData);
|
||||
|
||||
userData.selectedGroup = userData.groups.filter(group => group && userData.groupTitleArray.includes(group.name))
|
||||
.sort((a, b) => userData.groupTitleArray.indexOf(a.name) - userData.groupTitleArray.indexOf(b.name));
|
||||
|
||||
res.render('account/profile', userData);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user