From 62058d5dfef959a9d329f957bc2d44345da52865 Mon Sep 17 00:00:00 2001 From: Anwarul Islam Date: Wed, 5 Apr 2023 21:56:42 +0600 Subject: [PATCH 1/2] fix: tabhead and scrolling issue (#2966) Co-authored-by: Andrew Bastin --- .../hoppscotch-common/src/components.d.ts | 3 +- .../hoppscotch-common/src/pages/index.vue | 34 ++++-- .../{.prettierrc.js => .prettierrc.cjs} | 0 packages/hoppscotch-ui/package.json | 1 + .../src/components/smart/Window.vue | 31 +++-- .../src/components/smart/Windows.vue | 109 +++++++++++++----- 6 files changed, 128 insertions(+), 50 deletions(-) rename packages/hoppscotch-ui/{.prettierrc.js => .prettierrc.cjs} (100%) diff --git a/packages/hoppscotch-common/src/components.d.ts b/packages/hoppscotch-common/src/components.d.ts index 9fc832795..4974d069b 100644 --- a/packages/hoppscotch-common/src/components.d.ts +++ b/packages/hoppscotch-common/src/components.d.ts @@ -16,7 +16,6 @@ declare module '@vue/runtime-core' { AppHeader: typeof import('./components/app/Header.vue')['default'] AppInterceptor: typeof import('./components/app/Interceptor.vue')['default'] AppLogo: typeof import('./components/app/Logo.vue')['default'] - AppNavigation: typeof import('./components/app/Navigation.vue')['default'] AppOptions: typeof import('./components/app/Options.vue')['default'] AppPaneLayout: typeof import('./components/app/PaneLayout.vue')['default'] AppPowerSearch: typeof import('./components/app/PowerSearch.vue')['default'] @@ -117,6 +116,7 @@ declare module '@vue/runtime-core' { HttpTests: typeof import('./components/http/Tests.vue')['default'] HttpURLEncodedParams: typeof import('./components/http/URLEncodedParams.vue')['default'] IconLucideArrowLeft: typeof import('~icons/lucide/arrow-left')['default'] + IconLucideBrush: typeof import('~icons/lucide/brush')['default'] IconLucideCheckCircle: typeof import('~icons/lucide/check-circle')['default'] IconLucideChevronRight: typeof import('~icons/lucide/chevron-right')['default'] IconLucideGlobe: typeof import('~icons/lucide/globe')['default'] @@ -125,6 +125,7 @@ declare module '@vue/runtime-core' { IconLucideInfo: typeof import('~icons/lucide/info')['default'] IconLucideLayers: typeof import('~icons/lucide/layers')['default'] IconLucideMinus: typeof import('~icons/lucide/minus')['default'] + IconLucideRss: typeof import('~icons/lucide/rss')['default'] IconLucideSearch: typeof import('~icons/lucide/search')['default'] IconLucideUser: typeof import('~icons/lucide/user')['default'] IconLucideUsers: typeof import('~icons/lucide/users')['default'] diff --git a/packages/hoppscotch-common/src/pages/index.vue b/packages/hoppscotch-common/src/pages/index.vue index b095878bc..954737ccd 100644 --- a/packages/hoppscotch-common/src/pages/index.vue +++ b/packages/hoppscotch-common/src/pages/index.vue @@ -16,19 +16,33 @@ :key="tab.id" :label="tab.document.request.name" :is-removable="tabs.length > 1" + :close-visibility="'hover'" > + (), + { + label: null, + info: null, + isRemovable: true, + closeVisibility: "always", + selected: false, + } +) const tabMeta = computed(() => ({ info: props.info, label: props.label, isRemovable: props.isRemovable, icon: slots.icon, - tabhead: slots.tabhead + suffix: slots.suffix, + tabhead: slots.tabhead, + closeVisibility: props.closeVisibility, })) const { diff --git a/packages/hoppscotch-ui/src/components/smart/Windows.vue b/packages/hoppscotch-ui/src/components/smart/Windows.vue index d15c4bbef..c22b5cedc 100644 --- a/packages/hoppscotch-ui/src/components/smart/Windows.vue +++ b/packages/hoppscotch-ui/src/components/smart/Windows.vue @@ -1,43 +1,95 @@