refactor(ui): better remove, delete icons, and select components
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
/>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('clear')"
|
||||
:title="$t('action.clear')"
|
||||
icon="clear_all"
|
||||
@click.native="clearContent"
|
||||
/>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('clear')"
|
||||
:title="$t('action.clear_all')"
|
||||
icon="clear_all"
|
||||
@click.native="clearContent"
|
||||
/>
|
||||
@@ -175,7 +175,7 @@
|
||||
<span>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('delete')"
|
||||
:title="$t('action.remove')"
|
||||
icon="remove_circle_outline"
|
||||
color="red"
|
||||
@click.native="deleteBodyParam(index)"
|
||||
|
||||
@@ -9,36 +9,28 @@
|
||||
<label for="requestType" class="px-4 pb-4">
|
||||
{{ $t("request.choose_language") }}
|
||||
</label>
|
||||
<div class="flex">
|
||||
<tippy
|
||||
ref="options"
|
||||
interactive
|
||||
trigger="click"
|
||||
theme="popover"
|
||||
arrow
|
||||
>
|
||||
<template #trigger>
|
||||
<span class="select-wrapper">
|
||||
<ButtonSecondary
|
||||
:label="codegens.find((x) => x.id === codegenType).name"
|
||||
outline
|
||||
class="pr-8"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
<SmartItem
|
||||
v-for="(gen, index) in codegens"
|
||||
:key="`gen-${index}`"
|
||||
:label="gen.name"
|
||||
:info-icon="gen.id === codegenType ? 'done' : ''"
|
||||
:active-info-icon="gen.id === codegenType"
|
||||
@click.native="
|
||||
codegenType = gen.id
|
||||
$refs.options.tippy().hide()
|
||||
"
|
||||
/>
|
||||
</tippy>
|
||||
</div>
|
||||
<tippy ref="options" interactive trigger="click" theme="popover" arrow>
|
||||
<template #trigger>
|
||||
<span class="select-wrapper">
|
||||
<ButtonSecondary
|
||||
:label="codegens.find((x) => x.id === codegenType).name"
|
||||
outline
|
||||
class="flex-1 pr-8"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
<SmartItem
|
||||
v-for="(gen, index) in codegens"
|
||||
:key="`gen-${index}`"
|
||||
:label="gen.name"
|
||||
:info-icon="gen.id === codegenType ? 'done' : ''"
|
||||
:active-info-icon="gen.id === codegenType"
|
||||
@click.native="
|
||||
codegenType = gen.id
|
||||
$refs.options.tippy().hide()
|
||||
"
|
||||
/>
|
||||
</tippy>
|
||||
<div class="flex flex-1 justify-between">
|
||||
<label for="generatedCode" class="px-4 pt-4 pb-4">
|
||||
{{ $t("request.generated_code") }}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('clear')"
|
||||
:title="$t('action.clear_all')"
|
||||
icon="clear_all"
|
||||
@click.native="clearContent"
|
||||
/>
|
||||
@@ -129,7 +129,7 @@
|
||||
<span>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('delete')"
|
||||
:title="$t('action.remove')"
|
||||
icon="remove_circle_outline"
|
||||
color="red"
|
||||
@click.native="deleteHeader(index)"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('clear_all')"
|
||||
:title="$t('action.clear_all')"
|
||||
icon="clear_all"
|
||||
@click.native="clearContent"
|
||||
/>
|
||||
@@ -140,7 +140,7 @@
|
||||
<span>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('delete')"
|
||||
:title="$t('action.remove')"
|
||||
icon="remove_circle_outline"
|
||||
color="red"
|
||||
@click.native="deleteParam(index)"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('clear')"
|
||||
:title="$t('action.clear')"
|
||||
icon="clear_all"
|
||||
@click.native="clearContent"
|
||||
/>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('clear')"
|
||||
:title="$t('action.clear')"
|
||||
icon="clear_all"
|
||||
@click.native="clearContent('rawParams', $event)"
|
||||
/>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
/>
|
||||
<SmartItem
|
||||
ref="clearAll"
|
||||
:label="$t('clear_all')"
|
||||
:label="$t('action.clear_all')"
|
||||
icon="clear_all"
|
||||
@click.native="
|
||||
clearContent()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</label>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('clear')"
|
||||
:title="$t('action.clear')"
|
||||
icon="clear_all"
|
||||
@click.native="clearContent()"
|
||||
/>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('clear')"
|
||||
:title="$t('action.clear')"
|
||||
icon="clear_all"
|
||||
@click.native="clearContent"
|
||||
/>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div v-if="tokens.length != 0">
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('clear')"
|
||||
:title="$t('action.clear_all')"
|
||||
icon="clear_all"
|
||||
@click.native="clearContent('tokens', $event)"
|
||||
/>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li>
|
||||
<ButtonSecondary
|
||||
v-tippy="{ theme: 'tooltip' }"
|
||||
:title="$t('delete')"
|
||||
:title="$t('action.remove')"
|
||||
icon="remove_circle_outline"
|
||||
color="red"
|
||||
@click.native="removeOAuthToken(index)"
|
||||
|
||||
Reference in New Issue
Block a user