From aa8b4231e27d1c77755ee9788eca2b65b576b4a9 Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Mon, 9 Aug 2021 17:55:30 +0530 Subject: [PATCH] feat: share and support modals --- assets/icons/email.svg | 1 + assets/icons/facebook.svg | 1 + assets/icons/linkedin.svg | 1 + assets/icons/reddit.svg | 1 + assets/icons/twitter.svg | 2 +- assets/scss/styles.scss | 6 +- components/app/Footer.vue | 11 +++ components/app/Share.vue | 123 ++++++++++++++++++++++++++++ components/app/Shortcuts.vue | 14 +++- components/app/Sidenav.vue | 57 +++++++++++-- components/app/Support.vue | 86 +++++++++++++++++++ components/http/Body.vue | 1 + components/http/CodegenModal.vue | 1 + components/http/Request.vue | 1 + components/http/ResponseMeta.vue | 2 +- components/smart/ChangeLanguage.vue | 4 +- components/smart/FontSizePicker.vue | 1 + components/smart/Item.vue | 30 ++++++- components/smart/Modal.vue | 1 + helpers/actions.ts | 2 + helpers/keybindings.ts | 54 ++++++++++-- helpers/support.js | 4 + lang/en-US.json | 25 +++++- nuxt.config.js | 1 + pages/graphql.vue | 2 +- pages/settings.vue | 2 + plugins/crisp.js | 18 ++++ 27 files changed, 425 insertions(+), 27 deletions(-) create mode 100644 assets/icons/email.svg create mode 100644 assets/icons/facebook.svg create mode 100644 assets/icons/linkedin.svg create mode 100644 assets/icons/reddit.svg create mode 100644 components/app/Share.vue create mode 100644 components/app/Support.vue create mode 100644 helpers/support.js create mode 100644 plugins/crisp.js diff --git a/assets/icons/email.svg b/assets/icons/email.svg new file mode 100644 index 000000000..b17bcedd1 --- /dev/null +++ b/assets/icons/email.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/facebook.svg b/assets/icons/facebook.svg new file mode 100644 index 000000000..42bc1bac0 --- /dev/null +++ b/assets/icons/facebook.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/linkedin.svg b/assets/icons/linkedin.svg new file mode 100644 index 000000000..621e2f09b --- /dev/null +++ b/assets/icons/linkedin.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/reddit.svg b/assets/icons/reddit.svg new file mode 100644 index 000000000..96ddae1e0 --- /dev/null +++ b/assets/icons/reddit.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/twitter.svg b/assets/icons/twitter.svg index 06e576275..57887d3b7 100644 --- a/assets/icons/twitter.svg +++ b/assets/icons/twitter.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/scss/styles.scss b/assets/scss/styles.scss index 96da0afa8..0d729ea30 100644 --- a/assets/scss/styles.scss +++ b/assets/scss/styles.scss @@ -111,16 +111,14 @@ a { @apply py-1 px-2; @apply shadow; - font-size: var(--body-font-size); + font-size: 88%; line-height: var(--body-line-height); kbd { - @apply first:ml-2; - @apply last:-mr-1; @apply font-sans; @apply bg-secondaryDark; @apply text-primaryDark; - @apply rounded; + @apply rounded-sm; @apply px-1; @apply ml-1; } diff --git a/components/app/Footer.vue b/components/app/Footer.vue index 383b3bc6a..57f597229 100644 --- a/components/app/Footer.vue +++ b/components/app/Footer.vue @@ -58,6 +58,13 @@ blank @click.native="$refs.options.tippy().hide()" /> +
import { defineComponent, ref } from "@nuxtjs/composition-api" import { defineActionHandler } from "~/helpers/actions" +import { showChat } from "~/helpers/support" import { useSetting } from "~/newstore/settings" export default defineComponent({ @@ -149,6 +157,9 @@ export default defineComponent({ // fallback } }, + chatWithUs() { + showChat() + }, }, }) diff --git a/components/app/Share.vue b/components/app/Share.vue new file mode 100644 index 000000000..214059f0c --- /dev/null +++ b/components/app/Share.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/components/app/Shortcuts.vue b/components/app/Shortcuts.vue index a890945b5..8b669cc10 100644 --- a/components/app/Shortcuts.vue +++ b/components/app/Shortcuts.vue @@ -86,7 +86,19 @@ export default { shortcuts: [ { keys: ["?"], - label: this.$t("shortcut.show_all"), + label: this.$t("shortcut.general.help_menu"), + }, + { + keys: ["/"], + label: this.$t("shortcut.general.show_all"), + }, + { + keys: [getPlatformSpecialKey(), "K"], + label: this.$t("shortcut.general.command_menu"), + }, + { + keys: ["Esc"], + label: this.$t("shortcut.general.close_current_menu"), }, ], }, diff --git a/components/app/Sidenav.vue b/components/app/Sidenav.vue index add64ef20..6489fa821 100644 --- a/components/app/Sidenav.vue +++ b/components/app/Sidenav.vue @@ -1,7 +1,7 @@ -