chore: reformat messaging/index.vue

This commit is contained in:
cutestnekoaqua 2023-01-19 00:08:26 +01:00
parent b360a47310
commit bb5e3450a5

View file

@ -1,39 +1,43 @@
<template> <template>
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template> <template #header>
<MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs" />
</template>
<div> <div>
<MkSpacer :content-max="800"> <MkSpacer :content-max="800">
<swiper <swiper :modules="[Virtual]" :space-between="20" :virtual="true"
:modules="[Virtual]" :allow-touch-move="!(deviceKind === 'desktop' && !defaultStore.state.swipeOnDesktop)" @swiper="setSwiperRef"
:space-between="20" @slide-change="onSlideChange">
:virtual="true"
:allow-touch-move="!(deviceKind === 'desktop' && !defaultStore.state.swipeOnDesktop)"
@swiper="setSwiperRef"
@slide-change="onSlideChange"
>
<swiper-slide> <swiper-slide>
<div class="_content yweeujhr dms"> <div class="_content yweeujhr dms">
<MkButton primary class="start" @click="startUser"><i class="ph-plus-bold ph-lg"></i> {{ i18n.ts.startMessaging }}</MkButton> <MkButton primary class="start" @click="startUser"><i class="ph-plus-bold ph-lg"></i> {{
<MkPagination v-slot="{items}" :externalItemArray="messages" :pagination="dmsPagination"> i18n.ts.startMessaging
<MkChatPreview v-for="message in messages" :key="message.id" class="yweeujhr message _block" :message="message"/> }}</MkButton>
<MkPagination v-slot="{ items }" :externalItemArray="messages" :pagination="dmsPagination">
<MkChatPreview v-for="message in messages" :key="message.id" class="yweeujhr message _block"
:message="message" />
</MkPagination> </MkPagination>
</div> </div>
</swiper-slide> </swiper-slide>
<swiper-slide> <swiper-slide>
<div class="_content yweeujhr groups"> <div class="_content yweeujhr groups">
<div class="groupsbuttons"> <div class="groupsbuttons">
<MkButton primary class="start" :link="true" to="/my/groups"><i class="ph-user-circle-gear-bold ph-lg"></i> {{ i18n.ts.manageGroups }}</MkButton> <MkButton primary class="start" :link="true" to="/my/groups"><i
<MkButton primary class="start" @click="startGroup"><i class="ph-plus-bold ph-lg"></i> {{ i18n.ts.startMessaging }}</MkButton> class="ph-user-circle-gear-bold ph-lg"></i> {{ i18n.ts.manageGroups }}</MkButton>
<MkButton primary class="start" @click="startGroup"><i class="ph-plus-bold ph-lg"></i> {{
i18n.ts.startMessaging
}}</MkButton>
</div> </div>
<MkPagination v-slot="{items}" :externalItemArray="groupMessages" :pagination="groupsPagination"> <MkPagination v-slot="{ items }" :externalItemArray="groupMessages" :pagination="groupsPagination">
<MkChatPreview v-for="message in groupMessages" :key="message.id" class="yweeujhr message _block" :message="message"/> <MkChatPreview v-for="message in groupMessages" :key="message.id" class="yweeujhr message _block"
:message="message" />
</MkPagination> </MkPagination>
</div> </div>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
</MkSpacer> </MkSpacer>
</div> </div>
</MkStickyContainer> </MkStickyContainer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -206,17 +210,17 @@ onUnmounted(() => {
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.yweeujhr { .yweeujhr {
> .start { >.start {
margin: 0 auto var(--margin) auto; margin: 0 auto var(--margin) auto;
} }
> .groupsbuttons { >.groupsbuttons {
max-width: 100%; max-width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
} }
</style> </style>