From cf8b5975ac18d030c4586d09457ba814e7217531 Mon Sep 17 00:00:00 2001
From: Joel Jacob Stephen <70131076+JoelJacobStephen@users.noreply.github.com>
Date: Fri, 15 Dec 2023 17:08:57 +0530
Subject: [PATCH] refactor: improvements made to how banners are to be
dismissed (#3656)
---
packages/hoppscotch-common/src/components/app/Banner.vue | 2 +-
packages/hoppscotch-common/src/components/app/Header.vue | 3 ++-
packages/hoppscotch-common/src/services/banner.service.ts | 1 +
packages/hoppscotch-sh-admin/src/components.d.ts | 2 ++
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/packages/hoppscotch-common/src/components/app/Banner.vue b/packages/hoppscotch-common/src/components/app/Banner.vue
index 7086678d3..ce76bfe5b 100644
--- a/packages/hoppscotch-common/src/components/app/Banner.vue
+++ b/packages/hoppscotch-common/src/components/app/Banner.vue
@@ -14,7 +14,7 @@
diff --git a/packages/hoppscotch-common/src/components/app/Header.vue b/packages/hoppscotch-common/src/components/app/Header.vue
index dcb7c9278..088cb5879 100644
--- a/packages/hoppscotch-common/src/components/app/Header.vue
+++ b/packages/hoppscotch-common/src/components/app/Header.vue
@@ -214,7 +214,7 @@
@@ -295,6 +295,7 @@ const offlineBanner: BannerContent = {
text: (t) => t("helpers.offline"),
alternateText: (t) => t("helpers.offline_short"),
score: BANNER_PRIORITY_HIGH,
+ dismissible: true,
}
const network = reactive(useNetwork())
diff --git a/packages/hoppscotch-common/src/services/banner.service.ts b/packages/hoppscotch-common/src/services/banner.service.ts
index 644288ea0..3a148cfff 100644
--- a/packages/hoppscotch-common/src/services/banner.service.ts
+++ b/packages/hoppscotch-common/src/services/banner.service.ts
@@ -15,6 +15,7 @@ export type BannerContent = {
alternateText?: (t: ReturnType) => string
// Used to determine which banner should be displayed when multiple banners are present
score: number
+ dismissible?: boolean
}
export type Banner = {
diff --git a/packages/hoppscotch-sh-admin/src/components.d.ts b/packages/hoppscotch-sh-admin/src/components.d.ts
index 611eefbc8..b67970508 100644
--- a/packages/hoppscotch-sh-admin/src/components.d.ts
+++ b/packages/hoppscotch-sh-admin/src/components.d.ts
@@ -30,8 +30,10 @@ declare module '@vue/runtime-core' {
HoppSmartTable: typeof import('@hoppscotch/ui')['HoppSmartTable']
HoppSmartTabs: typeof import('@hoppscotch/ui')['HoppSmartTabs']
HoppSmartToggle: typeof import('@hoppscotch/ui')['HoppSmartToggle']
+ IconLucideArrowLeft: typeof import('~icons/lucide/arrow-left')['default']
IconLucideChevronDown: typeof import('~icons/lucide/chevron-down')['default']
IconLucideInbox: typeof import('~icons/lucide/inbox')['default']
+ IconLucideUser: typeof import('~icons/lucide/user')['default']
SettingsAuthProvider: typeof import('./components/settings/AuthProvider.vue')['default']
SettingsConfigurations: typeof import('./components/settings/Configurations.vue')['default']
SettingsReset: typeof import('./components/settings/Reset.vue')['default']