mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
More fixes (#8988)
* Links stay white on hover * Fixed task icon color * Disabled plus button when needed * Fixed difficulty color * Fixed task reward color * Updated create styles * Fixed group plan link * Fixed second group test modal * Added login incentives * Fixed group notification clear * Show baily correctly * Styled armoire notification * Fixed contributor achievement styles * Fixed death * Fixed drop styles * Fixed invited friend modal * Fixed joined challenge achievement style * Fixed joined guild style * Fixed level up styles * Updated low health styles * Fixed bailey styles * Updated quest completed * Added soem conditionals to hide modals * Added rebirth styles * Fixed rebirth enable styles * Fixed streak styles * Fixed testing modals * Fixed ultimate gear achievement * Fixed won challenge * Set user to welcomed if created on mobile * Removed old default tasks * Began adding more options to avatar * Added change class * Inbox to messages * Moved profile to menu * Added user modal for viewing a user and send message * Fixed conversations * Fixed lint * Fixed challenges sending to server * Added challenge progress view * Fixed group sync after pay * Fixed some group accepting features * Fixed initial chat loading * Fixed some exitence errors * Added user names to assigned * Added upgrade link * Began adding new payment flow * Added default tasks * Updated avatar styles * Updated tutorial styles * Rebuilt notifications and styles * Updated upload script * Fixed lint * Added default tasks back to mobile and added updated tests * More test fixes
This commit is contained in:
@@ -22,6 +22,7 @@ div
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import findIndex from 'lodash/findIndex';
|
||||
import { mapState } from 'client/libs/store';
|
||||
import approvalModal from './approvalModal';
|
||||
|
||||
@@ -37,10 +38,22 @@ export default {
|
||||
},
|
||||
message () {
|
||||
let assignedUsers = this.task.group.assignedUsers;
|
||||
let assignedUsersNames = [];
|
||||
let assignedUsersLength = assignedUsers.length;
|
||||
|
||||
// @TODO: Eh, I think we only ever display one user name
|
||||
if (this.group && this.group.members) {
|
||||
assignedUsers.forEach(userId => {
|
||||
let index = findIndex(this.group.members, (member) => {
|
||||
return member._id === userId;
|
||||
});
|
||||
let assignedMember = this.group.members[index];
|
||||
assignedUsersNames.push(assignedMember.profile.name);
|
||||
});
|
||||
}
|
||||
|
||||
if (assignedUsersLength === 1 && !this.userIsAssigned) {
|
||||
return `Assigned to ${assignedUsers}`;
|
||||
return `Assigned to ${assignedUsersNames[0]}`;
|
||||
} else if (assignedUsersLength > 1 && !this.userIsAssigned) {
|
||||
return `Assigned to ${assignedUsersLength} members`;
|
||||
} else if (assignedUsersLength > 1 && this.userIsAssigned) {
|
||||
|
||||
Reference in New Issue
Block a user