Shortcuts.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <SmartModal v-if="show" @close="hideModal">
  3. <div slot="header">
  4. <div class="row-wrapper">
  5. <h3 class="title">{{ $t("shortcuts") }}</h3>
  6. <div>
  7. <button class="icon" @click="hideModal">
  8. <i class="material-icons">close</i>
  9. </button>
  10. </div>
  11. </div>
  12. </div>
  13. <div slot="body" class="flex flex-col">
  14. <div class="p-2">
  15. <div>
  16. <kbd>{{ getSpecialKey() }}</kbd>
  17. +
  18. <kbd>G</kbd>
  19. <label>{{ $t("send_request") }}</label>
  20. </div>
  21. <div>
  22. <kbd>{{ getSpecialKey() }}</kbd
  23. >+<kbd>S</kbd>
  24. <label>{{ $t("save_to_collections") }}</label>
  25. </div>
  26. <div>
  27. <kbd>{{ getSpecialKey() }}</kbd
  28. >+<kbd>K</kbd>
  29. <label>{{ $t("copy_request_link") }}</label>
  30. </div>
  31. <div>
  32. <kbd>{{ getSpecialKey() }}</kbd
  33. >+<kbd>I</kbd>
  34. <label>{{ $t("reset_request") }}</label>
  35. </div>
  36. </div>
  37. <hr />
  38. <div class="p-2">
  39. <div>
  40. <kbd>Alt</kbd>+<kbd>▲</kbd>
  41. <label>{{ $t("select_next_method") }}</label>
  42. </div>
  43. <div>
  44. <kbd>Alt</kbd>+<kbd>▼</kbd>
  45. <label>{{ $t("select_previous_method") }}</label>
  46. </div>
  47. </div>
  48. <hr />
  49. <div class="p-2">
  50. <div>
  51. <kbd>Alt</kbd>+<kbd>G</kbd>
  52. <label>{{ $t("select_get_method") }}</label>
  53. </div>
  54. <div>
  55. <kbd>Alt</kbd>+<kbd>H</kbd>
  56. <label>{{ $t("select_head_method") }}</label>
  57. </div>
  58. <div>
  59. <kbd>Alt</kbd>+<kbd>P</kbd>
  60. <label>{{ $t("select_post_method") }}</label>
  61. </div>
  62. <div>
  63. <kbd>Alt</kbd>+<kbd>U</kbd>
  64. <label>{{ $t("select_put_method") }}</label>
  65. </div>
  66. <div>
  67. <kbd>Alt</kbd>+<kbd>X</kbd>
  68. <label>{{ $t("select_delete_method") }}</label>
  69. </div>
  70. </div>
  71. </div>
  72. <div slot="footer"></div>
  73. </SmartModal>
  74. </template>
  75. <style scoped lang="scss">
  76. kbd {
  77. @apply inline-flex;
  78. @apply resize-none;
  79. @apply m-2;
  80. @apply rounded-lg;
  81. @apply py-2;
  82. @apply px-4;
  83. @apply text-sm;
  84. }
  85. </style>
  86. <script>
  87. import { getPlatformSpecialKey } from "~/helpers/platformutils"
  88. export default {
  89. props: {
  90. show: Boolean,
  91. },
  92. methods: {
  93. getSpecialKey: getPlatformSpecialKey,
  94. hideModal() {
  95. this.$emit("hide-modal")
  96. },
  97. },
  98. }
  99. </script>