From 827f2157fa406c5ea349b3343fc95d49002160b7 Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Mon, 20 Dec 2021 00:22:31 +0530 Subject: [PATCH] feat: quick shortcut key for menu items --- .../assets/icons/user-minus.svg | 5 + .../hoppscotch-app/assets/icons/user-x.svg | 6 + .../hoppscotch-app/assets/scss/styles.scss | 9 +- .../hoppscotch-app/assets/scss/themes.scss | 2 +- .../hoppscotch-app/components/app/Footer.vue | 30 +++- .../hoppscotch-app/components/app/Header.vue | 52 ++++-- .../components/app/PowerSearchEntry.vue | 2 +- .../components/app/ShortcutsEntry.vue | 2 +- .../components/button/Primary.vue | 2 +- .../components/button/Secondary.vue | 2 +- .../collections/graphql/Collection.vue | 80 +++++---- .../components/collections/graphql/Folder.vue | 76 +++++---- .../collections/graphql/Request.vue | 92 ++++++----- .../components/collections/my/Collection.vue | 82 ++++++---- .../components/collections/my/Folder.vue | 86 ++++++---- .../components/collections/my/Request.vue | 104 +++++++----- .../collections/teams/Collection.vue | 85 +++++----- .../components/collections/teams/Folder.vue | 89 +++++----- .../components/collections/teams/Request.vue | 57 ++++--- .../components/environments/Environment.vue | 86 ++++++---- .../components/firebase/Logout.vue | 8 +- .../components/http/Request.vue | 152 ++++++++++-------- .../hoppscotch-app/components/smart/Item.vue | 13 ++ .../hoppscotch-app/components/teams/Edit.vue | 2 +- .../hoppscotch-app/components/teams/Team.vue | 92 +++++++---- 25 files changed, 749 insertions(+), 467 deletions(-) create mode 100644 packages/hoppscotch-app/assets/icons/user-minus.svg create mode 100644 packages/hoppscotch-app/assets/icons/user-x.svg diff --git a/packages/hoppscotch-app/assets/icons/user-minus.svg b/packages/hoppscotch-app/assets/icons/user-minus.svg new file mode 100644 index 000000000..934ad56ae --- /dev/null +++ b/packages/hoppscotch-app/assets/icons/user-minus.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/hoppscotch-app/assets/icons/user-x.svg b/packages/hoppscotch-app/assets/icons/user-x.svg new file mode 100644 index 000000000..39f26e4f0 --- /dev/null +++ b/packages/hoppscotch-app/assets/icons/user-x.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/hoppscotch-app/assets/scss/styles.scss b/packages/hoppscotch-app/assets/scss/styles.scss index 57f74006b..2fa853337 100644 --- a/packages/hoppscotch-app/assets/scss/styles.scss +++ b/packages/hoppscotch-app/assets/scss/styles.scss @@ -446,13 +446,14 @@ pre.ace_editor { } .shortcut-key { + @apply inline-flex; @apply font-sans; - @apply bg-dividerLight; + @apply font-medium; + @apply text-tiny; + @apply bg-divider; @apply rounded; @apply ml-2; - @apply py-1; - @apply px-2; - @apply inline-flex; + @apply px-1; } @media (max-width: 767px) { diff --git a/packages/hoppscotch-app/assets/scss/themes.scss b/packages/hoppscotch-app/assets/scss/themes.scss index 5e5c0dc8b..19bfffeef 100644 --- a/packages/hoppscotch-app/assets/scss/themes.scss +++ b/packages/hoppscotch-app/assets/scss/themes.scss @@ -28,7 +28,7 @@ --secondary-color: theme("colors.true-gray.500"); --secondary-light-color: theme("colors.true-gray.400"); --secondary-dark-color: theme("colors.true-gray.900"); - --divider-color: theme("colors.true-gray.200"); + --divider-color: theme("colors.gray.100"); --divider-light-color: theme("colors.true-gray.100"); --divider-dark-color: theme("colors.true-gray.300"); --error-color: theme("colors.yellow.100"); diff --git a/packages/hoppscotch-app/components/app/Footer.vue b/packages/hoppscotch-app/components/app/Footer.vue index 9fdc06d7e..b57b7ff41 100644 --- a/packages/hoppscotch-app/components/app/Footer.vue +++ b/packages/hoppscotch-app/components/app/Footer.vue @@ -31,6 +31,7 @@ trigger="click" theme="popover" arrow + :on-shown="() => $refs.tippyActions.focus()" > -
+
- +
{{ `${t("app.name")} ${t("app.version")}` }} diff --git a/packages/hoppscotch-app/components/app/Header.vue b/packages/hoppscotch-app/components/app/Header.vue index cfb25119d..2d4f19fd9 100644 --- a/packages/hoppscotch-app/components/app/Header.vue +++ b/packages/hoppscotch-app/components/app/Header.vue @@ -57,7 +57,14 @@ @click.native="showTeamsModal = true" /> - + - - - +
+ + + +
diff --git a/packages/hoppscotch-app/components/app/PowerSearchEntry.vue b/packages/hoppscotch-app/components/app/PowerSearchEntry.vue index 526e3dbf4..c510e39d7 100644 --- a/packages/hoppscotch-app/components/app/PowerSearchEntry.vue +++ b/packages/hoppscotch-app/components/app/PowerSearchEntry.vue @@ -1,6 +1,6 @@ @@ -116,6 +125,10 @@ export default defineComponent({ type: Boolean, default: false, }, + shortcut: { + type: Array, + default: () => [], + }, active: { type: Boolean, default: false, diff --git a/packages/hoppscotch-app/components/teams/Edit.vue b/packages/hoppscotch-app/components/teams/Edit.vue index 597d03d9f..9a54d1261 100644 --- a/packages/hoppscotch-app/components/teams/Edit.vue +++ b/packages/hoppscotch-app/components/teams/Edit.vue @@ -153,7 +153,7 @@ id="member" v-tippy="{ theme: 'tooltip' }" :title="t('action.remove')" - svg="trash" + svg="user-minus" color="red" @click.native="removeExistingTeamMember(member.userID)" /> diff --git a/packages/hoppscotch-app/components/teams/Team.vue b/packages/hoppscotch-app/components/teams/Team.vue index 93003f14c..cbbec0540 100644 --- a/packages/hoppscotch-app/components/teams/Team.vue +++ b/packages/hoppscotch-app/components/teams/Team.vue @@ -67,7 +67,14 @@ /> - + - - - + > + + + +