Support.vue 2.4 KB

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