refactor: remaining sections stylings

This commit is contained in:
liyasthomas
2021-07-12 04:20:00 +05:30
parent 2e092d34a6
commit b5e524e513
15 changed files with 316 additions and 316 deletions

View File

@@ -1,18 +1,20 @@
<template>
<div>
<div class="flex flex-1">
<label for="body">{{ $t("response_body") }}</label>
<div
class="
flex flex-1
sticky
top-23
z-10
bg-primary
items-center
justify-between
"
>
<label for="body" class="px-4 font-semibold text-xs">
{{ $t("response_body") }}
</label>
<div>
<ButtonSecondary
v-if="response.body"
ref="ToggleExpandResponse"
v-tippy="{ theme: 'tooltip' }"
:title="
!expandResponse ? $t('expand_response') : $t('collapse_response')
"
:icon="!expandResponse ? 'unfold_more' : 'unfold_less'"
@click.native="ToggleExpandResponse"
/>
<ButtonSecondary
v-if="response.body && canDownloadResponse"
ref="downloadResponse"
@@ -37,15 +39,14 @@
:lang="'json'"
:provide-j-s-o-n-outline="true"
:options="{
maxLines: responseBodyMaxLines,
maxLines: Infinity,
minLines: '16',
fontSize: '15px',
fontSize: '14px',
autoScrollEditorIntoView: true,
readOnly: true,
showPrintMargin: false,
useWorker: false,
}"
styles="rounded-b-lg"
/>
</div>
</div>
@@ -62,8 +63,6 @@ export default {
},
data() {
return {
expandResponse: false,
responseBodyMaxLines: 16,
downloadIcon: "save_alt",
copyIcon: "content_copy",
}
@@ -92,11 +91,6 @@ export default {
},
},
methods: {
ToggleExpandResponse() {
this.expandResponse = !this.expandResponse
this.responseBodyMaxLines =
this.responseBodyMaxLines === Infinity ? 16 : Infinity
},
downloadResponse() {
const dataToWrite = this.responseBodyText
const file = new Blob([dataToWrite], { type: this.responseType })