❤️ ally
This commit is contained in:
@@ -9,11 +9,12 @@
|
|||||||
<span class="select-wrapper">
|
<span class="select-wrapper">
|
||||||
<v-popover>
|
<v-popover>
|
||||||
<input
|
<input
|
||||||
|
v-if="!customMethod"
|
||||||
id="method"
|
id="method"
|
||||||
class="method"
|
class="method"
|
||||||
v-if="!customMethod"
|
|
||||||
v-model="method"
|
v-model="method"
|
||||||
readonly
|
readonly
|
||||||
|
autofocus
|
||||||
/>
|
/>
|
||||||
<input v-else v-model="method" placeholder="CUSTOM" />
|
<input v-else v-model="method" placeholder="CUSTOM" />
|
||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
@@ -1349,13 +1350,25 @@ export default {
|
|||||||
filenames: "",
|
filenames: "",
|
||||||
navigatorShare: navigator.share,
|
navigatorShare: navigator.share,
|
||||||
runningRequest: false,
|
runningRequest: false,
|
||||||
|
|
||||||
settings: {
|
settings: {
|
||||||
SCROLL_INTO_ENABLED:
|
SCROLL_INTO_ENABLED:
|
||||||
typeof this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED !== "undefined"
|
typeof this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED !== "undefined"
|
||||||
? this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED
|
? this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED
|
||||||
: true,
|
: true,
|
||||||
},
|
},
|
||||||
|
currentMethodIndex: 0,
|
||||||
|
methodMenuItems: [
|
||||||
|
"GET",
|
||||||
|
"HEAD",
|
||||||
|
"POST",
|
||||||
|
"PUT",
|
||||||
|
"DELETE",
|
||||||
|
"CONNECT",
|
||||||
|
"OPTIONS",
|
||||||
|
"TRACE",
|
||||||
|
"PATCH",
|
||||||
|
"CUSTOM",
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -2687,20 +2700,44 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.cancelRequest()
|
this.cancelRequest()
|
||||||
}
|
}
|
||||||
} else if (e.key === "s" && (e.ctrlKey || e.metaKey)) {
|
}
|
||||||
|
if (e.key === "s" && (e.ctrlKey || e.metaKey)) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.saveRequest()
|
this.saveRequest()
|
||||||
} else if (e.key === "k" && (e.ctrlKey || e.metaKey)) {
|
}
|
||||||
|
if (e.key === "k" && (e.ctrlKey || e.metaKey)) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.copyRequest()
|
this.copyRequest()
|
||||||
} else if (e.key === "j" && (e.ctrlKey || e.metaKey)) {
|
}
|
||||||
|
if (e.key === "j" && (e.ctrlKey || e.metaKey)) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.$refs.clearAll.click()
|
this.$refs.clearAll.click()
|
||||||
} else if (e.key === "Escape") {
|
}
|
||||||
|
if (e.key === "Escape") {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.showModal = this.showTokenList = this.showTokenRequestList = this.showRequestModal = false
|
this.showModal = this.showTokenList = this.showTokenRequestList = this.showRequestModal = false
|
||||||
this.isHidden = true
|
this.isHidden = true
|
||||||
}
|
}
|
||||||
|
if (e.key === "G" && e.altKey) {
|
||||||
|
this.method = "GET"
|
||||||
|
}
|
||||||
|
if (e.key === "H" && e.altKey) {
|
||||||
|
this.method = "HEAD"
|
||||||
|
}
|
||||||
|
if (e.key === "P" && e.altKey) {
|
||||||
|
this.method = "POST"
|
||||||
|
}
|
||||||
|
if (e.key === "U" && e.altKey) {
|
||||||
|
this.method = "PUT"
|
||||||
|
}
|
||||||
|
if (e.key === "D" && e.altKey) {
|
||||||
|
this.method = "DELETE"
|
||||||
|
}
|
||||||
|
if (e.key == "ArrowUp" && e.altKey && this.currentMethodIndex > 0) {
|
||||||
|
this.method = this.methodMenuItems[--this.currentMethodIndex % this.methodMenuItems.length]
|
||||||
|
} else if (e.key == "ArrowDown" && e.altKey && this.currentMethodIndex < 9) {
|
||||||
|
this.method = this.methodMenuItems[++this.currentMethodIndex % this.methodMenuItems.length]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
document.addEventListener("keydown", this._keyListener.bind(this))
|
document.addEventListener("keydown", this._keyListener.bind(this))
|
||||||
await this.oauthRedirectReq()
|
await this.oauthRedirectReq()
|
||||||
|
|||||||
Reference in New Issue
Block a user