From 2b2abd67a415d34a297d95b443baf297e3208377 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 22 Aug 2022 22:57:03 -0700 Subject: [PATCH] fix --- package.json | 2 +- packages/client/src/pages/timeline.vue | 71 ++------------------------ 2 files changed, 4 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index febfddeb8b..9c6a9d2e3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "12.118.1-calc.12.3", + "version": "12.118.1-calc.12.4", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/pages/timeline.vue b/packages/client/src/pages/timeline.vue index 335b46175b..e4300bc2e6 100644 --- a/packages/client/src/pages/timeline.vue +++ b/packages/client/src/pages/timeline.vue @@ -25,7 +25,7 @@ {{ i18n.ts.newNoteRecived }} -
+
- + import { defineAsyncComponent, computed, watch, ref } from 'vue'; +import { Virtual } from 'swiper'; import { Swiper, SwiperSlide } from 'swiper/vue'; import XTimeline from '@/components/timeline.vue'; import XPostForm from '@/components/post-form.vue'; @@ -287,72 +288,6 @@ definePageMetadata( : 'fas fa-home', })) ); - -/* if (isMobile.value) { - document.addEventListener('touchstart', handleTouchStart, false); - document.addEventListener('touchmove', handleTouchMove, false); - - let xDown = null; - let yDown = null; - - function getTouches(evt) { - return ( - evt.touches || evt.originalEvent.touches - ); - } - - function handleTouchStart(evt) { - const firstTouch = getTouches(evt)[0]; - xDown = firstTouch.clientX; - yDown = firstTouch.clientY; - } - - function handleTouchMove(evt) { - if (!xDown || !yDown) return; - - if (['INPUT', 'TEXTAREA', 'IMG', 'VIDEO', 'CANVAS'].includes(evt.target.tagName) || evt.target.attributes['contenteditable']) return; - - let xUp = evt.touches[0].clientX; - let yUp = evt.touches[0].clientY; - - let xDiff = xDown - xUp; - let yDiff = yDown - yUp; - - let next = 'home'; - let timelines = ['home']; - - if (isLocalTimelineAvailable) { - timelines.push('local'); - } - if (isRecommendedTimelineAvailable) { - timelines.push('recommended'); - } - if (isLocalTimelineAvailable) { - timelines.push('social'); - } - if (isGlobalTimelineAvailable) { - timelines.push('global'); - } - - if (Math.abs(xDiff) > Math.abs(yDiff)) { - if (xDiff < 0) { - console.log(Math.abs(xDiff)); - if (src === 'home') { - next = 'global'; - } - else { - next = timelines[(timelines.indexOf(src) - 1) % timelines.length]; - } - } else { - next = timelines[(timelines.indexOf(src) + 1) % timelines.length]; - } - saveSrc(next); - } - xDown = null; - yDown = null; - return; - } -} */