Merge branch 'master' into master

This commit is contained in:
Liyas Thomas
2019-08-22 15:54:03 +05:30
committed by GitHub
7 changed files with 127 additions and 4 deletions

View File

@@ -25,7 +25,8 @@ const app = new Vue({
status: '',
headers: '',
body: ''
}
},
history: []
},
computed: {
rawRequestBody() {
@@ -65,6 +66,18 @@ const app = new Vue({
}
},
methods: {
deleteHistory(entry) {
this.history.splice(this.history.indexOf(entry), 1)
},
useHistory({
method,
url,
path
}) {
this.method = method
this.url = url
this.path = path
},
collapse({
target
}) {
@@ -72,11 +85,17 @@ const app = new Vue({
document.getElementsByClassName(el)[0].classList.toggle('hidden')
},
sendRequest() {
// Expand the Response section incase it is hidden
const d = new Date()
const n = d.toLocaleTimeString()
this.history.push({
time: n,
method: this.method,
url: this.url,
path: this.path
})
if (this.$refs.response.classList.contains('hidden')) {
this.$refs.response.classList.toggle('hidden')
}
this.$refs.response.scrollIntoView({
behavior: 'smooth'
})