mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 05:17:39 -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",
|
"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",
|
||||||
|
|
|
@ -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"/>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue