{{ entry.request.endpoint }}
+
-
diff --git a/packages/hoppscotch-app/helpers/fb/history.ts b/packages/hoppscotch-app/helpers/fb/history.ts
index 201d30d8f..198b4daad 100644
--- a/packages/hoppscotch-app/helpers/fb/history.ts
+++ b/packages/hoppscotch-app/helpers/fb/history.ts
@@ -206,6 +206,7 @@ export function initHistory() {
historyRef.forEach((doc) => {
const entry = doc.data()
entry.id = doc.id
+ entry.updatedOn = doc.data().updatedOn.toDate()
history.push(translateToNewRESTHistory(entry))
})
@@ -227,6 +228,7 @@ export function initHistory() {
historyRef.forEach((doc) => {
const entry = doc.data()
entry.id = doc.id
+ entry.updatedOn = doc.data().updatedOn.toDate()
history.push(translateToNewGQLHistory(entry))
})
diff --git a/packages/hoppscotch-app/newstore/history.ts b/packages/hoppscotch-app/newstore/history.ts
index 340823f28..963829850 100644
--- a/packages/hoppscotch-app/newstore/history.ts
+++ b/packages/hoppscotch-app/newstore/history.ts
@@ -22,6 +22,8 @@ export type RESTHistoryEntry = {
star: boolean
id?: string // For when Firebase Firestore is set
+
+ updatedOn?: Date
}
export type GQLHistoryEntry = {
@@ -33,6 +35,8 @@ export type GQLHistoryEntry = {
star: boolean
id?: string // For when Firestore ID is set
+
+ updatedOn?: Date
}
export function makeRESTHistoryEntry(
@@ -50,6 +54,7 @@ export function makeGQLHistoryEntry(
return {
v: 1,
...x,
+ updatedOn: new Date(),
}
}
@@ -61,7 +66,7 @@ export function translateToNewRESTHistory(x: any): RESTHistoryEntry {
const star = x.star ?? false
const duration = x.duration ?? null
const statusCode = x.status ?? null
-
+ const updatedOn = x.updatedOn ?? null
const obj: RESTHistoryEntry = makeRESTHistoryEntry({
request,
star,
@@ -69,6 +74,7 @@ export function translateToNewRESTHistory(x: any): RESTHistoryEntry {
duration,
statusCode,
},
+ updatedOn,
})
if (x.id) obj.id = x.id
@@ -83,11 +89,13 @@ export function translateToNewGQLHistory(x: any): GQLHistoryEntry {
const request = translateToGQLRequest(x)
const star = x.star ?? false
const response = x.response ?? ""
+ const updatedOn = x.updatedOn ?? ""
const obj: GQLHistoryEntry = makeGQLHistoryEntry({
request,
star,
response,
+ updatedOn,
})
if (x.id) obj.id = x.id
@@ -313,6 +321,7 @@ completedRESTResponse$.subscribe((res) => {
statusCode: res.statusCode,
},
star: false,
+ updatedOn: new Date(),
})
)
}
diff --git a/packages/hoppscotch-app/package.json b/packages/hoppscotch-app/package.json
index f94e4ccef..d96fbd31d 100644
--- a/packages/hoppscotch-app/package.json
+++ b/packages/hoppscotch-app/package.json
@@ -96,6 +96,7 @@
"splitpanes": "^2.3.8",
"subscriptions-transport-ws": "^0.11.0",
"tern": "^0.24.3",
+ "timeago.js": "^4.0.2",
"uuid": "8.3.2",
"vue-apollo": "^3.1.0",
"vue-functional-data-merge": "^3.1.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d298e57a9..1ed476331 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -156,6 +156,7 @@ importers:
stylelint-config-standard-scss: ^3.0.0
subscriptions-transport-ws: ^0.11.0
tern: ^0.24.3
+ timeago.js: ^4.0.2
ts-jest: ^27.1.2
typescript: ^4.5.4
uuid: 8.3.2
@@ -233,6 +234,7 @@ importers:
splitpanes: 2.3.8
subscriptions-transport-ws: 0.11.0_graphql@15.7.2
tern: 0.24.3
+ timeago.js: 4.0.2
uuid: 8.3.2
vue-apollo: 3.1.0_graphql-tag@2.12.6
vue-functional-data-merge: 3.1.0
@@ -16684,6 +16686,10 @@ packages:
webpack: 4.46.0
dev: false
+ /timeago.js/4.0.2:
+ resolution: {integrity: sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w==}
+ dev: false
+
/timers-browserify/2.0.12:
resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==}
engines: {node: '>=0.6.0'}