mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 11:27:31 -07:00
lol
This commit is contained in:
parent
8bb3f8dfec
commit
4455275a00
3 changed files with 49 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "calckey",
|
||||
"version": "12.118.1-calc.2-beta.2-rc.1",
|
||||
"version": "12.118.1-calc.2-beta.2-rc.2",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
<template>
|
||||
<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">
|
||||
<div v-if="tab === 'all' || tab === 'unread'">
|
||||
<XNotifications class="notifications" :include-types="includeTypes" :unread-only="unreadOnly"/>
|
||||
|
|
|
@ -36,13 +36,22 @@
|
|||
/>
|
||||
</div>
|
||||
<div v-else class="tl _block">
|
||||
<swiper :modules="[Pagination, Virtual]" :space-between="20" virtual>
|
||||
<swiper-slide>
|
||||
<swiper
|
||||
:modules="[Pagination, Virtual]"
|
||||
:space-between="20"
|
||||
:virtual="true"
|
||||
@swiper="setSwiperRef"
|
||||
>
|
||||
<swiper-slide
|
||||
v-for="index in timelines"
|
||||
:key="index"
|
||||
:virtual-index="index"
|
||||
>
|
||||
<XTimeline
|
||||
ref="tl"
|
||||
:key="src"
|
||||
:key="index"
|
||||
class="tl"
|
||||
:src="src"
|
||||
:src="index"
|
||||
:sound="true"
|
||||
@queue="queueUpdated"
|
||||
/>
|
||||
|
@ -70,6 +79,7 @@ import { definePageMetadata } from '@/scripts/page-metadata';
|
|||
import { deviceKind } from '@/scripts/device-kind';
|
||||
import 'swiper/scss';
|
||||
import 'swiper/scss/pagination';
|
||||
import 'swiper/css/virtual';
|
||||
|
||||
const XTutorial = defineAsyncComponent(() => import('./timeline.tutorial.vue'));
|
||||
|
||||
|
@ -86,7 +96,6 @@ const keymap = {
|
|||
t: focus,
|
||||
};
|
||||
|
||||
const DESKTOP_THRESHOLD = 1100;
|
||||
const MOBILE_THRESHOLD = 500;
|
||||
|
||||
// デスクトップでウィンドウを狭くしたときモバイルUIが表示されて欲しいことはあるので deviceKind === 'desktop' の判定は行わない
|
||||
|
@ -244,6 +253,32 @@ definePageMetadata(
|
|||
: '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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
Loading…
Reference in a new issue