refactor: update hopp-ui to be independent (#2927)

Co-authored-by: Anwarul Islam <anwaarulislaam@gmail.com>
This commit is contained in:
Andrew Bastin
2023-02-24 13:20:12 +05:30
committed by GitHub
parent 82c6f6f6bc
commit cae1840506
165 changed files with 2134 additions and 2069 deletions

View File

@@ -7,7 +7,7 @@
{{ t("request.header_list") }}
</label>
<div class="flex">
<ButtonSecondary
<HoppButtonSecondary
v-if="headers"
v-tippy="{ theme: 'tooltip' }"
:title="t('action.copy')"

View File

@@ -15,7 +15,7 @@
<span class="truncate rounded-sm select-all">
{{ header.value }}
</span>
<ButtonSecondary
<HoppButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="t('action.copy')"
:icon="copyIcon"

View File

@@ -1,10 +1,10 @@
<template>
<SmartTabs
<HoppSmartTabs
v-if="response"
v-model="selectedLensTab"
styles="sticky overflow-x-auto flex-shrink-0 z-10 bg-primary top-lowerPrimaryStickyFold"
>
<SmartTab
<HoppSmartTab
v-for="(lens, index) in validLenses"
:id="lens.renderer"
:key="`lens-${index}`"
@@ -12,8 +12,8 @@
class="flex flex-col flex-1 w-full h-full"
>
<component :is="lensRendererFor(lens.renderer)" :response="response" />
</SmartTab>
<SmartTab
</HoppSmartTab>
<HoppSmartTab
v-if="maybeHeaders"
id="headers"
:label="t('response.headers')"
@@ -21,8 +21,8 @@
class="flex flex-col flex-1"
>
<LensesHeadersRenderer :headers="maybeHeaders" />
</SmartTab>
<SmartTab
</HoppSmartTab>
<HoppSmartTab
id="results"
:label="t('test.results')"
:indicator="
@@ -38,8 +38,8 @@
class="flex flex-col flex-1"
>
<HttpTestResult />
</SmartTab>
</SmartTabs>
</HoppSmartTab>
</HoppSmartTabs>
</template>
<script setup lang="ts">

View File

@@ -7,7 +7,7 @@
{{ t("response.body") }}
</label>
<div class="flex">
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip' }"
:title="t('state.linewrap')"
@@ -15,7 +15,7 @@
:icon="IconWrapText"
@click.prevent="linewrapEnabled = !linewrapEnabled"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${
@@ -24,7 +24,7 @@
:icon="!previewEnabled ? IconEye : IconEyeOff"
@click.prevent="togglePreview"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(
@@ -33,7 +33,7 @@
:icon="downloadIcon"
@click="downloadResponse"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(

View File

@@ -7,7 +7,7 @@
{{ t("response.body") }}
</label>
<div class="flex">
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(

View File

@@ -10,7 +10,7 @@
{{ t("response.body") }}
</label>
<div class="flex items-center">
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip' }"
:title="t('state.linewrap')"
@@ -18,7 +18,7 @@
:icon="IconWrapText"
@click.prevent="linewrapEnabled = !linewrapEnabled"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip' }"
:title="t('action.filter')"
@@ -26,7 +26,7 @@
:class="{ '!text-accent': toggleFilter }"
@click.prevent="toggleFilterState"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(
@@ -35,7 +35,7 @@
:icon="downloadIcon"
@click="downloadResponse"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(
@@ -76,7 +76,7 @@
<icon-lucide-info class="svg-icons mr-1.5" />
<span>{{ filterResponseError.error }}</span>
</div>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip' }"
:title="t('app.wiki')"
@@ -121,7 +121,7 @@
tabindex="0"
@keyup.escape="hide()"
>
<SmartItem
<HoppSmartItem
v-for="(arrayMember, astIndex) in item.astParent.values"
:key="`ast-${astIndex}`"
:label="`${astIndex}`"
@@ -140,7 +140,7 @@
tabindex="0"
@keyup.escape="hide()"
>
<SmartItem
<HoppSmartItem
v-for="(objectMember, astIndex) in item.astParent.members"
:key="`ast-${astIndex}`"
:label="objectMember.key.value"
@@ -158,7 +158,7 @@
ref="tippyActions"
class="flex flex-col"
>
<SmartItem
<HoppSmartItem
label="{}"
@click="
() => {
@@ -173,7 +173,7 @@
ref="tippyActions"
class="flex flex-col"
>
<SmartItem
<HoppSmartItem
label="[]"
@click="
() => {

View File

@@ -7,7 +7,7 @@
{{ t("response.body") }}
</label>
<div class="flex">
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(

View File

@@ -7,7 +7,7 @@
{{ t("response.body") }}
</label>
<div class="flex">
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip' }"
:title="t('state.linewrap')"
@@ -15,7 +15,7 @@
:icon="IconWrapText"
@click.prevent="linewrapEnabled = !linewrapEnabled"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(
@@ -24,7 +24,7 @@
:icon="downloadIcon"
@click="downloadResponse"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(

View File

@@ -7,7 +7,7 @@
{{ t("response.body") }}
</label>
<div class="flex">
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip' }"
:title="t('state.linewrap')"
@@ -15,7 +15,7 @@
:icon="IconWrapText"
@click.prevent="linewrapEnabled = !linewrapEnabled"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(
@@ -24,7 +24,7 @@
:icon="downloadIcon"
@click="downloadResponse"
/>
<ButtonSecondary
<HoppButtonSecondary
v-if="response.body"
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(