feat: more actions & shortcuts

This commit is contained in:
liyasthomas
2021-08-11 14:16:43 +05:30
parent 384e4ce43e
commit 829e116e04
13 changed files with 256 additions and 146 deletions

View File

@@ -135,32 +135,34 @@
</SmartDeletableChip>
</div>
</div>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="
param.hasOwnProperty('active')
? param.active
? $t('action.turn_off')
: $t('action.turn_on')
: $t('action.turn_off')
"
:icon="
param.hasOwnProperty('active')
? param.active
? 'check_box'
: 'check_box_outline_blank'
: 'check_box'
"
color="green"
@click.native="
updateBodyParam(index, {
key: param.key,
value: param.value,
active: param.hasOwnProperty('active') ? !param.active : false,
})
"
/>
<div>
<span>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="
param.hasOwnProperty('active')
? param.active
? $t('action.turn_off')
: $t('action.turn_on')
: $t('action.turn_off')
"
:icon="
param.hasOwnProperty('active')
? param.active
? 'check_box'
: 'check_box_outline_blank'
: 'check_box'
"
color="green"
@click.native="
updateBodyParam(index, {
key: param.key,
value: param.value,
active: param.hasOwnProperty('active') ? !param.active : false,
})
"
/>
</span>
<span>
<label for="attachment" class="p-0">
<ButtonSecondary
class="w-full"
@@ -176,14 +178,16 @@
multiple
@change="setRequestAttachment($event, index)"
/>
</div>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('delete')"
icon="delete"
color="red"
@click.native="deleteBodyParam(index)"
/>
</span>
<span>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('delete')"
icon="delete"
color="red"
@click.native="deleteBodyParam(index)"
/>
</span>
</div>
<div
v-if="bodyParams.length === 0"

View File

@@ -103,38 +103,42 @@
})
"
/>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="
header.hasOwnProperty('active')
? header.active
? $t('action.turn_off')
: $t('action.turn_on')
: $t('action.turn_off')
"
:icon="
header.hasOwnProperty('active')
? header.active
? 'check_box'
: 'check_box_outline_blank'
: 'check_box'
"
color="green"
@click.native="
updateHeader(index, {
key: header.key,
value: header.value,
active: header.hasOwnProperty('active') ? !header.active : false,
})
"
/>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('delete')"
icon="delete"
color="red"
@click.native="deleteHeader(index)"
/>
<span>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="
header.hasOwnProperty('active')
? header.active
? $t('action.turn_off')
: $t('action.turn_on')
: $t('action.turn_off')
"
:icon="
header.hasOwnProperty('active')
? header.active
? 'check_box'
: 'check_box_outline_blank'
: 'check_box'
"
color="green"
@click.native="
updateHeader(index, {
key: header.key,
value: header.value,
active: header.hasOwnProperty('active') ? !header.active : false,
})
"
/>
</span>
<span>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('delete')"
icon="delete"
color="red"
@click.native="deleteHeader(index)"
/>
</span>
</div>
<div
v-if="headers$.length === 0"

View File

@@ -124,38 +124,42 @@
})
"
/>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="
param.hasOwnProperty('active')
? param.active
? $t('action.turn_off')
: $t('action.turn_on')
: $t('action.turn_off')
"
:icon="
param.hasOwnProperty('active')
? param.active
? 'check_box'
: 'check_box_outline_blank'
: 'check_box'
"
color="green"
@click.native="
updateParam(index, {
key: param.key,
value: param.value,
active: param.hasOwnProperty('active') ? !param.active : false,
})
"
/>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('delete')"
icon="delete"
color="red"
@click.native="deleteParam(index)"
/>
<span>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="
param.hasOwnProperty('active')
? param.active
? $t('action.turn_off')
: $t('action.turn_on')
: $t('action.turn_off')
"
:icon="
param.hasOwnProperty('active')
? param.active
? 'check_box'
: 'check_box_outline_blank'
: 'check_box'
"
color="green"
@click.native="
updateParam(index, {
key: param.key,
value: param.value,
active: param.hasOwnProperty('active') ? !param.active : false,
})
"
/>
</span>
<span>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('delete')"
icon="delete"
color="red"
@click.native="deleteParam(index)"
/>
</span>
</div>
<div
v-if="params$.length === 0"