✨ Added elapsed request time toast
This commit is contained in:
@@ -202,6 +202,7 @@ pre {
|
|||||||
width: calc(100% - 8px);
|
width: calc(100% - 8px);
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
&:not([readonly]):hover {
|
&:not([readonly]):hover {
|
||||||
background-color: var(--bg-dark-color);
|
background-color: var(--bg-dark-color);
|
||||||
|
|||||||
@@ -767,6 +767,7 @@
|
|||||||
headers = headersObject;
|
headers = headersObject;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const startTime = new Date().getTime();
|
||||||
const payload = await this.$axios({
|
const payload = await this.$axios({
|
||||||
method: this.method,
|
method: this.method,
|
||||||
url: this.url + this.pathName + this.queryString,
|
url: this.url + this.pathName + this.queryString,
|
||||||
@@ -775,6 +776,12 @@
|
|||||||
data: requestBody ? requestBody.toString() : null
|
data: requestBody ? requestBody.toString() : null
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const endTime = new Date().getTime();
|
||||||
|
const duration = endTime - startTime;
|
||||||
|
this.$toast.info(`Finished in ${duration}ms`, {
|
||||||
|
icon: 'done'
|
||||||
|
});
|
||||||
|
|
||||||
(() => {
|
(() => {
|
||||||
const status = this.response.status = payload.status;
|
const status = this.response.status = payload.status;
|
||||||
const headers = this.response.headers = payload.headers;
|
const headers = this.response.headers = payload.headers;
|
||||||
|
|||||||
Reference in New Issue
Block a user