finish linting client
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
>
|
||||
<div
|
||||
v-for="result in searchResults"
|
||||
:key="result.username"
|
||||
class="autocomplete-results d-flex align-items-center"
|
||||
:class="{'hover-background': result.hover}"
|
||||
@click="select(result)"
|
||||
@@ -134,7 +135,11 @@ export default {
|
||||
this.currentSearch = this.currentSearch.substring(1, this.currentSearch.length); // eslint-disable-line vue/no-side-effects-in-computed-properties, max-len
|
||||
|
||||
return this.tmpSelections
|
||||
.filter(option => option.displayName.toLowerCase().indexOf(this.currentSearch.toLowerCase()) !== -1 || option.username && option.username.toLowerCase().indexOf(this.currentSearch.toLowerCase()) !== -1)
|
||||
.filter(option => { // eslint-disable-line arrow-body-style
|
||||
return option.displayName.toLowerCase().indexOf(this.currentSearch.toLowerCase()) !== -1
|
||||
|| (option.username
|
||||
&& option.username.toLowerCase().indexOf(this.currentSearch.toLowerCase()) !== -1);
|
||||
})
|
||||
.slice(0, 4);
|
||||
},
|
||||
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
<div>{{ $t('copyAsTodo') }}</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="(inbox || (user.flags.communityGuidelinesAccepted && msg.uuid !== 'system')) && (!isMessageReported || user.contributor.admin)"
|
||||
v-if="(inbox || (user.flags.communityGuidelinesAccepted && msg.uuid !== 'system'))
|
||||
&& (!isMessageReported || user.contributor.admin)"
|
||||
class="action d-flex align-items-center"
|
||||
@click="report(msg)"
|
||||
>
|
||||
@@ -273,7 +274,10 @@ export default {
|
||||
const messageText = message.text.toLowerCase();
|
||||
const displayName = user.profile.name;
|
||||
const username = user.auth.local && user.auth.local.username;
|
||||
const mentioned = max([messageText.indexOf(username.toLowerCase()), messageText.indexOf(displayName.toLowerCase())]);
|
||||
const mentioned = max([
|
||||
messageText.indexOf(username.toLowerCase()),
|
||||
messageText.indexOf(displayName.toLowerCase()),
|
||||
]);
|
||||
if (mentioned === -1) return message.highlight;
|
||||
|
||||
const escapedDisplayName = escapeRegExp(displayName);
|
||||
|
||||
@@ -30,18 +30,22 @@
|
||||
{{ $t('loading') }}
|
||||
</h2>
|
||||
</div>
|
||||
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
||||
<div
|
||||
v-for="(msg, index) in messages"
|
||||
v-for="msg in messages"
|
||||
v-if="chat && canViewFlag(msg)"
|
||||
:key="msg.id"
|
||||
:class="{row: inbox}"
|
||||
>
|
||||
<!-- eslint-enable vue/no-use-v-if-with-v-for -->
|
||||
<div
|
||||
v-if="user._id !== msg.uuid"
|
||||
class="d-flex"
|
||||
:class="{'flex-grow-1': inbox}"
|
||||
>
|
||||
<avatar
|
||||
v-if="msg.userStyles || (cachedProfileData[msg.uuid] && !cachedProfileData[msg.uuid].rejected)"
|
||||
v-if="msg.userStyles
|
||||
|| (cachedProfileData[msg.uuid] && !cachedProfileData[msg.uuid].rejected)"
|
||||
class="avatar-left"
|
||||
:member="msg.userStyles || cachedProfileData[msg.uuid]"
|
||||
:avatar-only="true"
|
||||
@@ -85,7 +89,8 @@
|
||||
/>
|
||||
</div>
|
||||
<avatar
|
||||
v-if="msg.userStyles || (cachedProfileData[msg.uuid] && !cachedProfileData[msg.uuid].rejected)"
|
||||
v-if="msg.userStyles
|
||||
|| (cachedProfileData[msg.uuid] && !cachedProfileData[msg.uuid].rejected)"
|
||||
:member="msg.userStyles || cachedProfileData[msg.uuid]"
|
||||
:avatar-only="true"
|
||||
:hide-class-badge="true"
|
||||
|
||||
Reference in New Issue
Block a user