diff --git a/packages/hoppscotch-common/src/components.d.ts b/packages/hoppscotch-common/src/components.d.ts
index 380ed83be..7dc2e5caf 100644
--- a/packages/hoppscotch-common/src/components.d.ts
+++ b/packages/hoppscotch-common/src/components.d.ts
@@ -7,6 +7,7 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
+ AppActionHandler: typeof import('./components/app/ActionHandler.vue')['default']
AppAnnouncement: typeof import('./components/app/Announcement.vue')['default']
AppDeveloperOptions: typeof import('./components/app/DeveloperOptions.vue')['default']
AppFooter: typeof import('./components/app/Footer.vue')['default']
diff --git a/packages/hoppscotch-common/src/components/app/ActionHandler.vue b/packages/hoppscotch-common/src/components/app/ActionHandler.vue
new file mode 100644
index 000000000..6f1cfa547
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/app/ActionHandler.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
diff --git a/packages/hoppscotch-common/src/components/app/Footer.vue b/packages/hoppscotch-common/src/components/app/Footer.vue
index 76426a05d..d60e4bf05 100644
--- a/packages/hoppscotch-common/src/components/app/Footer.vue
+++ b/packages/hoppscotch-common/src/components/app/Footer.vue
@@ -71,7 +71,7 @@
:shortcut="['S']"
@click="
() => {
- showShortcuts = true
+ invokeAction('flyouts.keybinds.toggle')
hide()
}
"
@@ -122,7 +122,7 @@
:label="`${t('app.invite')}`"
@click="
() => {
- showShare = true
+ invokeAction('modals.share.toggle')
hide()
}
"
@@ -154,7 +154,7 @@
'app.shortcuts'
)} ${getSpecialKey()}K`"
:icon="IconZap"
- @click="showShortcuts = true"
+ @click="invokeAction('flyouts.keybinds.toggle')"
/>
-
-
-
@@ -218,7 +215,6 @@ import IconGithub from "~icons/lucide/github"
import IconTwitter from "~icons/lucide/twitter"
import IconUserPlus from "~icons/lucide/user-plus"
import IconLock from "~icons/lucide/lock"
-import { defineActionHandler } from "~/helpers/actions"
import { showChat } from "@modules/crisp"
import { useSetting } from "@composables/settings"
import { useI18n } from "@composables/i18n"
@@ -227,24 +223,10 @@ import { currentUser$ } from "~/helpers/fb/auth"
import { TippyComponent } from "vue-tippy"
import SmartItem from "@components/smart/Item.vue"
import { getPlatformSpecialKey as getSpecialKey } from "~/helpers/platformutils"
+import { invokeAction } from "@helpers/actions"
const t = useI18n()
-const showShortcuts = ref(false)
-const showShare = ref(false)
const showDeveloperOptions = ref(false)
-const showLogin = ref(false)
-
-defineActionHandler("flyouts.keybinds.toggle", () => {
- showShortcuts.value = !showShortcuts.value
-})
-
-defineActionHandler("modals.share.toggle", () => {
- showShare.value = !showShare.value
-})
-
-defineActionHandler("modals.login.toggle", () => {
- showLogin.value = !showLogin.value
-})
const EXPAND_NAVIGATION = useSetting("EXPAND_NAVIGATION")
const SIDEBAR = useSetting("SIDEBAR")
diff --git a/packages/hoppscotch-common/src/layouts/default.vue b/packages/hoppscotch-common/src/layouts/default.vue
index a40e3d69e..d63fccf0b 100644
--- a/packages/hoppscotch-common/src/layouts/default.vue
+++ b/packages/hoppscotch-common/src/layouts/default.vue
@@ -46,6 +46,7 @@
+