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
commit fb69fcee3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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