From 80da790a3ca598c756ca5806f503dbc729338f3d Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Fri, 21 Apr 2023 20:08:43 +0530 Subject: [PATCH] chore: improve tabs scrollbar & unsaved request indicator (#3003) --- .../hoppscotch-common/src/pages/index.vue | 11 +++- .../src/components/smart/Windows.vue | 56 +++++++++++-------- 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/packages/hoppscotch-common/src/pages/index.vue b/packages/hoppscotch-common/src/pages/index.vue index cd215db30..7af39c2de 100644 --- a/packages/hoppscotch-common/src/pages/index.vue +++ b/packages/hoppscotch-common/src/pages/index.vue @@ -38,10 +38,15 @@ diff --git a/packages/hoppscotch-ui/src/components/smart/Windows.vue b/packages/hoppscotch-ui/src/components/smart/Windows.vue index f971d8c51..3e18776e8 100644 --- a/packages/hoppscotch-ui/src/components/smart/Windows.vue +++ b/packages/hoppscotch-ui/src/components/smart/Windows.vue @@ -8,7 +8,7 @@ ref="scrollContainer" >
@@ -50,7 +50,12 @@
- +
+ +
@@ -80,13 +85,13 @@ @@ -340,43 +345,48 @@ watch(thumbPosition, (newVal) => { @apply opacity-50; &.active { - @apply opacity-80; + @apply opacity-100; } } } } $slider-height: 4px; + .slider { - --thumb-width: 300px; - -webkit-appearance: none; - width: 100%; + --thumb-width: 0; + height: $slider-height; - background: transparent; - outline: none; - opacity: 0; - -webkit-transition: 0.2s; - transition: opacity 0.2s; + + @apply appearance-none; + @apply w-full; + @apply bg-transparent; + @apply outline-none; + @apply opacity-0; + @apply transition; &::-webkit-slider-thumb { - -webkit-appearance: none; - appearance: none; - min-width: 300px; + @apply appearance-none; + @apply min-w-0; + @apply bg-dividerDark; + @apply hover:bg-secondaryLight; + width: var(--thumb-width); height: $slider-height; - background: gray; - cursor: pointer; } + &::-moz-range-thumb { - min-width: 300px; + @apply appearance-none; + @apply min-w-0; + @apply bg-dividerDark; + @apply hover:bg-secondaryLight; + width: var(--thumb-width); height: $slider-height; - background: gray; - cursor: pointer; } } .group-tabs:hover .slider { - opacity: 0.8; + @apply opacity-100; }