Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

:sparkles: Added elapsed request time toast

liyasthomas39cbe8a858ad
diff --git a/assets/css/styles.scss b/assets/css/styles.scss
index aa0e76219..c3f12d3b8 100644
--- a/assets/css/styles.scss
+++ b/assets/css/styles.scss
@@ -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);
diff --git a/pages/index.vue b/pages/index.vue
index 94c6b69d9..c62788f84 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -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;