api-client/packages/hoppscotch-common/src/components/app/Support.vue

119 lines
3.1 KiB
Vue
Raw Normal View History

2021-08-09 12:25:30 +00:00
<template>
<HoppSmartModal
2021-08-09 12:25:30 +00:00
v-if="show"
dialog
:title="t('support.title')"
2022-10-20 14:17:17 +00:00
styles="sm:max-w-md"
@close="emit('hide-modal')"
2021-08-09 12:25:30 +00:00
>
<template #body>
2021-08-10 08:16:42 +00:00
<div class="flex flex-col space-y-2">
<HoppSmartItem
:icon="IconBook"
:label="t('app.documentation')"
2021-08-19 17:08:50 +00:00
to="https://docs.hoppscotch.io"
:description="t('support.documentation')"
:info-icon="IconChevronRight"
2021-08-09 12:25:30 +00:00
active
blank
@click="hideModal()"
2021-08-09 12:25:30 +00:00
/>
<HoppSmartItem
:icon="IconZap"
:label="t('app.keyboard_shortcuts')"
:description="t('support.shortcuts')"
:info-icon="IconChevronRight"
2021-08-09 12:25:30 +00:00
active
@click="showShortcuts()"
2021-08-09 12:25:30 +00:00
/>
<HoppSmartItem
:icon="IconGift"
:label="t('app.whats_new')"
2021-08-20 09:38:54 +00:00
to="https://docs.hoppscotch.io/changelog"
:description="t('support.changelog')"
:info-icon="IconChevronRight"
2021-08-09 12:25:30 +00:00
active
blank
@click="hideModal()"
2021-08-09 12:25:30 +00:00
/>
<HoppSmartItem
:icon="IconMessageCircle"
:label="t('app.chat_with_us')"
:description="t('support.chat')"
:info-icon="IconChevronRight"
2021-08-09 12:25:30 +00:00
active
@click="chatWithUs()"
2021-08-09 12:25:30 +00:00
/>
<HoppSmartItem
:icon="IconGitHub"
:label="t('app.github')"
to="https://hoppscotch.io/github"
blank
:description="t('support.github')"
:info-icon="IconChevronRight"
active
@click="hideModal()"
/>
<HoppSmartItem
:icon="IconDiscord"
:label="t('app.join_discord_community')"
2021-08-10 08:16:42 +00:00
to="https://hoppscotch.io/discord"
blank
:description="t('support.community')"
:info-icon="IconChevronRight"
2021-08-10 08:16:42 +00:00
active
@click="hideModal()"
2021-08-10 08:16:42 +00:00
/>
<HoppSmartItem
:icon="IconTwitter"
:label="t('app.twitter')"
2021-08-28 15:18:13 +00:00
to="https://hoppscotch.io/twitter"
2021-08-09 12:25:30 +00:00
blank
:description="t('support.twitter')"
:info-icon="IconChevronRight"
2021-08-09 12:25:30 +00:00
active
@click="hideModal()"
2021-08-09 12:25:30 +00:00
/>
</div>
</template>
</HoppSmartModal>
2021-08-09 12:25:30 +00:00
</template>
2021-11-17 11:55:18 +00:00
<script setup lang="ts">
import IconTwitter from "~icons/brands/twitter"
import IconDiscord from "~icons/brands/discord"
import IconGitHub from "~icons/hopp/github"
import IconMessageCircle from "~icons/lucide/message-circle"
import IconGift from "~icons/lucide/gift"
import IconZap from "~icons/lucide/zap"
import IconBook from "~icons/lucide/book"
import IconChevronRight from "~icons/lucide/chevron-right"
import { invokeAction } from "@helpers/actions"
import { showChat } from "@modules/crisp"
import { useI18n } from "@composables/i18n"
const t = useI18n()
2021-08-09 12:25:30 +00:00
2021-11-17 11:55:18 +00:00
defineProps<{
show: boolean
2021-11-17 11:55:18 +00:00
}>()
const emit = defineEmits<{
(e: "hide-modal"): void
}>()
const chatWithUs = () => {
showChat()
hideModal()
}
const showShortcuts = () => {
invokeAction("flyouts.keybinds.toggle")
2021-11-21 14:10:15 +00:00
hideModal()
2021-11-17 11:55:18 +00:00
}
const hideModal = () => {
emit("hide-modal")
}
2021-08-09 12:25:30 +00:00
</script>