refactor: improved popover actions, key bindings
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
}"
|
}"
|
||||||
@click="ZEN_MODE = !ZEN_MODE"
|
@click="ZEN_MODE = !ZEN_MODE"
|
||||||
/>
|
/>
|
||||||
<tippy interactive trigger="click" theme="popover" arrow>
|
<tippy interactive trigger="click" theme="popover">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
:title="t('settings.interceptor')"
|
:title="t('settings.interceptor')"
|
||||||
@@ -35,11 +35,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<tippy
|
<tippy
|
||||||
ref="options"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -52,7 +50,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.d="documentation.$el.click()"
|
@keyup.d="documentation.$el.click()"
|
||||||
@keyup.s="shortcuts.$el.click()"
|
@keyup.s="shortcuts.$el.click()"
|
||||||
@keyup.c="chat.$el.click()"
|
@keyup.c="chat.$el.click()"
|
||||||
@@ -284,5 +281,4 @@ const tippyActions = ref<any | null>(null)
|
|||||||
const documentation = ref<any | null>(null)
|
const documentation = ref<any | null>(null)
|
||||||
const shortcuts = ref<any | null>(null)
|
const shortcuts = ref<any | null>(null)
|
||||||
const chat = ref<any | null>(null)
|
const chat = ref<any | null>(null)
|
||||||
const options = ref<any | null>(null)
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -63,7 +63,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ProfilePicture
|
<ProfilePicture
|
||||||
@@ -103,7 +102,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.enter="profile.$el.click()"
|
@keyup.enter="profile.$el.click()"
|
||||||
@keyup.s="settings.$el.click()"
|
@keyup.s="settings.$el.click()"
|
||||||
@keyup.l="logout.$el.click()"
|
@keyup.l="logout.$el.click()"
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
@@ -41,9 +41,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -93,6 +93,8 @@ type CollectionTabs = "my-collections" | "team-collections"
|
|||||||
|
|
||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
const selectedCollectionTab = ref<CollectionTabs>("my-collections")
|
const selectedCollectionTab = ref<CollectionTabs>("my-collections")
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<div v-if="importerType !== null" class="flex flex-col">
|
<div v-if="importerType !== null" class="flex flex-col">
|
||||||
<div class="flex flex-col pb-6">
|
<div class="flex flex-col pb-4">
|
||||||
<div
|
<div
|
||||||
v-for="(step, index) in importerSteps"
|
v-for="(step, index) in importerSteps"
|
||||||
:key="`step-${index}`"
|
:key="`step-${index}`"
|
||||||
@@ -37,13 +37,15 @@
|
|||||||
{{ t(`${step.metadata.caption}`) }}
|
{{ t(`${step.metadata.caption}`) }}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="flex flex-col ml-10">
|
<p
|
||||||
|
class="flex flex-col ml-10 border border-dashed rounded border-dividerDark"
|
||||||
|
>
|
||||||
<input
|
<input
|
||||||
id="inputChooseFileToImportFrom"
|
id="inputChooseFileToImportFrom"
|
||||||
ref="inputChooseFileToImportFrom"
|
ref="inputChooseFileToImportFrom"
|
||||||
name="inputChooseFileToImportFrom"
|
name="inputChooseFileToImportFrom"
|
||||||
type="file"
|
type="file"
|
||||||
class="cursor-pointer transition file:transition file:cursor-pointer text-secondary hover:text-secondaryDark file:mr-2 file:py-2 file:px-4 file:rounded file:border-0 file:text-secondary hover:file:text-secondaryDark file:bg-primaryLight hover:file:bg-primaryDark"
|
class="p-4 cursor-pointer transition file:transition file:cursor-pointer text-secondary hover:text-secondaryDark file:mr-2 file:py-2 file:px-4 file:rounded file:border-0 file:text-secondary hover:file:text-secondaryDark file:bg-primaryLight hover:file:bg-primaryDark"
|
||||||
:accept="step.metadata.acceptedFileTypes"
|
:accept="step.metadata.acceptedFileTypes"
|
||||||
@change="onFileChange"
|
@change="onFileChange"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -57,7 +57,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -65,13 +64,11 @@
|
|||||||
:title="t('action.more')"
|
:title="t('action.more')"
|
||||||
:icon="IconMoreVertical"
|
:icon="IconMoreVertical"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.r="requestAction.$el.click()"
|
@keyup.r="requestAction.$el.click()"
|
||||||
@keyup.n="folderAction.$el.click()"
|
@keyup.n="folderAction.$el.click()"
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@@ -243,6 +240,7 @@ const emit = defineEmits<{
|
|||||||
(e: "edit-collection"): void
|
(e: "edit-collection"): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
// Template refs
|
||||||
const tippyActions = ref<any | null>(null)
|
const tippyActions = ref<any | null>(null)
|
||||||
const options = ref<any | null>(null)
|
const options = ref<any | null>(null)
|
||||||
const requestAction = ref<any | null>(null)
|
const requestAction = ref<any | null>(null)
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -62,7 +61,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.r="requestAction.$el.click()"
|
@keyup.r="requestAction.$el.click()"
|
||||||
@keyup.n="folderAction.$el.click()"
|
@keyup.n="folderAction.$el.click()"
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@@ -231,6 +229,7 @@ const emit = defineEmits([
|
|||||||
"duplicate-request",
|
"duplicate-request",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
// Template refs
|
||||||
const tippyActions = ref<any | null>(null)
|
const tippyActions = ref<any | null>(null)
|
||||||
const options = ref<any | null>(null)
|
const options = ref<any | null>(null)
|
||||||
const requestAction = ref<any | null>(null)
|
const requestAction = ref<any | null>(null)
|
||||||
|
|||||||
@@ -8,17 +8,18 @@
|
|||||||
>
|
>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<span>
|
<span>
|
||||||
<tippy interactive trigger="click" theme="popover" arrow>
|
<tippy interactive trigger="click" theme="popover">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
:title="t('action.more')"
|
:title="t('action.more')"
|
||||||
:icon="IconMoreVertical"
|
:icon="IconMoreVertical"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
/>
|
/>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -122,6 +123,7 @@ const collections = useReadonlyStream(graphqlCollections$, [])
|
|||||||
const currentUser = useReadonlyStream(currentUser$, null)
|
const currentUser = useReadonlyStream(currentUser$, null)
|
||||||
|
|
||||||
// Template refs
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
const inputChooseFileToImportFrom = ref<HTMLInputElement>()
|
const inputChooseFileToImportFrom = ref<HTMLInputElement>()
|
||||||
|
|
||||||
const collectionJson = computed(() => {
|
const collectionJson = computed(() => {
|
||||||
|
|||||||
@@ -42,7 +42,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -55,7 +54,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@keyup.d="duplicate.$el.click()"
|
@keyup.d="duplicate.$el.click()"
|
||||||
@keyup.delete="deleteAction.$el.click()"
|
@keyup.delete="deleteAction.$el.click()"
|
||||||
@@ -136,6 +134,7 @@ import { cloneDeep } from "lodash-es"
|
|||||||
import { removeGraphqlRequest } from "~/newstore/collections"
|
import { removeGraphqlRequest } from "~/newstore/collections"
|
||||||
import { setGQLSession } from "~/newstore/GQLSession"
|
import { setGQLSession } from "~/newstore/GQLSession"
|
||||||
|
|
||||||
|
// Template refs
|
||||||
const tippyActions = ref<any | null>(null)
|
const tippyActions = ref<any | null>(null)
|
||||||
const options = ref<any | null>(null)
|
const options = ref<any | null>(null)
|
||||||
const edit = ref<any | null>(null)
|
const edit = ref<any | null>(null)
|
||||||
|
|||||||
@@ -58,7 +58,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -71,13 +70,12 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.r="requestAction.$el.click()"
|
@keyup.r="requestAction.$el.click()"
|
||||||
@keyup.n="folderAction.$el.click()"
|
@keyup.n="folderAction.$el.click()"
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@keyup.delete="deleteAction.$el.click()"
|
@keyup.delete="deleteAction.$el.click()"
|
||||||
@keyup.x="exportAction.$el.click()"
|
@keyup.x="exportAction.$el.click()"
|
||||||
@keyup.escape="options.tippy().hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
ref="requestAction"
|
ref="requestAction"
|
||||||
@@ -265,6 +263,7 @@ export default defineComponent({
|
|||||||
toast: useToast(),
|
toast: useToast(),
|
||||||
t: useI18n(),
|
t: useI18n(),
|
||||||
|
|
||||||
|
// Template refs
|
||||||
tippyActions: ref<any | null>(null),
|
tippyActions: ref<any | null>(null),
|
||||||
options: ref<any | null>(null),
|
options: ref<any | null>(null),
|
||||||
requestAction: ref<any | null>(null),
|
requestAction: ref<any | null>(null),
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -62,7 +61,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.r="requestAction.$el.click()"
|
@keyup.r="requestAction.$el.click()"
|
||||||
@keyup.n="folderAction.$el.click()"
|
@keyup.n="folderAction.$el.click()"
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@@ -253,6 +251,7 @@ export default defineComponent({
|
|||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
// Template refs
|
||||||
tippyActions: ref<any | null>(null),
|
tippyActions: ref<any | null>(null),
|
||||||
options: ref<any | null>(null),
|
options: ref<any | null>(null),
|
||||||
requestAction: ref<any | null>(null),
|
requestAction: ref<any | null>(null),
|
||||||
|
|||||||
@@ -61,7 +61,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -74,7 +73,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@keyup.d="duplicate.$el.click()"
|
@keyup.d="duplicate.$el.click()"
|
||||||
@keyup.delete="deleteAction.$el.click()"
|
@keyup.delete="deleteAction.$el.click()"
|
||||||
|
|||||||
@@ -62,7 +62,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -75,7 +74,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.r="requestAction.$el.click()"
|
@keyup.r="requestAction.$el.click()"
|
||||||
@keyup.n="folderAction.$el.click()"
|
@keyup.n="folderAction.$el.click()"
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@@ -276,6 +274,7 @@ export default defineComponent({
|
|||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
// Template refs
|
||||||
tippyActions: ref<any | null>(null),
|
tippyActions: ref<any | null>(null),
|
||||||
options: ref<any | null>(null),
|
options: ref<any | null>(null),
|
||||||
requestAction: ref<any | null>(null),
|
requestAction: ref<any | null>(null),
|
||||||
|
|||||||
@@ -52,7 +52,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -65,13 +64,12 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.r="requestAction.$el.click()"
|
@keyup.r="requestAction.$el.click()"
|
||||||
@keyup.n="folderAction.$el.click()"
|
@keyup.n="folderAction.$el.click()"
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@keyup.delete="deleteAction.$el.click()"
|
@keyup.delete="deleteAction.$el.click()"
|
||||||
@keyup.x="exportAction.$el.click()"
|
@keyup.x="exportAction.$el.click()"
|
||||||
@keyup.escape="options.tippy().hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
ref="requestAction"
|
ref="requestAction"
|
||||||
@@ -263,6 +261,7 @@ export default defineComponent({
|
|||||||
],
|
],
|
||||||
setup() {
|
setup() {
|
||||||
return {
|
return {
|
||||||
|
// Template refs
|
||||||
tippyActions: ref<any | null>(null),
|
tippyActions: ref<any | null>(null),
|
||||||
options: ref<any | null>(null),
|
options: ref<any | null>(null),
|
||||||
requestAction: ref<any | null>(null),
|
requestAction: ref<any | null>(null),
|
||||||
|
|||||||
@@ -62,7 +62,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -75,7 +74,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@keyup.d="duplicate.$el.click()"
|
@keyup.d="duplicate.$el.click()"
|
||||||
@keyup.delete="deleteAction.$el.click()"
|
@keyup.delete="deleteAction.$el.click()"
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -36,7 +35,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.e="edit.$el.click()"
|
@keyup.e="edit.$el.click()"
|
||||||
@keyup.d="duplicate.$el.click()"
|
@keyup.d="duplicate.$el.click()"
|
||||||
@keyup.delete="
|
@keyup.delete="
|
||||||
@@ -127,6 +125,7 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
const confirmRemove = ref(false)
|
const confirmRemove = ref(false)
|
||||||
|
|
||||||
|
// Template refs
|
||||||
const tippyActions = ref<any | null>(null)
|
const tippyActions = ref<any | null>(null)
|
||||||
const options = ref<any | null>(null)
|
const options = ref<any | null>(null)
|
||||||
const edit = ref<any | null>(null)
|
const edit = ref<any | null>(null)
|
||||||
|
|||||||
@@ -8,7 +8,12 @@
|
|||||||
>
|
>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<span>
|
<span>
|
||||||
<tippy ref="options" interactive trigger="click" theme="popover" arrow>
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
:title="t('action.more')"
|
:title="t('action.more')"
|
||||||
@@ -16,9 +21,9 @@
|
|||||||
/>
|
/>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -123,7 +128,7 @@ const environments = useReadonlyStream(environments$, [])
|
|||||||
const currentUser = useReadonlyStream(currentUser$, null)
|
const currentUser = useReadonlyStream(currentUser$, null)
|
||||||
|
|
||||||
// Template refs
|
// Template refs
|
||||||
const options = ref<any>()
|
const tippyActions = ref<any | null>(null)
|
||||||
const inputChooseFileToImportFrom = ref<HTMLInputElement>()
|
const inputChooseFileToImportFrom = ref<HTMLInputElement>()
|
||||||
|
|
||||||
const environmentJson = computed(() => {
|
const environmentJson = computed(() => {
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="sticky top-0 z-10 flex flex-col rounded-t bg-primary">
|
<div class="sticky top-0 z-10 flex flex-col rounded-t bg-primary">
|
||||||
<tippy ref="options" interactive trigger="click" theme="popover" arrow>
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
|
>
|
||||||
<span
|
<span
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
:title="`${t('environment.select')}`"
|
:title="`${t('environment.select')}`"
|
||||||
@@ -20,9 +25,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -144,8 +149,6 @@ import {
|
|||||||
|
|
||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
const options = ref<any | null>(null)
|
|
||||||
|
|
||||||
const colorMode = useColorMode()
|
const colorMode = useColorMode()
|
||||||
|
|
||||||
const globalEnv = useReadonlyStream(globalEnv$, [])
|
const globalEnv = useReadonlyStream(globalEnv$, [])
|
||||||
@@ -163,6 +166,8 @@ const selectedEnvironmentIndex = useStream(
|
|||||||
setCurrentEnvironment
|
setCurrentEnvironment
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
const showModalImportExport = ref(false)
|
const showModalImportExport = ref(false)
|
||||||
const showModalDetails = ref(false)
|
const showModalDetails = ref(false)
|
||||||
const action = ref<"new" | "edit">("edit")
|
const action = ref<"new" | "edit">("edit")
|
||||||
|
|||||||
@@ -8,20 +8,19 @@
|
|||||||
{{ t("authorization.type") }}
|
{{ t("authorization.type") }}
|
||||||
</label>
|
</label>
|
||||||
<tippy
|
<tippy
|
||||||
ref="authTypeOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary class="pr-8 ml-2 rounded-none" :label="authName" />
|
<ButtonSecondary class="pr-8 ml-2 rounded-none" :label="authName" />
|
||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col space-y-1"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -175,11 +174,10 @@
|
|||||||
{{ t("authorization.pass_key_by") }}
|
{{ t("authorization.pass_key_by") }}
|
||||||
</label>
|
</label>
|
||||||
<tippy
|
<tippy
|
||||||
ref="addToOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
:on-shown="() => authTippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -189,9 +187,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="authTippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -301,6 +299,8 @@ const clearContent = () => {
|
|||||||
authActive: true,
|
authActive: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const authTypeOptions = ref<any | null>(null)
|
|
||||||
const addToOptions = ref<any | null>(null)
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
|
const authTippyActions = ref<any | null>(null)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -23,14 +23,18 @@
|
|||||||
@click.prevent="linewrapEnabled = !linewrapEnabled"
|
@click.prevent="linewrapEnabled = !linewrapEnabled"
|
||||||
/>
|
/>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip', allowHTML: true }"
|
||||||
:title="t('action.download_file')"
|
:title="`${t(
|
||||||
|
'action.download_file'
|
||||||
|
)} <xmp>${getSpecialKey()}</xmp><xmp>J</xmp>`"
|
||||||
:icon="downloadResponseIcon"
|
:icon="downloadResponseIcon"
|
||||||
@click="downloadResponse"
|
@click="downloadResponse"
|
||||||
/>
|
/>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip', allowHTML: true }"
|
||||||
:title="t('action.copy')"
|
:title="`${t(
|
||||||
|
'action.copy'
|
||||||
|
)} <xmp>${getSpecialKey()}</xmp><xmp>.</xmp>`"
|
||||||
:icon="copyResponseIcon"
|
:icon="copyResponseIcon"
|
||||||
@click="copyResponse"
|
@click="copyResponse"
|
||||||
/>
|
/>
|
||||||
@@ -86,6 +90,8 @@ import { useReadonlyStream } from "@composables/stream"
|
|||||||
import { useI18n } from "@composables/i18n"
|
import { useI18n } from "@composables/i18n"
|
||||||
import { useToast } from "@composables/toast"
|
import { useToast } from "@composables/toast"
|
||||||
import { gqlResponse$ } from "~/newstore/GQLSession"
|
import { gqlResponse$ } from "~/newstore/GQLSession"
|
||||||
|
import { defineActionHandler } from "~/helpers/actions"
|
||||||
|
import { getPlatformSpecialKey as getSpecialKey } from "~/helpers/platformutils"
|
||||||
|
|
||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
@@ -141,4 +147,7 @@ const downloadResponse = () => {
|
|||||||
URL.revokeObjectURL(url)
|
URL.revokeObjectURL(url)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineActionHandler("response.file.download", () => downloadResponse())
|
||||||
|
defineActionHandler("response.copy", () => copyResponse())
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -8,20 +8,19 @@
|
|||||||
{{ t("authorization.type") }}
|
{{ t("authorization.type") }}
|
||||||
</label>
|
</label>
|
||||||
<tippy
|
<tippy
|
||||||
ref="authTypeOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary class="pr-8 ml-2 rounded-none" :label="authName" />
|
<ButtonSecondary class="pr-8 ml-2 rounded-none" :label="authName" />
|
||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -172,11 +171,10 @@
|
|||||||
{{ t("authorization.pass_key_by") }}
|
{{ t("authorization.pass_key_by") }}
|
||||||
</label>
|
</label>
|
||||||
<tippy
|
<tippy
|
||||||
ref="addToOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
:on-shown="() => authTippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -186,9 +184,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="authTippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -297,6 +295,8 @@ const clearContent = () => {
|
|||||||
authActive: true,
|
authActive: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const authTypeOptions = ref<any | null>(null)
|
|
||||||
const addToOptions = ref<any | null>(null)
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
|
const authTippyActions = ref<any | null>(null)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -7,7 +7,12 @@
|
|||||||
<label class="font-semibold text-secondaryLight">
|
<label class="font-semibold text-secondaryLight">
|
||||||
{{ t("request.content_type") }}
|
{{ t("request.content_type") }}
|
||||||
</label>
|
</label>
|
||||||
<tippy interactive trigger="click" theme="popover" arrow>
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
:label="contentType || t('state.none')"
|
:label="contentType || t('state.none')"
|
||||||
@@ -16,9 +21,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col space-y-1 divide-y divide-dividerLight"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col space-y-2 divide-y focus:outline-none divide-dividerLight"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -122,7 +127,7 @@ import IconDone from "~icons/lucide/check"
|
|||||||
import IconInfo from "~icons/lucide/info"
|
import IconInfo from "~icons/lucide/info"
|
||||||
import IconRefreshCW from "~icons/lucide/refresh-cw"
|
import IconRefreshCW from "~icons/lucide/refresh-cw"
|
||||||
import IconExternalLink from "~icons/lucide/external-link"
|
import IconExternalLink from "~icons/lucide/external-link"
|
||||||
import { computed } from "vue"
|
import { computed, ref } from "vue"
|
||||||
import { pipe } from "fp-ts/function"
|
import { pipe } from "fp-ts/function"
|
||||||
import * as A from "fp-ts/Array"
|
import * as A from "fp-ts/Array"
|
||||||
import * as O from "fp-ts/Option"
|
import * as O from "fp-ts/Option"
|
||||||
@@ -177,4 +182,7 @@ const isContentTypeAlreadyExist = () => {
|
|||||||
A.some((e) => e.key.toLowerCase() === "content-type")
|
A.some((e) => e.key.toLowerCase() === "content-type")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -11,12 +11,11 @@
|
|||||||
{{ t("request.choose_language") }}
|
{{ t("request.choose_language") }}
|
||||||
</label>
|
</label>
|
||||||
<tippy
|
<tippy
|
||||||
ref="options"
|
|
||||||
placement="bottom"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
placement="bottom"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -39,9 +38,9 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -148,8 +147,6 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
|
|
||||||
const options = ref<any | null>(null)
|
|
||||||
|
|
||||||
const request = ref(getRESTRequest())
|
const request = ref(getRESTRequest())
|
||||||
const codegenType = ref<CodegenName>("shell-curl")
|
const codegenType = ref<CodegenName>("shell-curl")
|
||||||
const errorState = ref(false)
|
const errorState = ref(false)
|
||||||
@@ -195,6 +192,8 @@ const requestCode = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
const generatedCode = ref<any | null>(null)
|
const generatedCode = ref<any | null>(null)
|
||||||
|
|
||||||
useCodemirror(generatedCode, requestCode, {
|
useCodemirror(generatedCode, requestCode, {
|
||||||
|
|||||||
@@ -8,11 +8,9 @@
|
|||||||
<div class="relative flex">
|
<div class="relative flex">
|
||||||
<label for="method">
|
<label for="method">
|
||||||
<tippy
|
<tippy
|
||||||
ref="methodOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => methodTippyActions.focus()"
|
:on-shown="() => methodTippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
@@ -30,7 +28,6 @@
|
|||||||
ref="methodTippyActions"
|
ref="methodTippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -69,11 +66,9 @@
|
|||||||
/>
|
/>
|
||||||
<span class="flex">
|
<span class="flex">
|
||||||
<tippy
|
<tippy
|
||||||
ref="sendOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => sendTippyActions.focus()"
|
:on-shown="() => sendTippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonPrimary
|
<ButtonPrimary
|
||||||
@@ -86,7 +81,6 @@
|
|||||||
ref="sendTippyActions"
|
ref="sendTippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.c="curl.$el.click()"
|
@keyup.c="curl.$el.click()"
|
||||||
@keyup.s="show.$el.click()"
|
@keyup.s="show.$el.click()"
|
||||||
@keyup.delete="clearAll.$el.click()"
|
@keyup.delete="clearAll.$el.click()"
|
||||||
@@ -133,7 +127,7 @@
|
|||||||
</tippy>
|
</tippy>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="flex ml-2 border rounded border-dividerLight hover:border-dividerDark transition"
|
class="flex ml-2 border rounded transition border-dividerLight hover:border-dividerDark"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
class="flex-1 rounded rounded-r-none"
|
class="flex-1 rounded rounded-r-none"
|
||||||
@@ -144,11 +138,9 @@
|
|||||||
/>
|
/>
|
||||||
<span class="flex">
|
<span class="flex">
|
||||||
<tippy
|
<tippy
|
||||||
ref="saveOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => saveTippyActions.focus()"
|
:on-shown="() => saveTippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -171,7 +163,6 @@
|
|||||||
ref="saveTippyActions"
|
ref="saveTippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.c="copyRequestAction.$el.click()"
|
@keyup.c="copyRequestAction.$el.click()"
|
||||||
@keyup.s="saveRequestAction.$el.click()"
|
@keyup.s="saveRequestAction.$el.click()"
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
@@ -307,9 +298,6 @@ const showSaveRequestModal = ref(false)
|
|||||||
const hasNavigatorShare = !!navigator.share
|
const hasNavigatorShare = !!navigator.share
|
||||||
|
|
||||||
// Template refs
|
// Template refs
|
||||||
const methodOptions = ref<any | null>(null)
|
|
||||||
const saveOptions = ref<any | null>(null)
|
|
||||||
const sendOptions = ref<any | null>(null)
|
|
||||||
const methodTippyActions = ref<any | null>(null)
|
const methodTippyActions = ref<any | null>(null)
|
||||||
const sendTippyActions = ref<any | null>(null)
|
const sendTippyActions = ref<any | null>(null)
|
||||||
const saveTippyActions = ref<any | null>(null)
|
const saveTippyActions = ref<any | null>(null)
|
||||||
|
|||||||
@@ -97,11 +97,10 @@
|
|||||||
class="flex items-center"
|
class="flex items-center"
|
||||||
>
|
>
|
||||||
<tippy
|
<tippy
|
||||||
ref="outlineOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<div v-if="item.kind === 'RootObject'" class="outline-item">{}</div>
|
<div v-if="item.kind === 'RootObject'" class="outline-item">{}</div>
|
||||||
<div v-if="item.kind === 'RootArray'" class="outline-item">[]</div>
|
<div v-if="item.kind === 'RootArray'" class="outline-item">[]</div>
|
||||||
@@ -117,9 +116,9 @@
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="item.kind === 'ArrayMember'"
|
v-if="item.kind === 'ArrayMember'"
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -136,9 +135,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="item.kind === 'ObjectMember'"
|
v-if="item.kind === 'ObjectMember'"
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -156,8 +155,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="item.kind === 'RootObject'"
|
v-if="item.kind === 'RootObject'"
|
||||||
|
ref="tippyActions"
|
||||||
class="flex flex-col"
|
class="flex flex-col"
|
||||||
role="menu"
|
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
label="{}"
|
label="{}"
|
||||||
@@ -171,8 +170,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="item.kind === 'RootArray'"
|
v-if="item.kind === 'RootArray'"
|
||||||
|
ref="tippyActions"
|
||||||
class="flex flex-col"
|
class="flex flex-col"
|
||||||
role="menu"
|
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
label="[]"
|
label="[]"
|
||||||
@@ -321,7 +320,8 @@ const { downloadIcon, downloadResponse } = useDownloadResponse(
|
|||||||
jsonBodyText
|
jsonBodyText
|
||||||
)
|
)
|
||||||
|
|
||||||
const outlineOptions = ref<any | null>(null)
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
const jsonResponse = ref<any | null>(null)
|
const jsonResponse = ref<any | null>(null)
|
||||||
const linewrapEnabled = ref(true)
|
const linewrapEnabled = ref(true)
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,10 @@
|
|||||||
{{ t("websocket.message") }}
|
{{ t("websocket.message") }}
|
||||||
</label>
|
</label>
|
||||||
<tippy
|
<tippy
|
||||||
ref="contentTypeOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -33,9 +32,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -158,9 +157,10 @@ const emit = defineEmits<{
|
|||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
|
|
||||||
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
const linewrapEnabled = ref(true)
|
const linewrapEnabled = ref(true)
|
||||||
const wsCommunicationBody = ref<HTMLElement>()
|
const wsCommunicationBody = ref<HTMLElement>()
|
||||||
const contentTypeOptions = ref<Element>()
|
|
||||||
const payload = ref<HTMLInputElement>()
|
const payload = ref<HTMLInputElement>()
|
||||||
|
|
||||||
const prettifyIcon = refAutoReset<Component>(IconWand, 1000)
|
const prettifyIcon = refAutoReset<Component>(IconWand, 1000)
|
||||||
|
|||||||
@@ -96,7 +96,12 @@
|
|||||||
:key="`item-${index}`"
|
:key="`item-${index}`"
|
||||||
class="flex items-center"
|
class="flex items-center"
|
||||||
>
|
>
|
||||||
<tippy interactive trigger="click" theme="popover" arrow>
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
|
>
|
||||||
<div v-if="item.kind === 'RootObject'" class="outline-item">{}</div>
|
<div v-if="item.kind === 'RootObject'" class="outline-item">{}</div>
|
||||||
<div v-if="item.kind === 'RootArray'" class="outline-item">[]</div>
|
<div v-if="item.kind === 'RootArray'" class="outline-item">[]</div>
|
||||||
<div v-if="item.kind === 'ArrayMember'" class="outline-item">
|
<div v-if="item.kind === 'ArrayMember'" class="outline-item">
|
||||||
@@ -113,9 +118,9 @@
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="item.kind === 'ArrayMember'"
|
v-if="item.kind === 'ArrayMember'"
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -132,9 +137,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="item.kind === 'ObjectMember'"
|
v-if="item.kind === 'ObjectMember'"
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -152,8 +157,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="item.kind === 'RootObject'"
|
v-if="item.kind === 'RootObject'"
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
role="menu"
|
class="flex flex-col focus:outline-none"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
label="{}"
|
label="{}"
|
||||||
@@ -167,8 +172,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="item.kind === 'RootArray'"
|
v-if="item.kind === 'RootArray'"
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
role="menu"
|
class="flex flex-col focus:outline-none"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
label="[]"
|
label="[]"
|
||||||
@@ -223,8 +228,12 @@ import { shortDateTime } from "~/helpers/utils/date"
|
|||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
const props = defineProps<{ entry: LogEntryData }>()
|
const props = defineProps<{ entry: LogEntryData }>()
|
||||||
|
|
||||||
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
const editor = ref<any | null>(null)
|
const editor = ref<any | null>(null)
|
||||||
const linewrapEnabled = ref(true)
|
const linewrapEnabled = ref(true)
|
||||||
|
|
||||||
const logPayload = computed(() => props.entry.payload)
|
const logPayload = computed(() => props.entry.payload)
|
||||||
|
|
||||||
const selectedTab = ref<"json" | "raw">(
|
const selectedTab = ref<"json" | "raw">(
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<span class="inline-flex">
|
<span class="inline-flex">
|
||||||
<tippy interactive trigger="click" theme="popover" arrow>
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
@@ -23,9 +28,9 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartLink
|
<SmartLink
|
||||||
@@ -96,6 +101,8 @@ const changeLocale = (locale: string) => {
|
|||||||
changeAppLanguage(locale)
|
changeAppLanguage(locale)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
const searchQuery = ref("")
|
const searchQuery = ref("")
|
||||||
|
|
||||||
const filteredAppLanguages = computed(() => {
|
const filteredAppLanguages = computed(() => {
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<span class="inline-flex">
|
<span class="inline-flex">
|
||||||
<tippy interactive trigger="click" theme="popover" arrow>
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
@@ -15,9 +20,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -46,6 +51,7 @@ import IconType from "~icons/lucide/type"
|
|||||||
import { HoppFontSizes, HoppFontSize, applySetting } from "~/newstore/settings"
|
import { HoppFontSizes, HoppFontSize, applySetting } from "~/newstore/settings"
|
||||||
import { useSetting } from "@composables/settings"
|
import { useSetting } from "@composables/settings"
|
||||||
import { useI18n } from "@composables/i18n"
|
import { useI18n } from "@composables/i18n"
|
||||||
|
import { ref } from "vue"
|
||||||
|
|
||||||
const t = useI18n()
|
const t = useI18n()
|
||||||
|
|
||||||
@@ -59,4 +65,7 @@ const getFontSizeName = (size: HoppFontSize) => {
|
|||||||
const setActiveFont = (size: HoppFontSize) => {
|
const setActiveFont = (size: HoppFontSize) => {
|
||||||
applySetting("FONT_SIZE", size)
|
applySetting("FONT_SIZE", size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -87,11 +87,10 @@
|
|||||||
/>
|
/>
|
||||||
<span>
|
<span>
|
||||||
<tippy
|
<tippy
|
||||||
ref="memberOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<input
|
<input
|
||||||
@@ -104,9 +103,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -233,7 +232,8 @@ const emit = defineEmits<{
|
|||||||
(e: "invite-team"): void
|
(e: "invite-team"): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const memberOptions = ref<any | null>(null)
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
show: boolean
|
show: boolean
|
||||||
|
|||||||
@@ -140,11 +140,10 @@
|
|||||||
/>
|
/>
|
||||||
<span>
|
<span>
|
||||||
<tippy
|
<tippy
|
||||||
ref="newInviteeOptions"
|
|
||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<input
|
<input
|
||||||
@@ -157,9 +156,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -171,7 +170,7 @@
|
|||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
updateNewInviteeRole(index, 'OWNER')
|
updateNewInviteeRole(index, 'OWNER')
|
||||||
newInviteeOptions[index].tippy().hide()
|
hide()
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -184,7 +183,7 @@
|
|||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
updateNewInviteeRole(index, 'EDITOR')
|
updateNewInviteeRole(index, 'EDITOR')
|
||||||
newInviteeOptions[index].tippy().hide()
|
hide()
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -197,7 +196,7 @@
|
|||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
updateNewInviteeRole(index, 'VIEWER')
|
updateNewInviteeRole(index, 'VIEWER')
|
||||||
newInviteeOptions[index].tippy().hide()
|
hide()
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -372,7 +371,8 @@ const toast = useToast()
|
|||||||
|
|
||||||
const colorMode = useColorMode()
|
const colorMode = useColorMode()
|
||||||
|
|
||||||
const newInviteeOptions = ref<any | null>(null)
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
show: Boolean,
|
show: Boolean,
|
||||||
|
|||||||
@@ -81,7 +81,6 @@
|
|||||||
interactive
|
interactive
|
||||||
trigger="click"
|
trigger="click"
|
||||||
theme="popover"
|
theme="popover"
|
||||||
arrow
|
|
||||||
:on-shown="() => tippyActions.focus()"
|
:on-shown="() => tippyActions.focus()"
|
||||||
>
|
>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
@@ -94,7 +93,6 @@
|
|||||||
ref="tippyActions"
|
ref="tippyActions"
|
||||||
class="flex flex-col focus:outline-none"
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.e="team.myRole === 'OWNER' ? edit.$el.click() : null"
|
@keyup.e="team.myRole === 'OWNER' ? edit.$el.click() : null"
|
||||||
@keyup.x="
|
@keyup.x="
|
||||||
!(team.myRole === 'OWNER' && team.ownersCount == 1)
|
!(team.myRole === 'OWNER' && team.ownersCount == 1)
|
||||||
|
|||||||
@@ -9,11 +9,7 @@ import { HoppModule } from "."
|
|||||||
export default <HoppModule>{
|
export default <HoppModule>{
|
||||||
onVueAppInit(app) {
|
onVueAppInit(app) {
|
||||||
app.directive("focus", {
|
app.directive("focus", {
|
||||||
mounted(el) {
|
mounted: (el) => nextTick(() => el.focus()),
|
||||||
nextTick(() => {
|
|
||||||
el.focus()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,12 @@
|
|||||||
<div class="inline-flex flex-1 space-x-2">
|
<div class="inline-flex flex-1 space-x-2">
|
||||||
<div class="flex flex-1">
|
<div class="flex flex-1">
|
||||||
<label for="client-version">
|
<label for="client-version">
|
||||||
<tippy interactive trigger="click" theme="popover" arrow>
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => tippyActions.focus()"
|
||||||
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<input
|
<input
|
||||||
id="client-version"
|
id="client-version"
|
||||||
@@ -24,9 +29,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="tippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -111,7 +116,12 @@
|
|||||||
<label class="font-semibold text-secondaryLight">
|
<label class="font-semibold text-secondaryLight">
|
||||||
{{ t("authorization.type") }}
|
{{ t("authorization.type") }}
|
||||||
</label>
|
</label>
|
||||||
<tippy interactive trigger="click" theme="popover" arrow>
|
<tippy
|
||||||
|
interactive
|
||||||
|
trigger="click"
|
||||||
|
theme="popover"
|
||||||
|
:on-shown="() => authTippyActions.focus()"
|
||||||
|
>
|
||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
class="pr-8 ml-2 rounded-none"
|
class="pr-8 ml-2 rounded-none"
|
||||||
@@ -120,9 +130,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #content="{ hide }">
|
<template #content="{ hide }">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col"
|
ref="authTippyActions"
|
||||||
|
class="flex flex-col focus:outline-none"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="menu"
|
|
||||||
@keyup.escape="hide()"
|
@keyup.escape="hide()"
|
||||||
>
|
>
|
||||||
<SmartItem
|
<SmartItem
|
||||||
@@ -294,6 +304,9 @@ const connectionState = useReadonlyStream(
|
|||||||
)
|
)
|
||||||
const log = useStream(SIOLog$, [], setSIOLog)
|
const log = useStream(SIOLog$, [], setSIOLog)
|
||||||
|
|
||||||
|
// Template refs
|
||||||
|
const tippyActions = ref<any | null>(null)
|
||||||
|
const authTippyActions = ref<any | null>(null)
|
||||||
const isUrlValid = ref(true)
|
const isUrlValid = ref(true)
|
||||||
const authType = ref<"None" | "Bearer">("None")
|
const authType = ref<"None" | "Bearer">("None")
|
||||||
const bearerToken = ref("")
|
const bearerToken = ref("")
|
||||||
|
|||||||
Reference in New Issue
Block a user