Support.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <SmartModal
  3. v-if="show"
  4. :title="t('support.title')"
  5. max-width="sm:max-w-md"
  6. @close="$emit('hide-modal')"
  7. >
  8. <template #body>
  9. <div class="flex flex-col space-y-2">
  10. <SmartItem
  11. svg="book"
  12. :label="t('app.documentation')"
  13. to="https://docs.hoppscotch.io"
  14. :description="t('support.documentation')"
  15. info-icon="chevron_right"
  16. active
  17. blank
  18. @click.native="hideModal()"
  19. />
  20. <SmartItem
  21. svg="zap"
  22. :label="t('app.keyboard_shortcuts')"
  23. :description="t('support.shortcuts')"
  24. info-icon="chevron_right"
  25. active
  26. @click.native="showShortcuts()"
  27. />
  28. <SmartItem
  29. svg="gift"
  30. :label="t('app.whats_new')"
  31. to="https://docs.hoppscotch.io/changelog"
  32. :description="t('support.changelog')"
  33. info-icon="chevron_right"
  34. active
  35. blank
  36. @click.native="hideModal()"
  37. />
  38. <SmartItem
  39. svg="message-circle"
  40. :label="t('app.chat_with_us')"
  41. :description="t('support.chat')"
  42. info-icon="chevron_right"
  43. active
  44. @click.native="chatWithUs()"
  45. />
  46. <SmartItem
  47. svg="brands/discord"
  48. :label="t('app.join_discord_community')"
  49. to="https://hoppscotch.io/discord"
  50. blank
  51. :description="t('support.community')"
  52. info-icon="chevron_right"
  53. active
  54. @click.native="hideModal()"
  55. />
  56. <SmartItem
  57. svg="brands/twitter"
  58. :label="t('app.twitter')"
  59. to="https://hoppscotch.io/twitter"
  60. blank
  61. :description="t('support.twitter')"
  62. info-icon="chevron_right"
  63. active
  64. @click.native="hideModal()"
  65. />
  66. </div>
  67. </template>
  68. </SmartModal>
  69. </template>
  70. <script setup lang="ts">
  71. import { invokeAction } from "~/helpers/actions"
  72. import { showChat } from "~/helpers/support"
  73. import { useI18n } from "~/helpers/utils/composables"
  74. const t = useI18n()
  75. defineProps<{
  76. show: Boolean
  77. }>()
  78. const emit = defineEmits<{
  79. (e: "hide-modal"): void
  80. }>()
  81. const chatWithUs = () => {
  82. showChat()
  83. hideModal()
  84. }
  85. const showShortcuts = () => {
  86. invokeAction("flyouts.keybinds.toggle")
  87. hideModal()
  88. }
  89. const hideModal = () => {
  90. emit("hide-modal")
  91. }
  92. </script>