From 94382d98348aca6561393ae7b98843e4fb6a40c9 Mon Sep 17 00:00:00 2001 From: ogerly Date: Sun, 10 Apr 2022 12:51:05 +0200 Subject: [PATCH 1/3] better date format for reddem valid date --- frontend/src/components/TransactionRows/DateRow.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/components/TransactionRows/DateRow.vue b/frontend/src/components/TransactionRows/DateRow.vue index 7f93656f7..365686418 100644 --- a/frontend/src/components/TransactionRows/DateRow.vue +++ b/frontend/src/components/TransactionRows/DateRow.vue @@ -30,9 +30,7 @@ export default { }, computed: { dateString() { - return this.diffNow - ? this.$moment(this.date).locale(this.$i18n.locale).fromNow() - : this.$d(new Date(this.date), 'long') + return this.$d(new Date(this.date), 'long') }, }, } From 50be004ce4608cdff774f1522f0803051ea9a227 Mon Sep 17 00:00:00 2001 From: ogerly Date: Sun, 10 Apr 2022 14:47:43 +0200 Subject: [PATCH 2/3] add jest.fn((d) --- .../components/DecayInformations/CollapseLinksList.spec.js | 1 + .../components/TransactionLinks/TransactionLink.spec.js | 1 + frontend/src/components/TransactionRows/DateRow.vue | 7 +------ .../components/Transactions/TransactionLinkSummary.spec.js | 1 + 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/DecayInformations/CollapseLinksList.spec.js b/frontend/src/components/DecayInformations/CollapseLinksList.spec.js index b533c6aa1..4fc527e39 100644 --- a/frontend/src/components/DecayInformations/CollapseLinksList.spec.js +++ b/frontend/src/components/DecayInformations/CollapseLinksList.spec.js @@ -9,6 +9,7 @@ const mocks = { }, $tc: jest.fn((tc) => tc), $t: jest.fn((t) => t), + $d: jest.fn((d) => d), } const propsData = { diff --git a/frontend/src/components/TransactionLinks/TransactionLink.spec.js b/frontend/src/components/TransactionLinks/TransactionLink.spec.js index f019a0ee1..4a2bb7b3c 100644 --- a/frontend/src/components/TransactionLinks/TransactionLink.spec.js +++ b/frontend/src/components/TransactionLinks/TransactionLink.spec.js @@ -13,6 +13,7 @@ const mocks = { locale: 'en', }, $t: jest.fn((t) => t), + $d: jest.fn((d) => d), $tc: jest.fn((tc) => tc), $apollo: { mutate: mockAPIcall, diff --git a/frontend/src/components/TransactionRows/DateRow.vue b/frontend/src/components/TransactionRows/DateRow.vue index 365686418..5f526caaf 100644 --- a/frontend/src/components/TransactionRows/DateRow.vue +++ b/frontend/src/components/TransactionRows/DateRow.vue @@ -8,7 +8,7 @@
- {{ dateString }} + {{ $d(new Date(this.date), 'long') }}
@@ -28,10 +28,5 @@ export default { default: false, }, }, - computed: { - dateString() { - return this.$d(new Date(this.date), 'long') - }, - }, } diff --git a/frontend/src/components/Transactions/TransactionLinkSummary.spec.js b/frontend/src/components/Transactions/TransactionLinkSummary.spec.js index 1f2a4388c..078ce6f97 100644 --- a/frontend/src/components/Transactions/TransactionLinkSummary.spec.js +++ b/frontend/src/components/Transactions/TransactionLinkSummary.spec.js @@ -12,6 +12,7 @@ const mocks = { locale: 'en', }, $t: jest.fn((t) => t), + $d: jest.fn((d) => d), $tc: jest.fn((tc) => tc), $apollo: { query: apolloQueryMock, From 6a6edfde627a0100115e32baf43d6d30e6f02e4d Mon Sep 17 00:00:00 2001 From: ogerly Date: Sun, 10 Apr 2022 20:03:53 +0200 Subject: [PATCH 3/3] change text links_sum in locales --- frontend/src/locales/de.json | 2 +- frontend/src/locales/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 600b36e65..557570019 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -109,7 +109,7 @@ "link-expired": "Der Link ist nicht mehr gültig. Die Gültigkeit ist am {date} abgelaufen.", "link-overview": "Linkübersicht", "links_count": "Aktive Links", - "links_sum": "Summe deiner versendeten Gradidos", + "links_sum": "Offene Links und QR-Codes", "no-account": "Du besitzt noch kein Gradido Konto", "no-redeem": "Du darfst deinen eigenen Link nicht einlösen!", "not-copied": "Konnte den Link nicht kopieren: {err}", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index ef9a14c0a..06342cab9 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -109,7 +109,7 @@ "link-expired": "The link is no longer valid. The validity expired on {date}.", "link-overview": "Link overview", "links_count": "Active links", - "links_sum": "Total of your sent Gradidos", + "links_sum": "Open links and QR codes", "no-account": "You don't have a Gradido account yet", "no-redeem": "You not allowed to redeem your own link!", "not-copied": "Could not copy link: {err}",