From 6cfb42412cd2e5742b1659d7c50f8aa04f2eb749 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Thu, 20 Jan 2022 14:23:43 -0800 Subject: [PATCH] Uses useScroll instead of handling the scroll event myself (#1642) * Tries to use-scroll instead of scroll listener * Moves observer to scrollable content only * Fixes bugs --- assets/components.d.ts | 11 ++++++ assets/components/ScrollProgress.vue | 50 +++++++++++----------------- assets/components/ScrollableView.vue | 11 +++--- package.json | 3 +- pnpm-lock.yaml | 31 ++++++----------- 5 files changed, 49 insertions(+), 57 deletions(-) diff --git a/assets/components.d.ts b/assets/components.d.ts index 0357a388..436ac4a7 100644 --- a/assets/components.d.ts +++ b/assets/components.d.ts @@ -4,6 +4,8 @@ declare module 'vue' { export interface GlobalComponents { + CarbonCaretDown: typeof import('~icons/carbon/caret-down')['default'] + CilColumns: typeof import('~icons/cil/columns')['default'] ContainerStat: typeof import('./components/ContainerStat.vue')['default'] ContainerTitle: typeof import('./components/ContainerTitle.vue')['default'] FuzzySearchModal: typeof import('./components/FuzzySearchModal.vue')['default'] @@ -13,7 +15,16 @@ declare module 'vue' { LogEventSource: typeof import('./components/LogEventSource.vue')['default'] LogViewer: typeof import('./components/LogViewer.vue')['default'] LogViewerWithSource: typeof import('./components/LogViewerWithSource.vue')['default'] + MdiDotsVertical: typeof import('~icons/mdi/dots-vertical')['default'] + MdiLightChevronDoubleDown: typeof import('~icons/mdi-light/chevron-double-down')['default'] + MdiLightChevronLeft: typeof import('~icons/mdi-light/chevron-left')['default'] + MdiLightChevronRight: typeof import('~icons/mdi-light/chevron-right')['default'] + MdiLightCog: typeof import('~icons/mdi-light/cog')['default'] + MdiLightMagnify: typeof import('~icons/mdi-light/magnify')['default'] MobileMenu: typeof import('./components/MobileMenu.vue')['default'] + OcticonContainer24: typeof import('~icons/octicon/container24')['default'] + OcticonDownload24: typeof import('~icons/octicon/download24')['default'] + OcticonTrash24: typeof import('~icons/octicon/trash24')['default'] PastTime: typeof import('./components/PastTime.vue')['default'] RelativeTime: typeof import('./components/RelativeTime.vue')['default'] ScrollableView: typeof import('./components/ScrollableView.vue')['default'] diff --git a/assets/components/ScrollProgress.vue b/assets/components/ScrollProgress.vue index 90534662..6c5b088d 100644 --- a/assets/components/ScrollProgress.vue +++ b/assets/components/ScrollProgress.vue @@ -19,9 +19,9 @@