Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

feat: add install extension buttons on interceptor menu

liyasthomas579c5e5b7866
diff --git a/packages/hoppscotch-app/components/app/Interceptor.vue b/packages/hoppscotch-app/components/app/Interceptor.vue
index bfa8013ee..f9979204c 100644
--- a/packages/hoppscotch-app/components/app/Interceptor.vue
+++ b/packages/hoppscotch-app/components/app/Interceptor.vue
@@ -13,6 +13,27 @@
:selected="interceptorSelection"
@change="toggleSettingKey"
/>
+ <div
+ v-if="interceptorSelection == 'EXTENSIONS_ENABLED' && !extensionVersion"
+ class="flex space-x-2"
+ >
+ <ButtonSecondary
+ to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
+ blank
+ svg="brands/chrome"
+ label="Chrome"
+ outline
+ class="!flex-1"
+ />
+ <ButtonSecondary
+ to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
+ blank
+ svg="brands/firefox"
+ label="Firefox"
+ outline
+ class="!flex-1"
+ />
+ </div>
</div>
</template>
diff --git a/packages/hoppscotch-app/pages/settings.vue b/packages/hoppscotch-app/pages/settings.vue
index f5da4c924..584d85b46 100644
--- a/packages/hoppscotch-app/pages/settings.vue
+++ b/packages/hoppscotch-app/pages/settings.vue
@@ -130,23 +130,23 @@
<div class="flex flex-col space-y-2 py-4">
<span>
<SmartItem
- to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
+ to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
blank
- svg="brands/firefox"
- label="Firefox"
- :info-icon="hasFirefoxExtInstalled ? 'check_circle' : ''"
- :active-info-icon="hasFirefoxExtInstalled"
+ svg="brands/chrome"
+ label="Chrome"
+ :info-icon="hasChromeExtInstalled ? 'check_circle' : ''"
+ :active-info-icon="hasChromeExtInstalled"
outline
/>
</span>
<span>
<SmartItem
- to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
+ to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
blank
- svg="brands/chrome"
- label="Chrome"
- :info-icon="hasChromeExtInstalled ? 'check_circle' : ''"
- :active-info-icon="hasChromeExtInstalled"
+ svg="brands/firefox"
+ label="Firefox"
+ :info-icon="hasFirefoxExtInstalled ? 'check_circle' : ''"
+ :active-info-icon="hasFirefoxExtInstalled"
outline
/>
</span>