api-client/components/app/Extensions.vue

64 lines
1.6 KiB
Vue
Raw Normal View History

2020-12-11 10:29:03 +00:00
<template>
<SmartModal v-if="show" @close="hideModal">
<template #header>
<h3 class="heading">{{ $t("extensions") }}</h3>
<div>
2021-07-03 13:14:58 +00:00
<ButtonSecondary icon="close" @click.native="hideModal" />
2020-12-11 10:29:03 +00:00
</div>
</template>
<template #body>
2021-07-17 17:40:28 +00:00
<div class="flex flex-col space-y-2 px-2">
<SmartItem
2021-07-03 13:14:58 +00:00
to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
blank
svg="firefox"
label="Firefox"
:info-icon="hasFirefoxExtInstalled ? 'check_circle' : ''"
2021-07-03 13:14:58 +00:00
/>
<SmartItem
2021-07-03 13:14:58 +00:00
to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
blank
svg="chrome"
label="Chrome"
:info-icon="hasChromeExtInstalled ? 'check_circle' : ''"
2021-07-03 13:14:58 +00:00
/>
2020-12-11 10:29:03 +00:00
</div>
</template>
<template #footer>
2021-07-17 17:40:28 +00:00
<div class="text-secondaryLight text-xs px-2">
{{ $t("extensions_info1") }}
</div>
</template>
</SmartModal>
2020-12-11 10:29:03 +00:00
</template>
<script>
import {
hasChromeExtensionInstalled,
hasFirefoxExtensionInstalled,
} from "~/helpers/strategies/ExtensionStrategy"
export default {
props: {
show: Boolean,
},
data() {
return {
hasChromeExtInstalled: hasChromeExtensionInstalled(),
hasFirefoxExtInstalled: hasFirefoxExtensionInstalled(),
}
},
2021-05-18 06:26:59 +00:00
watch: {
show() {
this.hasChromeExtInstalled = hasChromeExtensionInstalled()
this.hasFirefoxExtInstalled = hasFirefoxExtensionInstalled()
},
},
2020-12-11 10:29:03 +00:00
methods: {
hideModal() {
this.$emit("hide-modal")
},
},
}
</script>