This commit is contained in:
ThatOneCalculator 2022-08-27 15:49:10 -07:00
parent 8bb3f8dfec
commit 4455275a00
3 changed files with 49 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "12.118.1-calc.2-beta.2-rc.1", "version": "12.118.1-calc.2-beta.2-rc.2",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -1,6 +1,13 @@
<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"
:display-my-avatar="true"
/>
</template>
<MkSpacer :content-max="800"> <MkSpacer :content-max="800">
<div v-if="tab === 'all' || tab === 'unread'"> <div v-if="tab === 'all' || tab === 'unread'">
<XNotifications class="notifications" :include-types="includeTypes" :unread-only="unreadOnly"/> <XNotifications class="notifications" :include-types="includeTypes" :unread-only="unreadOnly"/>

View file

@ -36,13 +36,22 @@
/> />
</div> </div>
<div v-else class="tl _block"> <div v-else class="tl _block">
<swiper :modules="[Pagination, Virtual]" :space-between="20" virtual> <swiper
<swiper-slide> :modules="[Pagination, Virtual]"
:space-between="20"
:virtual="true"
@swiper="setSwiperRef"
>
<swiper-slide
v-for="index in timelines"
:key="index"
:virtual-index="index"
>
<XTimeline <XTimeline
ref="tl" ref="tl"
:key="src" :key="index"
class="tl" class="tl"
:src="src" :src="index"
:sound="true" :sound="true"
@queue="queueUpdated" @queue="queueUpdated"
/> />
@ -70,6 +79,7 @@ import { definePageMetadata } from '@/scripts/page-metadata';
import { deviceKind } from '@/scripts/device-kind'; import { deviceKind } from '@/scripts/device-kind';
import 'swiper/scss'; import 'swiper/scss';
import 'swiper/scss/pagination'; import 'swiper/scss/pagination';
import 'swiper/css/virtual';
const XTutorial = defineAsyncComponent(() => import('./timeline.tutorial.vue')); const XTutorial = defineAsyncComponent(() => import('./timeline.tutorial.vue'));
@ -86,7 +96,6 @@ const keymap = {
t: focus, t: focus,
}; };
const DESKTOP_THRESHOLD = 1100;
const MOBILE_THRESHOLD = 500; const MOBILE_THRESHOLD = 500;
// UI deviceKind === 'desktop' // UI deviceKind === 'desktop'
@ -244,6 +253,32 @@ definePageMetadata(
: 'fas fa-home', : 'fas fa-home',
})), })),
); );
let timelines = ['home'];
if (isLocalTimelineAvailable) {
timelines.push('local');
}
if (isRecommendedTimelineAvailable) {
timelines.push('recommended');
}
if (isLocalTimelineAvailable) {
timelines.push('social');
}
if (isGlobalTimelineAvailable) {
timelines.push('global');
}
let swiperRef = null;
const setSwiperRef = (swiper) => {
swiperRef = swiper;
};
const slideTo = (index) => {
swiperRef.slideTo(index - 1, 0);
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>