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

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
custom: https://www.paypal.me/liyascthomas

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

10
.github/ISSUE_TEMPLATE/custom.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -104,6 +104,33 @@
</ul>
</div>
</fieldset>
<fieldset class="history hidden">
<legend v-on:click="collapse">History ⭥</legend>
<div class="collapsible">
<ul v-for="entry in history">
<li>
<label for="use">{{entry.time}}</label>
<button name="use" @click="useHistory(entry)">Use</button>
</li>
<li>
<label for="name">Method</label>
<input name="name" type="text" readonly :value="entry.method">
</li>
<li>
<label for="name">URL</label>
<input name="name" type="text" readonly :value="entry.url">
</li>
<li>
<label for="name">Path</label>
<input name="name" type="text" readonly :value="entry.path">
</li>
<li>
<label for="delete">&nbsp;</label>
<button name="delete" @click="deleteHistory(entry)">Delete</button>
</li>
</ul>
</div>
</fieldset>
<fieldset class="reqbody" v-if="method === 'POST' || method === 'PUT'">
<legend v-on:click="collapse">Request Body ⭥</legend>
<div class="collapsible">

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'
})

View File

@@ -88,7 +88,7 @@ fieldset {
}
legend {
color: #57b5f9;
color: var(--fg-color);
font-weight: 700;
cursor: pointer;
}
@@ -105,6 +105,14 @@ fieldset.request legend {
color: #57b5f9;
}
fieldset.history {
border-color: #9B9B9B;
}
fieldset.history legend {
color: #9B9B9B;
}
fieldset.authentication {
border-color: #B8E986;
}