lint, fix warnings

This commit is contained in:
Henry Jameson 2021-06-07 16:37:12 +03:00
parent b0ae32e309
commit aec05686d0
2 changed files with 28 additions and 7 deletions

View File

@ -1,12 +1,34 @@
<template> <template>
<span class="MentionLink"> <span class="MentionLink">
<a v-if="!user" v-html="content" href="url" class="original"/> <!-- eslint-disable vue/no-v-html -->
<span v-if="user" class="new" :style="style" :class="{ '-you': isYou }" > <a
<button class="button-unstyled short" @click.prevent="onClick"> v-if="!user"
href="url"
class="original"
v-html="content"
/>
<!-- eslint-enable vue/no-v-html -->
<span
v-if="user"
class="new"
:style="style"
:class="{ '-you': isYou }"
>
<button
class="button-unstyled short"
@click.prevent="onClick"
>
<!-- eslint-disable vue/no-v-html -->
<span class="shortName">@<span v-html="userName" /></span> <span v-if="isYou">(You)</span> <span class="shortName">@<span v-html="userName" /></span> <span v-if="isYou">(You)</span>
<!-- eslint-enable vue/no-v-html -->
</button> </button>
<span class="full" v-if="userName !== userNameFull"> <span
v-if="userName !== userNameFull"
class="full"
>
<!-- eslint-disable vue/no-v-html -->
@<span v-html="userNameFull" /> @<span v-html="userNameFull" />
<!-- eslint-enable vue/no-v-html -->
</span> </span>
</span> </span>
</span> </span>

View File

@ -169,10 +169,9 @@ const StatusContent = {
RichContent RichContent
}, },
mounted () { mounted () {
const { attentions } = this.status this.status.attentions.forEach(attn => {
attentions.forEach(attn => {
const { id } = attn const { id } = attn
this.$store.state.api.backendInteractor.fetchUserIfMissing(this.$store, id) this.$store.dispatch('fetchUserIfMissing', id)
}) })
}, },
methods: { methods: {