diff --git a/packages/hoppscotch-app/assets/scss/styles.scss b/packages/hoppscotch-app/assets/scss/styles.scss index 439da74f6..54a433491 100644 --- a/packages/hoppscotch-app/assets/scss/styles.scss +++ b/packages/hoppscotch-app/assets/scss/styles.scss @@ -102,6 +102,7 @@ body { .material-icons { @apply flex-shrink-0; + @apply overflow-hidden; font-size: var(--line-height-body) !important; width: var(--line-height-body); @@ -109,6 +110,7 @@ body { .svg-icons { @apply flex-shrink-0; + @apply overflow-hidden; height: var(--line-height-body); width: var(--line-height-body); @@ -457,6 +459,10 @@ pre.ace_editor { @apply px-1; } +.capitalize-first::first-letter { + @apply capitalize; +} + @media (max-width: 767px) { main { margin-bottom: env(safe-area-inset-bottom); diff --git a/packages/hoppscotch-app/components/app/Announcement.vue b/packages/hoppscotch-app/components/app/Announcement.vue index cdbdbd45c..fab647c15 100644 --- a/packages/hoppscotch-app/components/app/Announcement.vue +++ b/packages/hoppscotch-app/components/app/Announcement.vue @@ -1,7 +1,7 @@ - diff --git a/packages/hoppscotch-app/components/history/index.vue b/packages/hoppscotch-app/components/history/index.vue index a7f12ea2c..5d80e03cf 100644 --- a/packages/hoppscotch-app/components/history/index.vue +++ b/packages/hoppscotch-app/components/history/index.vue @@ -6,14 +6,14 @@ type="search" autocomplete="off" class="bg-transparent flex w-full p-4 py-2" - :placeholder="`${$t('action.search')}`" + :placeholder="`${t('action.search')}`" />
-
- - +
+ + {{ filteredHistoryGroupIndex }} + +
+ +
manage_search - {{ $t("state.nothing_found") }} "{{ filterText }}" + {{ t("state.nothing_found") }} "{{ filterText }}"
- {{ $t("empty.history") }} + {{ t("empty.history") }}
- diff --git a/packages/hoppscotch-app/components/history/rest/Card.vue b/packages/hoppscotch-app/components/history/rest/Card.vue index 3ecd2801c..4cdb6df67 100644 --- a/packages/hoppscotch-app/components/history/rest/Card.vue +++ b/packages/hoppscotch-app/components/history/rest/Card.vue @@ -1,6 +1,7 @@ - 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'}