Support.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. defineProps<{
  74. show: Boolean
  75. }>()
  76. const emit = defineEmits<{
  77. (e: "hide-modal"): void
  78. }>()
  79. const chatWithUs = () => {
  80. showChat()
  81. hideModal()
  82. }
  83. const showShortcuts = () => {
  84. invokeAction("flyouts.keybinds.toggle")
  85. }
  86. const hideModal = () => {
  87. emit("hide-modal")
  88. }
  89. </script>