fix
This commit is contained in:
parent
c3b8ce2e57
commit
bf9077e1dc
|
@ -137,7 +137,7 @@
|
||||||
<MkLoading v-else-if="tab === 'clips' && clips.length > 0" />
|
<MkLoading v-else-if="tab === 'clips' && clips.length > 0" />
|
||||||
|
|
||||||
<MkReactedUsers
|
<MkReactedUsers
|
||||||
v-if="tab === 'reactions'"
|
v-if="tab === 'reactions' && reactionsCount > 0"
|
||||||
:note-id="appearNote.id"
|
:note-id="appearNote.id"
|
||||||
></MkReactedUsers>
|
></MkReactedUsers>
|
||||||
</div>
|
</div>
|
||||||
|
@ -253,7 +253,7 @@ let clips = $ref();
|
||||||
let renotes = $ref();
|
let renotes = $ref();
|
||||||
let isScrolling;
|
let isScrolling;
|
||||||
|
|
||||||
const reactionsCount = Object.values(props.note.reactions).reduce((x,y) => x + y);
|
const reactionsCount = Object.values(props.note.reactions).reduce((x,y) => x + y, 0);
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
r: () => reply(true),
|
r: () => reply(true),
|
||||||
|
|
|
@ -1,49 +1,39 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="note" class="_gaps reacted-users">
|
<div v-if="note" class="_gaps reacted-users">
|
||||||
<div v-if="reactions.length === 0" class="_fullinfo">
|
<div :class="$style.tabs">
|
||||||
<img
|
<button
|
||||||
src="/static-assets/badges/info.png"
|
v-for="reaction in reactions"
|
||||||
class="_ghost"
|
:key="reaction"
|
||||||
alt="Info"
|
:class="[
|
||||||
/>
|
$style.tab,
|
||||||
<div>{{ i18n.ts.nothing }}</div>
|
{ [$style.tabActive]: tab === reaction },
|
||||||
|
]"
|
||||||
|
class="_button"
|
||||||
|
@click="tab = reaction"
|
||||||
|
>
|
||||||
|
<MkReactionIcon
|
||||||
|
ref="reactionRef"
|
||||||
|
:reaction="
|
||||||
|
reaction
|
||||||
|
? reaction.replace(
|
||||||
|
/^:(\w+):$/,
|
||||||
|
':$1@.:'
|
||||||
|
)
|
||||||
|
: reaction
|
||||||
|
"
|
||||||
|
:custom-emojis="note.emojis"
|
||||||
|
/>
|
||||||
|
<span style="margin-left: 4px">{{
|
||||||
|
note.reactions[reaction]
|
||||||
|
}}</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<template v-else>
|
<MkUserCardMini
|
||||||
<div :class="$style.tabs">
|
v-for="user in users"
|
||||||
<button
|
:key="user.id"
|
||||||
v-for="reaction in reactions"
|
:user="user"
|
||||||
:key="reaction"
|
:with-chart="false"
|
||||||
:class="[
|
/>
|
||||||
$style.tab,
|
|
||||||
{ [$style.tabActive]: tab === reaction },
|
|
||||||
]"
|
|
||||||
class="_button"
|
|
||||||
@click="tab = reaction"
|
|
||||||
>
|
|
||||||
<MkReactionIcon
|
|
||||||
ref="reactionRef"
|
|
||||||
:reaction="
|
|
||||||
reaction
|
|
||||||
? reaction.replace(
|
|
||||||
/^:(\w+):$/,
|
|
||||||
':$1@.:'
|
|
||||||
)
|
|
||||||
: reaction
|
|
||||||
"
|
|
||||||
:custom-emojis="note.emojis"
|
|
||||||
/>
|
|
||||||
<span style="margin-left: 4px">{{
|
|
||||||
note.reactions[reaction]
|
|
||||||
}}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<MkUserCardMini
|
|
||||||
v-for="user in users"
|
|
||||||
:key="user.id"
|
|
||||||
:user="user"
|
|
||||||
:with-chart="false"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<MkLoading />
|
<MkLoading />
|
||||||
|
@ -55,7 +45,6 @@ import { onMounted, watch } from "vue";
|
||||||
import * as misskey from "calckey-js";
|
import * as misskey from "calckey-js";
|
||||||
import MkReactionIcon from "@/components/MkReactionIcon.vue";
|
import MkReactionIcon from "@/components/MkReactionIcon.vue";
|
||||||
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
||||||
import { userPage } from "@/filters/user";
|
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue