Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
refactor: pwa install prompt (#1932)
Andrew Bastin45e508fc3668
diff --git a/packages/hoppscotch-app/components/app/Header.vue b/packages/hoppscotch-app/components/app/Header.vueindex d8556738f..6ae5faccc 100644--- a/packages/hoppscotch-app/components/app/Header.vue+++ b/packages/hoppscotch-app/components/app/Header.vue@@ -128,7 +128,7 @@ const t = i18n.t.bind(i18n)* that can be called to show the user the installation* prompt.*/-const showInstallPrompt = ref<undefined | null>(null)+const showInstallPrompt = ref(() => Promise.resolve()) // Async no-op till it is initializedconst showSupport = ref(false)const showSearch = ref(false)@@ -156,9 +156,7 @@ onMounted(async () => {// Initializes the PWA code - checks if the app is installed,// etc.- // TODO: @liyasthomas, check this out (initializePwa is a () => Promise<void>)- await intializePwa()- showInstallPrompt.value = undefined+ showInstallPrompt.value = intializePwa()const cookiesAllowed = getLocalConfig("cookiesAllowed") === "yes"if (!cookiesAllowed) {