Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Refactor Functions #344

Merged
merged 15 commits into from
Nov 27, 2019
2 changes: 1 addition & 1 deletion assets/js/curlparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as querystring from "querystring";
* output this: 'msg1=value1&msg2=value2'
* @param dataArguments
*/
function joinDataArguments(dataArguments) {
let joinDataArguments = (dataArguments) => {
athul marked this conversation as resolved.
Show resolved Hide resolved
let data = "";
dataArguments.forEach((argument, i) => {
if (i === 0) {
Expand Down
2 changes: 1 addition & 1 deletion components/collections/editRequest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default {
};
},
watch: {
"requestUpdateData.collectionIndex": function resetFolderIndex() {
"requestUpdateData.collectionIndex": ()=> { //resetFolderIndex Function
athul marked this conversation as resolved.
Show resolved Hide resolved
// if user choosen some folder, than selected other collection, which doesn't have any folders
// than `requestUpdateData.folderIndex` won't be reseted
this.$data.requestUpdateData.folderIndex = undefined;
Expand Down
2 changes: 1 addition & 1 deletion components/collections/saveRequestAs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
this.$data.requestData.folderIndex = undefined;
this.$data.requestData.requestIndex = undefined;
},
"requestData.folderIndex": function resetRequestIndex() {
"requestData.folderIndex": ()=> {
athul marked this conversation as resolved.
Show resolved Hide resolved
this.$data.requestData.requestIndex = undefined;
}
},
Expand Down
6 changes: 3 additions & 3 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ export default {
if (status && this.rawParams === "") this.rawParams = "{}";
else this.setRouteQueryState();
},
"response.body": function(val) {
"response.body": (val)=> {
if (
this.response.body === "(waiting to send request)" ||
this.response.body === "Loading..."
Expand All @@ -947,7 +947,7 @@ export default {
}
},
params: {
handler: function(newValue) {
handler: (newValue)=> {
if (!this.paramsWatchEnabled) {
this.paramsWatchEnabled = true;
return;
Expand Down Expand Up @@ -1984,7 +1984,7 @@ export default {
},
mounted() {
this.observeRequestButton();
this._keyListener = function(e) {
this._keyListener = (e)=> {
liyasthomas marked this conversation as resolved.
Show resolved Hide resolved
if (e.key === "g" && (e.ctrlKey || e.metaKey)) {
e.preventDefault();
this.sendRequest();
Expand Down
4 changes: 2 additions & 2 deletions pages/realtime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ export default {
this.sse.close();
}
},
updated: function() {
this.$nextTick(function() {
updated: ()=> {
athul marked this conversation as resolved.
Show resolved Hide resolved
this.$nextTick(()=> {
const divLog = document.getElementById("log");
divLog.scrollBy(0, divLog.scrollHeight + 100);
});
Expand Down