This commit is contained in:
ThatOneCalculator 2022-11-04 15:20:15 -07:00
parent 6571ac12c8
commit f369b0cf64
2 changed files with 146 additions and 152 deletions

View file

@ -1,6 +1,6 @@
{
"name": "calckey",
"version": "12.119.0-calc.7-rc.3",
"version": "12.119.0-calc.7-rc.4",
"codename": "aqua",
"repository": {
"type": "git",

View file

@ -6,13 +6,14 @@
<MkButton primary class="start" @click="start"><i class="fas fa-plus"></i> {{ i18n.ts.startMessaging }}</MkButton>
<div v-if="messages.length > 0" class="history">
<!-- <MkPagination v-slot="{items}" ref="list" :pagination="pagination"> -->
<MkA
v-for="message in items"
v-for="(message, i) in messages"
:key="message.id"
v-anim="i"
class="message _block"
:class="{ isMe: isMe(message), isRead: message.groupId ? message.reads.includes($i?.id) : message.isRead }"
:class="{ isMe: isMe(message), isRead: message.groupId ? message.reads.includes($i.id) : message.isRead }"
:to="message.groupId ? `/my/messaging/group/${message.groupId}` : `/my/messaging/${getAcct(isMe(message) ? message.recipient : message.user)}`"
:data-index="i"
>
<div>
<MkAvatar class="avatar" :user="message.groupId ? message.user : isMe(message) ? message.recipient : message.user" :show-indicator="true"/>
@ -21,9 +22,7 @@
<MkTime :time="message.createdAt" class="time"/>
</header>
<header v-else>
<span class="name">
<MkUserName :user="isMe(message) ? message.recipient : message.user"/>
</span>
<span class="name"><MkUserName :user="isMe(message) ? message.recipient : message.user"/></span>
<span class="username">@{{ acct(isMe(message) ? message.recipient : message.user) }}</span>
<MkTime :time="message.createdAt" class="time"/>
</header>
@ -36,7 +35,6 @@
</div>
</div>
</MkA>
<!-- </MkPagination> -->
</div>
<div v-if="!fetching && messages.length == 0" class="_fullinfo">
<img src="/static-assets/badges/info.png" class="_ghost" alt="Info"/>
@ -69,10 +67,6 @@ let connection = $ref(null);
const getAcct = Acct.toString;
const props = defineProps<{
pagination: any;
}>();
function isMe(message) {
return message.userId === $i.id;
}