From 54389b5be055758fdd2f032d9452568bf7333d20 Mon Sep 17 00:00:00 2001 From: ogerly Date: Sat, 12 Mar 2022 09:32:42 +0100 Subject: [PATCH 01/35] add new transaction type: TRANSACTION_LINK, add locales, add new TransactionRow: LinkCountRow.vue, add new CollapseLinksList.vue --- .../DecayInformations/CollapseLinksList.vue | 15 ++++ .../src/components/GddTransactionList.vue | 6 ++ .../TransactionRows/LinkCountRow.vue | 23 ++++++ .../Transactions/TransactionLink.vue | 82 +++++++++++++++++++ frontend/src/locales/de.json | 7 ++ frontend/src/locales/en.json | 7 ++ 6 files changed, 140 insertions(+) create mode 100644 frontend/src/components/DecayInformations/CollapseLinksList.vue create mode 100644 frontend/src/components/TransactionRows/LinkCountRow.vue create mode 100644 frontend/src/components/Transactions/TransactionLink.vue diff --git a/frontend/src/components/DecayInformations/CollapseLinksList.vue b/frontend/src/components/DecayInformations/CollapseLinksList.vue new file mode 100644 index 000000000..69e1c852b --- /dev/null +++ b/frontend/src/components/DecayInformations/CollapseLinksList.vue @@ -0,0 +1,15 @@ + + diff --git a/frontend/src/components/GddTransactionList.vue b/frontend/src/components/GddTransactionList.vue index 3b4cd961d..dc21208c0 100644 --- a/frontend/src/components/GddTransactionList.vue +++ b/frontend/src/components/GddTransactionList.vue @@ -41,6 +41,10 @@ :decayStartBlock="decayStartBlock" /> + + @@ -63,6 +67,7 @@ import TransactionDecay from '@/components/Transactions/TransactionDecay' import TransactionSend from '@/components/Transactions/TransactionSend' import TransactionReceive from '@/components/Transactions/TransactionReceive' import TransactionCreation from '@/components/Transactions/TransactionCreation' +import TransactionLink from '@/components/Transactions/TransactionLink' export default { name: 'gdd-transaction-list', @@ -73,6 +78,7 @@ export default { TransactionSend, TransactionReceive, TransactionCreation, + TransactionLink, }, data() { return { diff --git a/frontend/src/components/TransactionRows/LinkCountRow.vue b/frontend/src/components/TransactionRows/LinkCountRow.vue new file mode 100644 index 000000000..fdb4c7089 --- /dev/null +++ b/frontend/src/components/TransactionRows/LinkCountRow.vue @@ -0,0 +1,23 @@ + + diff --git a/frontend/src/components/Transactions/TransactionLink.vue b/frontend/src/components/Transactions/TransactionLink.vue new file mode 100644 index 000000000..34221be6c --- /dev/null +++ b/frontend/src/components/Transactions/TransactionLink.vue @@ -0,0 +1,82 @@ + + diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index fb3b82c89..806f7bbbf 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -99,6 +99,13 @@ }, "your_amount": "Dein Betrag" }, + "gdd_per_link": { + "links_sum":"Summe deiner versendeten Gradidos", + "links_count":"aktive Links" + }, + "links-list": { + "header": "Liste deiner aktiven Links" + }, "gdt": { "action": "Aktion", "calculation": "Berechnung der GradidoTransform", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index aec28a51d..a6db06ec1 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -99,6 +99,13 @@ }, "your_amount": "Your amount" }, + "gdd_per_link": { + "links_sum":"Total of your sent Gradidos", + "links_count":"active links" + }, + "links-list": { + "header": "List of your active links" + }, "gdt": { "action": "Action", "calculation": "Calculation of GradidoTransform", From b73e7c1042563f5069ad8cf931a8bb8acfdb9fde Mon Sep 17 00:00:00 2001 From: ogerly Date: Sat, 12 Mar 2022 09:33:41 +0100 Subject: [PATCH 02/35] yarn locales fix --- frontend/src/locales/de.json | 10 +++++----- frontend/src/locales/en.json | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 806f7bbbf..94f7afc0d 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -100,11 +100,8 @@ "your_amount": "Dein Betrag" }, "gdd_per_link": { - "links_sum":"Summe deiner versendeten Gradidos", - "links_count":"aktive Links" - }, - "links-list": { - "header": "Liste deiner aktiven Links" + "links_count": "aktive Links", + "links_sum": "Summe deiner versendeten Gradidos" }, "gdt": { "action": "Aktion", @@ -125,6 +122,9 @@ }, "imprint": "Impressum", "language": "Sprache", + "links-list": { + "header": "Liste deiner aktiven Links" + }, "login": "Anmeldung", "logout": "Abmelden", "members_area": "Mitgliederbereich", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index a6db06ec1..11dd77bf5 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -100,11 +100,8 @@ "your_amount": "Your amount" }, "gdd_per_link": { - "links_sum":"Total of your sent Gradidos", - "links_count":"active links" - }, - "links-list": { - "header": "List of your active links" + "links_count": "active links", + "links_sum": "Total of your sent Gradidos" }, "gdt": { "action": "Action", @@ -125,6 +122,9 @@ }, "imprint": "Legal notice", "language": "Language", + "links-list": { + "header": "List of your active links" + }, "login": "Login", "logout": "Logout", "members_area": "Members area", From 3f7cdca4bf77f78afd14b27cda20f1063f4f0428 Mon Sep 17 00:00:00 2001 From: ogerly Date: Sun, 13 Mar 2022 10:28:20 +0100 Subject: [PATCH 03/35] change review --- .../DecayInformations/CollapseLinksList.vue | 1 - .../DecayInformation-Short.vue | 2 +- .../Transactions/TransactionLink.vue | 20 +------------------ 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/DecayInformations/CollapseLinksList.vue b/frontend/src/components/DecayInformations/CollapseLinksList.vue index 69e1c852b..3c6bab053 100644 --- a/frontend/src/components/DecayInformations/CollapseLinksList.vue +++ b/frontend/src/components/DecayInformations/CollapseLinksList.vue @@ -2,7 +2,6 @@ - {{ pending ? '—' : balance | amount }} {{ $t('GDD') }} + {{ pending ? $t('dash') : balance | amount }} {{ $t('GDD') }} {{ $store.state.firstName }} {{ $store.state.lastName }} From dc4d611d282a442d3c7578871adebd6cb98084f2 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 15 Mar 2022 16:23:13 +0100 Subject: [PATCH 22/35] tests "fixed" --- frontend/src/layouts/ContentFooter.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/layouts/ContentFooter.spec.js b/frontend/src/layouts/ContentFooter.spec.js index 7534fe51a..4fe16c030 100644 --- a/frontend/src/layouts/ContentFooter.spec.js +++ b/frontend/src/layouts/ContentFooter.spec.js @@ -32,7 +32,7 @@ describe('ContentFooter', () => { expect(wrapper.find('div.copyright').exists()).toBeTruthy() }) - it('renders the copyright year', () => { + it.skip('renders the copyright year', () => { expect(wrapper.find('div.copyright').text()).toMatch(/©\s*2[0-9]{3,3}\s+/) }) @@ -48,7 +48,7 @@ describe('ContentFooter', () => { }) describe('version', () => { - it('shows the current version', async () => { + it.skip('shows the current version', async () => { wrapper.setData({ version: 1.23 }) await wrapper.vm.$nextTick() expect(wrapper.find('div.copyright').findAll('a').at(1).text()).toEqual('App version 1.23') @@ -60,7 +60,7 @@ describe('ContentFooter', () => { ) }) - it('has last commit hash', async () => { + it.skip('has last commit hash', async () => { wrapper.setData({ shortHash: 'ACCEDED' }) wrapper.setData({ hash: 'ACCEDEDC001D00DC001D00DC001D00DC001CAFA' }) await wrapper.vm.$nextTick() From 4b0fd4cf2a72a3de70c7de7eba6472bdab1ed001 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 15 Mar 2022 16:41:26 +0100 Subject: [PATCH 23/35] remove unused json examples --- .../json-example/admin_card_statistic.json | 37 ----------- .../json-example/admin_charts_statistic.json | 65 ------------------- .../admin_community_statistic.json | 20 ------ .../json-example/admin_transaction_list.json | 57 ---------------- .../json-example/admin_transience_list.json | 50 -------------- .../public/json-example/admin_userlist.json | 53 --------------- frontend/public/json-example/userdata.json | 20 ------ .../json-example/userparticipation.json | 46 ------------- .../public/json-example/usertransactions.json | 57 ---------------- 9 files changed, 405 deletions(-) delete mode 100644 frontend/public/json-example/admin_card_statistic.json delete mode 100644 frontend/public/json-example/admin_charts_statistic.json delete mode 100644 frontend/public/json-example/admin_community_statistic.json delete mode 100644 frontend/public/json-example/admin_transaction_list.json delete mode 100644 frontend/public/json-example/admin_transience_list.json delete mode 100644 frontend/public/json-example/admin_userlist.json delete mode 100644 frontend/public/json-example/userdata.json delete mode 100644 frontend/public/json-example/userparticipation.json delete mode 100644 frontend/public/json-example/usertransactions.json diff --git a/frontend/public/json-example/admin_card_statistic.json b/frontend/public/json-example/admin_card_statistic.json deleted file mode 100644 index ff2c2df1d..000000000 --- a/frontend/public/json-example/admin_card_statistic.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "state": "success", - "statisticdata": [ - { - "i_creation_sum": 29288278.4653, - "i_creation_mon": 68278.4653, - "i_creation_365d": 19288278.4653, - "i_creation_30d": 288278.4653, - "i_creation_14d": 88278.4653, - "i_creation_7d": 3278.4653 - }, - { - "i_transience_sum": 8278.4653, - "i_transience_mon": 8278.4653, - "i_transience_365d": 8278.4653, - "i_transience_30d": 178.4653, - "i_transience_14d": 78.4653, - "i_transience_7d": 8.4653 - }, - { - "i_exchange_sum": 23345.2324, - "i_exchange_mon": 2, - "i_exchange_365d": 2, - "i_exchange_30d": 2, - "i_exchange_14d": 2, - "i_exchange_7d": 2 - }, - { - "i_members_sum": 5398, - "i_members_mon": 234, - "i_members_365d": 2356, - "i_members_30d": 123, - "i_members_14d": 23, - "i_members_7d": 24 - } - ] -} diff --git a/frontend/public/json-example/admin_charts_statistic.json b/frontend/public/json-example/admin_charts_statistic.json deleted file mode 100644 index 694ad1e10..000000000 --- a/frontend/public/json-example/admin_charts_statistic.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "state": "success", - "statisticdata": [ - { - "charts_creation_0_mon": 5635, - "charts_creation_1_mon": 5635, - "charts_creation_2_mon": 5635, - "charts_creation_3_mon": 5635, - "charts_creation_4_mon": 5635, - "charts_creation_5_mon": 5635, - "charts_creation_6_mon": 5635, - "charts_creation_7_mon": 5635, - "charts_creation_8_mon": 5635, - "charts_creation_9_mon": 5635, - "charts_creation_10_mon": 5635, - "charts_creation_11_mon": 5635, - "charts_creation_12_mon": 5635 - }, - { - "charts_transience_0_mon": 5635, - "charts_transience_1_mon": 5635, - "charts_transience_2_mon": 5635, - "charts_transience_3_mon": 5635, - "charts_transience_4_mon": 5635, - "charts_transience_5_mon": 5635, - "charts_transience_6_mon": 5635, - "charts_transience_7_mon": 5635, - "charts_transience_8_mon": 5635, - "charts_transience_9_mon": 5635, - "charts_transience_10_mon": 5635, - "charts_transience_11_mon": 5635, - "charts_transience_12_mon": 5635 - }, - { - "charts_exchange_0_mon": 5635, - "charts_exchange_1_mon": 5635, - "charts_exchange_2_mon": 5635, - "charts_exchange_3_mon": 5635, - "charts_exchange_4_mon": 5635, - "charts_exchange_5_mon": 5635, - "charts_exchange_6_mon": 5635, - "charts_exchange_7_mon": 5635, - "charts_exchange_8_mon": 5635, - "charts_exchange_9_mon": 5635, - "charts_exchange_10_mon": 5635, - "charts_exchange_11_mon": 5635, - "charts_exchange_12_mon": 5635 - }, - { - "charts_members_0_mon": 5635, - "charts_members_1_mon": 5635, - "charts_members_2_mon": 5635, - "charts_members_3_mon": 5635, - "charts_members_4_mon": 5635, - "charts_members_5_mon": 5635, - "charts_members_6_mon": 5635, - "charts_members_7_mon": 5635, - "charts_members_8_mon": 5635, - "charts_members_9_mon": 5635, - "charts_members_10_mon": 5635, - "charts_members_11_mon": 5635, - "charts_members_12_mon": 5635 - } - ] -} diff --git a/frontend/public/json-example/admin_community_statistic.json b/frontend/public/json-example/admin_community_statistic.json deleted file mode 100644 index dcdbdb3d4..000000000 --- a/frontend/public/json-example/admin_community_statistic.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "state": "success", - "statisticdata": [ - { - "community_entries1_mon": 5635, - "community_entries2_mon": 5635, - "community_entries3_mon": 5635, - "community_entries4_mon": 5635, - "community_entries5_mon": 5635, - "community_entries6_mon": 5635, - "community_entries7_mon": 5635, - "community_entries8_mon": 5635, - "community_entries9_mon": 5635, - "community_entries0_mon": 5635, - "community_entries10_mon": 5635, - "community_entries11_mon": 5635, - "community_entries12_mon": 5635 - } - ] -} diff --git a/frontend/public/json-example/admin_transaction_list.json b/frontend/public/json-example/admin_transaction_list.json deleted file mode 100644 index 72544e761..000000000 --- a/frontend/public/json-example/admin_transaction_list.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "state": "success", - "transactions": [ - { - "name": "Jon Tester", - "email": "jon@example.de", - "type": "send", - "transaction_id": 12, - "date": "29-11-2020", - "balance": 7000, - "memo": "Reperatur Waschbecken", - "pubkey": "abcdefghi123456789" - }, - { - "name": "Gradido Community", - "email": "gradido@example.de", - "type": "creation", - "transaction_id": 11, - "date": "1-11-2020", - "balance": 10000, - "memo": "Müll gesammelt im Wald", - "pubkey": "abcdefghi123456789" - }, - { - "name": "Maria Tester", - "email": "maria@example.de", - "type": "receive", - "transaction_id": 7, - "date": "23-10-2020", - "balance": 5000, - "memo": "Spende an Alice ", - "pubkey": "abcdefghi123456789" - }, - { - "name": "Alice Tester", - "email": "alice@example.de", - "type": "receive", - "transaction_id": 5, - "date": "2-8-2020", - "balance": 1000, - "memo": "Bob hat meinen Müll getrennt", - "pubkey": "abcdefghi123456789" - }, - { - "name": "Gradido Community", - "email": "gradido@example.de", - "type": "creation", - "transaction_id": 1, - "date": "11-7-2020", - "balance": 10000, - "memo": "Bob hat meinen Müll getrennt", - "pubkey": "abcdefghi123456789" - } - ], - "transactionExecutingCount": 8750, - "count": 5 -} diff --git a/frontend/public/json-example/admin_transience_list.json b/frontend/public/json-example/admin_transience_list.json deleted file mode 100644 index 3fa45cdf8..000000000 --- a/frontend/public/json-example/admin_transience_list.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "state": "success", - "participation": [ - { - "name": "", - "type": "submitted", - "participation_id": 412, - "date_submitted": "9-12-2020", - "titel": "Lorem Ipsum panta lore es Tastina sero was. ", - "text": "Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. ", - "date_participation": "8-12-2020", - "plz_participation": "01099", - "pubkey": "abcdefghi123456789" - }, - { - "name": "", - "type": "in progress", - "participation_id": 312, - "date_submitted": "2-11-2020", - "titel": "Lorem Ipsum panta lore es Tastina sero was. ", - "text": "Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. ", - "date_participation": "2-11-2020", - "plz_participation": "01099", - "pubkey": "abcdefghi123456789" - }, - { - "name": "", - "type": "confirmed", - "participation_id": 212, - "date_submitted": "20-10-2020", - "titel": "Lorem Ipsum panta lore es Tastina sero was. ", - "text": "Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. ", - "date_participation": "20-10-2020", - "plz_participation": "01099", - "pubkey": "abcdefghi123456789" - }, - { - "name": "", - "type": "rejected", - "participation_id": 142, - "date_submitted": "17-9-2020", - "titel": "Lorem Ipsum panta lore es Tastina sero was. ", - "text": "Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. ", - "date_participation": "17-9-2020", - "plz_participation": "01099", - "pubkey": "abcdefghi123456789" - } - ], - "count": 4 -} diff --git a/frontend/public/json-example/admin_userlist.json b/frontend/public/json-example/admin_userlist.json deleted file mode 100644 index 6a73b616a..000000000 --- a/frontend/public/json-example/admin_userlist.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "state": "success", - "admin0userlist": [ - { - "created": 1578688666, - "disabled": false, - "email": "dervommond@gmail.com", - "email_checked": true, - "first_name": "Max", - "group_alias": "gdd1", - "ident_hash": 2928827813, - "last_name": "Miau", - "public_hex": "2ed28a1cf5e116d83615406bc577152221c2f774a5656f66a0e7540f7576d71b", - "role": "admin", - "username": "", - "balance_gdd": 174500, - "balance_gdt": 4500, - "errorCount": 0 - }, - { - "created": 1578685678, - "disabled": false, - "email": "ttwer@gmail.com", - "email_checked": true, - "first_name": "John", - "group_alias": "gdd1", - "ident_hash": 2928827813, - "last_name": "Doe", - "public_hex": "2ed28a1cf5e116d83615406bc577152221c2f774a5656f66a0e7540f7576d71x", - "role": "user", - "username": "", - "balance_gdd": 144500, - "balance_gdt": 0, - "errorCount": 0 - }, - { - "created": 1578635671, - "disabled": false, - "email": "test@gmail.com", - "email_checked": true, - "first_name": "Alice", - "group_alias": "gdd1", - "ident_hash": 4928827813, - "last_name": "Seer", - "public_hex": "2ed28a1cf5e116d83615406bc577152221c2f774a5656f66a0e7540f7576d71a", - "role": "user", - "username": "", - "balance_gdd": 444500, - "balance_gdt": 4500, - "errorCount": 0 - } - ] -} diff --git a/frontend/public/json-example/userdata.json b/frontend/public/json-example/userdata.json deleted file mode 100644 index 9fc63da4d..000000000 --- a/frontend/public/json-example/userdata.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "state": "success", - "userdata": [ - { - "created": 1578688666, - "disabled": false, - "email": "dervommond@gmail.com", - "email_checked": true, - "first_name": "Max", - "group_alias": "gdd1", - "ident_hash": 2928827813, - "last_name": "Miau", - "public_hex": "2ed28a1cf5e116d83615406bc577152221c2f774a5656f66a0e7540f7576d71b", - "role": "admin", - "username": "", - "balance": 174500, - "errorCount": 0 - } - ] -} diff --git a/frontend/public/json-example/userparticipation.json b/frontend/public/json-example/userparticipation.json deleted file mode 100644 index cfd63062d..000000000 --- a/frontend/public/json-example/userparticipation.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "state": "success", - "participation": [ - { - "type": "submitted", - "participation_id": 412, - "date_submitted": "9-12-2020", - "titel": "Lorem Ipsum panta lore es Tastina sero was. ", - "text": "Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. ", - "date_participation": "8-12-2020", - "plz_participation": "01099", - "pubkey": "abcdefghi123456789" - }, - { - "type": "in progress", - "participation_id": 312, - "date_submitted": "2-11-2020", - "titel": "Lorem Ipsum panta lore es Tastina sero was. ", - "text": "Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. ", - "date_participation": "2-11-2020", - "plz_participation": "01099", - "pubkey": "abcdefghi123456789" - }, - { - "type": "confirmed", - "participation_id": 212, - "date_submitted": "20-10-2020", - "titel": "Lorem Ipsum panta lore es Tastina sero was. ", - "text": "Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. ", - "date_participation": "20-10-2020", - "plz_participation": "01099", - "pubkey": "abcdefghi123456789" - }, - { - "type": "rejected", - "participation_id": 142, - "date_submitted": "17-9-2020", - "titel": "Lorem Ipsum panta lore es Tastina sero was. ", - "text": "Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. Lorem Ipsum panta lore es Tastina sero was. ", - "date_participation": "17-9-2020", - "plz_participation": "01099", - "pubkey": "abcdefghi123456789" - } - ], - "count": 4 -} diff --git a/frontend/public/json-example/usertransactions.json b/frontend/public/json-example/usertransactions.json deleted file mode 100644 index 72544e761..000000000 --- a/frontend/public/json-example/usertransactions.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "state": "success", - "transactions": [ - { - "name": "Jon Tester", - "email": "jon@example.de", - "type": "send", - "transaction_id": 12, - "date": "29-11-2020", - "balance": 7000, - "memo": "Reperatur Waschbecken", - "pubkey": "abcdefghi123456789" - }, - { - "name": "Gradido Community", - "email": "gradido@example.de", - "type": "creation", - "transaction_id": 11, - "date": "1-11-2020", - "balance": 10000, - "memo": "Müll gesammelt im Wald", - "pubkey": "abcdefghi123456789" - }, - { - "name": "Maria Tester", - "email": "maria@example.de", - "type": "receive", - "transaction_id": 7, - "date": "23-10-2020", - "balance": 5000, - "memo": "Spende an Alice ", - "pubkey": "abcdefghi123456789" - }, - { - "name": "Alice Tester", - "email": "alice@example.de", - "type": "receive", - "transaction_id": 5, - "date": "2-8-2020", - "balance": 1000, - "memo": "Bob hat meinen Müll getrennt", - "pubkey": "abcdefghi123456789" - }, - { - "name": "Gradido Community", - "email": "gradido@example.de", - "type": "creation", - "transaction_id": 1, - "date": "11-7-2020", - "balance": 10000, - "memo": "Bob hat meinen Müll getrennt", - "pubkey": "abcdefghi123456789" - } - ], - "transactionExecutingCount": 8750, - "count": 5 -} From 41295bb9744e59752cc87ad7732ab4a9a0f0befb Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 16 Mar 2022 02:33:52 +0100 Subject: [PATCH 24/35] fix missing locale --- frontend/src/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 85e0f8702..ef1cb1498 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -22,7 +22,7 @@ "Starting_block_decay": "Starting Block Decay", "total": "Total", "types": { - "creation": "Created", + "created": "Created", "noDecay": "No Decay", "receive": "Received", "send": "Sent" From cede263dc44c63ecf68331c22a3b6c21772644c5 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 16 Mar 2022 02:34:09 +0100 Subject: [PATCH 25/35] use .gitignore as .eslintignore --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 6ccf37d09..17b35739c 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,7 +8,7 @@ "build": "vue-cli-service build", "dev": "yarn run serve", "analyse-bundle": "yarn build && webpack-bundle-analyzer dist/webpack.stats.json", - "lint": "eslint --max-warnings=0 --ext .js,.vue,.json .", + "lint": "eslint --max-warnings=0 --ext .js,.vue,.json --ignore-path .gitignore .", "stylelint": "stylelint --max-warnings=0 '**/*.{scss,vue}'", "test": "TZ=UTC jest --coverage", "locales": "scripts/sort.sh" From 90287eff17f28cfec861b85861061f4c1cc62166 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 16 Mar 2022 03:13:32 +0100 Subject: [PATCH 26/35] have all dynamic keys ignored and readded to the language files --- frontend/.eslintrc.js | 15 ++++++++++++-- frontend/src/locales/de.json | 16 +++++++++++++-- frontend/src/locales/en.json | 16 +++++++++++++-- frontend/src/pages/ForgotPassword.vue | 29 +++++---------------------- 4 files changed, 46 insertions(+), 30 deletions(-) diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js index f3b213295..4e45ede62 100644 --- a/frontend/.eslintrc.js +++ b/frontend/.eslintrc.js @@ -38,13 +38,24 @@ module.exports = { }, ], '@intlify/vue-i18n/no-dynamic-keys': 'error', - // TODO: no ignores '@intlify/vue-i18n/no-unused-keys': [ 'error', { src: './src', extensions: ['.js', '.vue'], - ignores: ['/site.thx./', '/form./', '/time./', '/decay.types./'], + // TODO: remove ignores + ignores: [ + '/site.thx./', + '/form./', + '/time./', + '/decay.types./', + 'settings.password.resend_subtitle', + 'settings.password.reset-password.text', + 'settings.password.set', + 'settings.password.set-password.text', + 'settings.password.subtitle', + 'site.login.signin', + ], enableFix: false, }, ], diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 1875ecce6..47076886d 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -165,7 +165,18 @@ }, "password": { "change-password": "Passwort ändern", - "forgot_pwd": "Passwort vergessen?" + "forgot_pwd": "Passwort vergessen?", + "resend_subtitle": "Dein Aktivierungslink ist abgelaufen. Du kannst hier ein neuen anfordern.", + "reset": "Passwort zurücksetzen", + "reset-password": { + "text": "Gib nun ein neues Passwort ein, mit dem du dich zukünftig in deinem Gradido-Konto anmelden willst." + }, + "send_now": "Jetzt senden", + "set": "Passwort festlegen", + "set-password": { + "text": "Speichere nun dein neues Passwort, mit dem du dich zukünftig in deinem Gradido-Konto anmelden kannst." + }, + "subtitle": "Wenn du dein Passwort vergessen hast, kannst du es hier zurücksetzen." } }, "signup": "Registrieren", @@ -173,7 +184,8 @@ "login": { "community": "Tausend Dank, weil du bei uns bist!", "heading": "Gradido", - "new_wallet": "Neues Konto erstellen" + "new_wallet": "Neues Konto erstellen", + "signin": "Anmelden" }, "signup": { "agree": "Ich stimme der Datenschutzerklärung zu.", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index ef1cb1498..fe227cb9d 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -165,7 +165,18 @@ }, "password": { "change-password": "Change password", - "forgot_pwd": "Forgot password?" + "forgot_pwd": "Forgot password?", + "resend_subtitle": "Your activation link has expired, here you can order a new one.", + "reset": "Reset password", + "reset-password": { + "text": "Enter a new password that you will use to log in to your Gradido account in the future.." + }, + "set": "Set password", + "set-password": { + "text": "Now save your new password, which you can use to log in to your Gradido account in the future." + }, + "send_now": "Send now", + "subtitle": "If you have forgotten your password, you can reset it here." } }, "signup": "Sign up", @@ -173,7 +184,8 @@ "login": { "community": "A thousand thanks for being with us!", "heading": "Gradido", - "new_wallet": "Create new account" + "new_wallet": "Create new account", + "signin": "Sign in" }, "signup": { "agree": "I agree to the privacy policy.", diff --git a/frontend/src/pages/ForgotPassword.vue b/frontend/src/pages/ForgotPassword.vue index f06c561a3..81121fbe7 100644 --- a/frontend/src/pages/ForgotPassword.vue +++ b/frontend/src/pages/ForgotPassword.vue @@ -5,10 +5,9 @@
+

{{ $t('settings.password.reset') }}

-

{{ $t(displaySetup.headline) }}

- -

{{ $t(displaySetup.subtitle) }}

+

{{ $t(subtitle) }}

@@ -24,8 +23,7 @@
- - {{ $t(displaySetup.button) }} + {{ $t('settings.password.send_now') }}
@@ -44,21 +42,6 @@ import { sendResetPasswordEmail } from '@/graphql/queries' import InputEmail from '@/components/Inputs/InputEmail' -const textFields = { - resetPassword: { - headline: 'settings.password.reset', - subtitle: 'settings.password.resend_subtitle', - button: 'settings.password.send_now', - cancel: 'back', - }, - login: { - headline: 'settings.password.reset', - subtitle: 'settings.password.subtitle', - button: 'settings.password.send_now', - cancel: 'back', - }, -} - export default { name: 'ForgotPassword', components: { @@ -70,7 +53,7 @@ export default { form: { email: '', }, - displaySetup: {}, + subtitle: 'settings.password.subtitle', } }, methods: { @@ -92,9 +75,7 @@ export default { }, created() { if (this.$route.params.comingFrom) { - this.displaySetup = textFields[this.$route.params.comingFrom] - } else { - this.displaySetup = textFields.login + this.subtitle = 'settings.password.resend_subtitle' } }, } From 652babd191dc542418d003ec1af643540d000eab Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 16 Mar 2022 03:16:05 +0100 Subject: [PATCH 27/35] renamed `dash` to `em-dash` --- frontend/src/components/GddSend/TransactionConfirmationSend.vue | 2 +- frontend/src/components/Menu/Navbar.vue | 2 +- frontend/src/components/Status.spec.js | 2 +- frontend/src/components/Status.vue | 2 +- frontend/src/components/UserCard.vue | 2 +- frontend/src/locales/de.json | 2 +- frontend/src/locales/en.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/GddSend/TransactionConfirmationSend.vue b/frontend/src/components/GddSend/TransactionConfirmationSend.vue index 5e945ec20..2d85fa33f 100644 --- a/frontend/src/components/GddSend/TransactionConfirmationSend.vue +++ b/frontend/src/components/GddSend/TransactionConfirmationSend.vue @@ -27,7 +27,7 @@ -
{{ memo ? memo : $t('dash') }}
+
{{ memo ? memo : $t('em-dash') }}
diff --git a/frontend/src/components/Menu/Navbar.vue b/frontend/src/components/Menu/Navbar.vue index 2163ae945..3542c1cd1 100644 --- a/frontend/src/components/Menu/Navbar.vue +++ b/frontend/src/components/Menu/Navbar.vue @@ -10,7 +10,7 @@ - {{ pending ? $t('dash') : balance | amount }} {{ $t('GDD') }} + {{ pending ? $t('em-dash') : balance | amount }} {{ $t('GDD') }} {{ $store.state.firstName }} {{ $store.state.lastName }} diff --git a/frontend/src/components/Status.spec.js b/frontend/src/components/Status.spec.js index 1dbb05493..ba7b03fa4 100644 --- a/frontend/src/components/Status.spec.js +++ b/frontend/src/components/Status.spec.js @@ -27,7 +27,7 @@ describe('Status', () => { describe('balance is pending', () => { it('it displays an en-dash', () => { - expect(wrapper.find('div.gdd-status-div').text()).toEqual('dash GDD') + expect(wrapper.find('div.gdd-status-div').text()).toEqual('em-dash GDD') }) }) diff --git a/frontend/src/components/Status.vue b/frontend/src/components/Status.vue index cde1afbdb..9ebe48e09 100644 --- a/frontend/src/components/Status.vue +++ b/frontend/src/components/Status.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/components/UserCard.vue b/frontend/src/components/UserCard.vue index 915632860..beca89532 100755 --- a/frontend/src/components/UserCard.vue +++ b/frontend/src/components/UserCard.vue @@ -26,7 +26,7 @@ -
{{ $t('dash') }}
+
{{ $t('em-dash') }}
{{ $t('community.community') }}
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 47076886d..93752b92d 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -9,7 +9,7 @@ "other-communities": "Weitere Gemeinschaften", "switch-to-this-community": "zu dieser Gemeinschaft wechseln" }, - "dash": "—", + "em-dash": "—", "decay": { "before_startblock_transaction": "Diese Transaktion beinhaltet keine Vergänglichkeit.", "calculation_decay": "Berechnung der Vergänglichkeit", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index fe227cb9d..48e761eda 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -9,7 +9,7 @@ "other-communities": "Other communities", "switch-to-this-community": "Switch to this community" }, - "dash": "—", + "em-dash": "—", "decay": { "before_startblock_transaction": "This transaction does not include decay.", "calculation_decay": "Calculation of Decay", From 5115063e47a98875c5151fd736f8c1934276aff8 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 16 Mar 2022 03:16:22 +0100 Subject: [PATCH 28/35] order language keys --- frontend/src/locales/de.json | 4 ++-- frontend/src/locales/en.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 93752b92d..e6296f26e 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -9,7 +9,6 @@ "other-communities": "Weitere Gemeinschaften", "switch-to-this-community": "zu dieser Gemeinschaft wechseln" }, - "em-dash": "—", "decay": { "before_startblock_transaction": "Diese Transaktion beinhaltet keine Vergänglichkeit.", "calculation_decay": "Berechnung der Vergänglichkeit", @@ -28,6 +27,7 @@ "send": "Gesendet" } }, + "em-dash": "—", "error": { "empty-transactionlist": "Es gab einen Fehler mit der Übermittlung der Anzahl deiner Transaktionen.", "error": "Fehler!", @@ -130,8 +130,8 @@ "admin_area": "Adminbereich", "logout": "Abmelden", "members_area": "Mitgliederbereich", - "profile": "Mein Profil", "overview": "Übersicht", + "profile": "Mein Profil", "send": "Senden", "support": "Support", "transactions": "Transaktionen" diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 48e761eda..0809d1b8f 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -9,7 +9,6 @@ "other-communities": "Other communities", "switch-to-this-community": "Switch to this community" }, - "em-dash": "—", "decay": { "before_startblock_transaction": "This transaction does not include decay.", "calculation_decay": "Calculation of Decay", @@ -28,6 +27,7 @@ "send": "Sent" } }, + "em-dash": "—", "error": { "empty-transactionlist": "There was an error with the transmission of the number of your transactions.", "error": "Error!", @@ -130,8 +130,8 @@ "admin_area": "Admin Area", "logout": "Logout", "members_area": "Members area", - "profile": "My profile", "overview": "Overview", + "profile": "My profile", "send": "Send", "support": "Support", "transactions": "Transactions" @@ -171,11 +171,11 @@ "reset-password": { "text": "Enter a new password that you will use to log in to your Gradido account in the future.." }, + "send_now": "Send now", "set": "Set password", "set-password": { "text": "Now save your new password, which you can use to log in to your Gradido account in the future." }, - "send_now": "Send now", "subtitle": "If you have forgotten your password, you can reset it here." } }, From a8dfb27fbce30e04c64d5a6c67f1a7b5cfe3e1b9 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 16 Mar 2022 03:37:41 +0100 Subject: [PATCH 29/35] fixed tests, moved ContentFooter to components --- .../{layouts => components}/ContentFooter.spec.js | 14 +++++++------- .../src/{layouts => components}/ContentFooter.vue | 0 frontend/src/layouts/AuthLayout_gdd.vue | 2 +- frontend/src/layouts/DashboardLayout_gdd.vue | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename frontend/src/{layouts => components}/ContentFooter.spec.js (91%) rename frontend/src/{layouts => components}/ContentFooter.vue (100%) diff --git a/frontend/src/layouts/ContentFooter.spec.js b/frontend/src/components/ContentFooter.spec.js similarity index 91% rename from frontend/src/layouts/ContentFooter.spec.js rename to frontend/src/components/ContentFooter.spec.js index 4fe16c030..f67560e44 100644 --- a/frontend/src/layouts/ContentFooter.spec.js +++ b/frontend/src/components/ContentFooter.spec.js @@ -11,7 +11,7 @@ describe('ContentFooter', () => { $i18n: { locale: 'en', }, - $t: jest.fn((t) => t), + $t: jest.fn((t, options) => (options ? [t, options] : t)), } const Wrapper = () => { @@ -32,8 +32,8 @@ describe('ContentFooter', () => { expect(wrapper.find('div.copyright').exists()).toBeTruthy() }) - it.skip('renders the copyright year', () => { - expect(wrapper.find('div.copyright').text()).toMatch(/©\s*2[0-9]{3,3}\s+/) + it('renders the copyright year', () => { + expect(mocks.$t).toBeCalledWith('footer.copyright.year', { year: 2022 }) }) it('renders a link to Gradido-Akademie', () => { @@ -48,10 +48,10 @@ describe('ContentFooter', () => { }) describe('version', () => { - it.skip('shows the current version', async () => { + it('shows the current version', async () => { wrapper.setData({ version: 1.23 }) await wrapper.vm.$nextTick() - expect(wrapper.find('div.copyright').findAll('a').at(1).text()).toEqual('App version 1.23') + expect(mocks.$t).toBeCalledWith('footer.app_version', { version: 1.23 }) }) it('links to latest release on GitHub', () => { @@ -60,11 +60,11 @@ describe('ContentFooter', () => { ) }) - it.skip('has last commit hash', async () => { + it('has last commit hash', async () => { wrapper.setData({ shortHash: 'ACCEDED' }) wrapper.setData({ hash: 'ACCEDEDC001D00DC001D00DC001D00DC001CAFA' }) await wrapper.vm.$nextTick() - expect(wrapper.find('div.copyright').findAll('a').at(2).text()).toEqual('(ACCEDED)') + expect(mocks.$t).toBeCalledWith('footer.short_hash', { shortHash: 'ACCEDED' }) }) it('links to last release commit', async () => { diff --git a/frontend/src/layouts/ContentFooter.vue b/frontend/src/components/ContentFooter.vue similarity index 100% rename from frontend/src/layouts/ContentFooter.vue rename to frontend/src/components/ContentFooter.vue diff --git a/frontend/src/layouts/AuthLayout_gdd.vue b/frontend/src/layouts/AuthLayout_gdd.vue index 4d0f8cb78..e87ebe06a 100644 --- a/frontend/src/layouts/AuthLayout_gdd.vue +++ b/frontend/src/layouts/AuthLayout_gdd.vue @@ -8,7 +8,7 @@