refactor: remove shortcut hints in mobile devices
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
trigger="click"
|
||||
theme="popover"
|
||||
arrow
|
||||
:on-shown="() => $refs.tippyActions.focus()"
|
||||
:on-shown="() => tippyActions.focus()"
|
||||
>
|
||||
<template #trigger>
|
||||
<ButtonSecondary
|
||||
@@ -44,9 +44,10 @@
|
||||
ref="tippyActions"
|
||||
class="flex flex-col focus:outline-none"
|
||||
tabindex="0"
|
||||
@keyup.d="$refs.documentation.$el.click()"
|
||||
@keyup.s="$refs.shortcuts.$el.click()"
|
||||
@keyup.c="$refs.chat.$el.click()"
|
||||
@keyup.d="documentation.$el.click()"
|
||||
@keyup.s="shortcuts.$el.click()"
|
||||
@keyup.c="chat.$el.click()"
|
||||
@keyup.escape="options.tippy().hide()"
|
||||
>
|
||||
<SmartItem
|
||||
ref="documentation"
|
||||
@@ -55,7 +56,7 @@
|
||||
to="https://docs.hoppscotch.io"
|
||||
blank
|
||||
:shortcut="['D']"
|
||||
@click.native="$refs.options.tippy().hide()"
|
||||
@click.native="options.tippy().hide()"
|
||||
/>
|
||||
<SmartItem
|
||||
ref="shortcuts"
|
||||
@@ -65,7 +66,7 @@
|
||||
@click.native="
|
||||
() => {
|
||||
showShortcuts = true
|
||||
$refs.options.tippy().hide()
|
||||
options.tippy().hide()
|
||||
}
|
||||
"
|
||||
/>
|
||||
@@ -77,7 +78,7 @@
|
||||
@click.native="
|
||||
() => {
|
||||
chatWithUs()
|
||||
$refs.options.tippy().hide()
|
||||
options.tippy().hide()
|
||||
}
|
||||
"
|
||||
/>
|
||||
@@ -87,14 +88,14 @@
|
||||
:label="`${t('app.github')}`"
|
||||
to="https://github.com/hoppscotch/hoppscotch"
|
||||
blank
|
||||
@click.native="$refs.options.tippy().hide()"
|
||||
@click.native="options.tippy().hide()"
|
||||
/>
|
||||
<SmartItem
|
||||
svg="twitter"
|
||||
:label="`${t('app.twitter')}`"
|
||||
to="https://hoppscotch.io/twitter"
|
||||
blank
|
||||
@click.native="$refs.options.tippy().hide()"
|
||||
@click.native="options.tippy().hide()"
|
||||
/>
|
||||
<SmartItem
|
||||
svg="user-plus"
|
||||
@@ -102,7 +103,7 @@
|
||||
@click.native="
|
||||
() => {
|
||||
showShare = true
|
||||
$refs.options.tippy().hide()
|
||||
options.tippy().hide()
|
||||
}
|
||||
"
|
||||
/>
|
||||
@@ -111,14 +112,14 @@
|
||||
:label="`${t('app.terms_and_privacy')}`"
|
||||
to="https://docs.hoppscotch.io/privacy"
|
||||
blank
|
||||
@click.native="$refs.options.tippy().hide()"
|
||||
@click.native="options.tippy().hide()"
|
||||
/>
|
||||
<SmartItem
|
||||
svg="gift"
|
||||
:label="`${t('app.whats_new')}`"
|
||||
to="https://docs.hoppscotch.io/changelog"
|
||||
blank
|
||||
@click.native="$refs.options.tippy().hide()"
|
||||
@click.native="options.tippy().hide()"
|
||||
/>
|
||||
<!-- <SmartItem :label="t('app.status')" /> -->
|
||||
<div class="flex opacity-50 py-2 px-4">
|
||||
@@ -222,4 +223,11 @@ const nativeShare = () => {
|
||||
const chatWithUs = () => {
|
||||
showChat()
|
||||
}
|
||||
|
||||
// Template refs
|
||||
const tippyActions = ref<any | null>(null)
|
||||
const documentation = ref<any | null>(null)
|
||||
const shortcuts = ref<any | null>(null)
|
||||
const chat = ref<any | null>(null)
|
||||
const options = ref<any | null>(null)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user