mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 11:57:34 -07:00
fix???
This commit is contained in:
parent
a0fc347e77
commit
3138324d38
3 changed files with 25 additions and 25 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.119.0-calc.8-rc.3",
|
"version": "12.119.0-calc.8-rc.4",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
)}`
|
)}`
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="message">
|
<div class="message _block">
|
||||||
<MkAvatar
|
<MkAvatar
|
||||||
class="avatar"
|
class="avatar"
|
||||||
:user="
|
:user="
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<div class="_content yweeujhr dms">
|
<div class="_content yweeujhr dms">
|
||||||
<MkButton primary class="start" @click="startUser"><i class="fas fa-plus"></i> {{ i18n.ts.startMessaging }}</MkButton>
|
<MkButton primary class="start" @click="startUser"><i class="fas fa-plus"></i> {{ i18n.ts.startMessaging }}</MkButton>
|
||||||
<MkPagination v-slot="{items}" :pagination="dmsPagination">
|
<MkPagination v-slot="{items}" :pagination="dmsPagination">
|
||||||
<MkChatPreview v-for="message in items" :key="message.id" class="_gap" :message="message"/>
|
<MkChatPreview v-for="message in items" :key="message.id" class="yweeujhr message _block" :message="message"/>
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
<div v-if="messages.length == 0" class="_fullinfo">
|
<div v-if="messages.length == 0" class="_fullinfo">
|
||||||
<img src="/static-assets/badges/info.png" class="_ghost" alt="Info"/>
|
<img src="/static-assets/badges/info.png" class="_ghost" alt="Info"/>
|
||||||
|
@ -24,10 +24,10 @@
|
||||||
</swiper-slide>
|
</swiper-slide>
|
||||||
<swiper-slide>
|
<swiper-slide>
|
||||||
<div class="_content yweeujhr groups">
|
<div class="_content yweeujhr groups">
|
||||||
|
<MkButton primary @click="startGroup"><i class="fas fa-plus"></i> {{ i18n.ts.startMessaging }}</MkButton>
|
||||||
|
<MkButton primary class="start" :to="`/my/groups`"><i class="fas fa-plus"></i> {{ i18n.ts.manageGroups }}</MkButton>
|
||||||
<MkPagination v-slot="{items}" :pagination="groupsPagination">
|
<MkPagination v-slot="{items}" :pagination="groupsPagination">
|
||||||
<MkButton primary @click="startGroup"><i class="fas fa-plus"></i> {{ i18n.ts.startMessaging }}</MkButton>
|
<MkChatPreview v-for="message in items" :key="message.id" class="yweeujhr message _block" :message="message"/>
|
||||||
<MkButton primary class="start" :to="`/my/groups`"><i class="fas fa-plus"></i> {{ i18n.ts.manageGroups }}</MkButton>
|
|
||||||
<MkChatPreview v-for="message in items" :key="message.id" class="_gap" :message="message"/>
|
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
</div>
|
</div>
|
||||||
</swiper-slide>
|
</swiper-slide>
|
||||||
|
@ -60,6 +60,10 @@ const router = useRouter();
|
||||||
let messages = $ref([]);
|
let messages = $ref([]);
|
||||||
let connection = $ref(null);
|
let connection = $ref(null);
|
||||||
|
|
||||||
|
const tabs = ['dms', 'groups'];
|
||||||
|
let tab = $ref(tabs[0]);
|
||||||
|
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
|
||||||
|
|
||||||
const dmsPagination = {
|
const dmsPagination = {
|
||||||
endpoint: 'messaging/history' as const,
|
endpoint: 'messaging/history' as const,
|
||||||
limit: 15,
|
limit: 15,
|
||||||
|
@ -75,10 +79,6 @@ const groupsPagination = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const tabs = ['dms', 'groups'];
|
|
||||||
let tab = $ref(tabs[0]);
|
|
||||||
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
|
|
||||||
|
|
||||||
const headerActions = $computed(() => []);
|
const headerActions = $computed(() => []);
|
||||||
|
|
||||||
const headerTabs = $computed(() => [{
|
const headerTabs = $computed(() => [{
|
||||||
|
@ -96,21 +96,6 @@ definePageMetadata({
|
||||||
icon: 'fas fa-comments',
|
icon: 'fas fa-comments',
|
||||||
});
|
});
|
||||||
|
|
||||||
let swiperRef = null;
|
|
||||||
|
|
||||||
function setSwiperRef(swiper) {
|
|
||||||
swiperRef = swiper;
|
|
||||||
syncSlide(tabs.indexOf(tab));
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSlideChange() {
|
|
||||||
tab = tabs[swiperRef.activeIndex];
|
|
||||||
}
|
|
||||||
|
|
||||||
function syncSlide(index) {
|
|
||||||
swiperRef.slideTo(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
function onMessage(message) {
|
function onMessage(message) {
|
||||||
if (message.recipientId) {
|
if (message.recipientId) {
|
||||||
messages = messages.filter(m => !(
|
messages = messages.filter(m => !(
|
||||||
|
@ -184,6 +169,21 @@ onUnmounted(() => {
|
||||||
if (connection) connection.dispose();
|
if (connection) connection.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let swiperRef = null;
|
||||||
|
|
||||||
|
function setSwiperRef(swiper) {
|
||||||
|
swiperRef = swiper;
|
||||||
|
syncSlide(tabs.indexOf(tab));
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSlideChange() {
|
||||||
|
tab = tabs[swiperRef.activeIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
function syncSlide(index) {
|
||||||
|
swiperRef.slideTo(index);
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in a new issue