✨ Added elapsed request time toast
This commit is contained in:
parent
ac29f7eeb0
commit
39cbe8a858
2 changed files with 8 additions and 0 deletions
|
|
@ -202,6 +202,7 @@ pre {
|
|||
width: calc(100% - 8px);
|
||||
min-height: 40px;
|
||||
resize: vertical;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
&:not([readonly]):hover {
|
||||
background-color: var(--bg-dark-color);
|
||||
|
|
|
|||
|
|
@ -767,6 +767,7 @@
|
|||
headers = headersObject;
|
||||
|
||||
try {
|
||||
const startTime = new Date().getTime();
|
||||
const payload = await this.$axios({
|
||||
method: this.method,
|
||||
url: this.url + this.pathName + this.queryString,
|
||||
|
|
@ -775,6 +776,12 @@
|
|||
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 headers = this.response.headers = payload.headers;
|
||||
|
|
|
|||
Loading…
Reference in a new issue