Merge branch 'master' into feat/gql_proxy

This commit is contained in:
Liyas Thomas
2019-11-21 22:11:36 +05:30
committed by GitHub

View File

@@ -588,6 +588,20 @@
<div class="flex-wrap"> <div class="flex-wrap">
<label for="body">response</label> <label for="body">response</label>
<div> <div>
<button
class="icon"
@click="ToggleExpandResponse"
ref="ToggleExpandResponse"
v-if="response.body"
v-tooltip="{
content: !expandResponse
? 'Expand response'
: 'Collapse response'
}"
>
<i class="material-icons" v-if="!expandResponse">unfold_more</i>
<i class="material-icons" v-else>unfold_less</i>
</button>
<button <button
class="icon" class="icon"
@click="copyResponse" @click="copyResponse"
@@ -613,7 +627,7 @@
:value="responseBodyText" :value="responseBodyText"
:lang="responseBodyType" :lang="responseBodyType"
:options="{ :options="{
maxLines: '16', maxLines: responseBodyMaxLines,
minLines: '16', minLines: '16',
fontSize: '16px', fontSize: '16px',
autoScrollEditorIntoView: true, autoScrollEditorIntoView: true,
@@ -861,6 +875,7 @@ export default {
}, },
previewEnabled: false, previewEnabled: false,
paramsWatchEnabled: true, paramsWatchEnabled: true,
expandResponse: false,
/** /**
* These are content types that can be automatically * These are content types that can be automatically
@@ -887,7 +902,8 @@ export default {
urlExcludes: {}, urlExcludes: {},
responseBodyText: "", responseBodyText: "",
responseBodyType: "text" responseBodyType: "text",
responseBodyMaxLines: 16
}; };
}, },
watch: { watch: {
@@ -1686,6 +1702,10 @@ export default {
1000 1000
); );
}, },
ToggleExpandResponse() {
this.expandResponse = !this.expandResponse;
this.responseBodyMaxLines = (this.responseBodyMaxLines == Infinity) ? 16 : Infinity;
},
copyResponse() { copyResponse() {
this.$refs.copyResponse.innerHTML = this.doneButton; this.$refs.copyResponse.innerHTML = this.doneButton;
this.$toast.success("Copied to clipboard", { this.$toast.success("Copied to clipboard", {