From c5c97c0e6764acf9ceecc7632bdd6e69148302fa Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 22 Sep 2021 09:51:27 +0200 Subject: [PATCH 01/20] Registration in different communities --- frontend/public/json-example/communitys.json | 7 +++ frontend/src/locales/de.json | 33 ++++++----- frontend/src/locales/en.json | 33 ++++++----- frontend/src/routes/routes.js | 10 +++- frontend/src/store/store.js | 8 +++ frontend/src/views/Pages/Login.vue | 8 ++- frontend/src/views/Pages/Register.vue | 21 +++++++ .../src/views/Pages/RegisterCommunity.vue | 40 ++++++++++++++ .../views/Pages/RegisterSelectCommunity.vue | 55 +++++++++++++++++++ .../src/views/Pages/UserProfile/UserCard.vue | 2 +- 10 files changed, 186 insertions(+), 31 deletions(-) create mode 100644 frontend/public/json-example/communitys.json create mode 100644 frontend/src/views/Pages/RegisterCommunity.vue create mode 100644 frontend/src/views/Pages/RegisterSelectCommunity.vue diff --git a/frontend/public/json-example/communitys.json b/frontend/public/json-example/communitys.json new file mode 100644 index 000000000..fa6d0a23c --- /dev/null +++ b/frontend/public/json-example/communitys.json @@ -0,0 +1,7 @@ +{ + "community": [ + {"id": 1, "name": "Community 1", "location": "Ort 1", "description":"description 1 description 1 description 1 description 1 description 1 description 1 description 1 ", "url": "http://localhost:3000/vue/"}, + {"id": 2, "name": "Community 2", "location": "Ort 2", "description":"description 2 description 2 description 2 description 2 description 2 description 2 description 2 ", "url": "https://stage1.gradido.net/vue/"}, + {"id": 3, "name": "Community 3", "location": "Ort 3", "description":"description 3 description 3 description 3 description 3 description 3 description 3 description 3 ", "url": "https://gdd1.gradido.net/vue/"} + ] +} \ No newline at end of file diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 851f2a376..cc6329bd0 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -1,15 +1,22 @@ { "back": "Zurück", - "community": "Gemeinschaft", - "communitys": { - "form": { - "date_period": "Datum / Zeitraum", - "hours": "Stunden", - "hours_report": "Stundenbericht", - "more_hours": "weitere Stunden", - "submit": "Einreichen" - } - }, + "community": { + "choose-another-aommunity":"Eine andere Gemeinschaft auswählen", + "community": "Gemeinschaft", + "communitys": { + "form": { + "date_period": "Datum / Zeitraum", + "hours": "Stunden", + "hours_report": "Stundenbericht", + "more_hours": "weitere Stunden", + "submit": "Einreichen" + } + }, + "continue-to-registration":"weiter zur Registrierung", + "current-community":"Aktuelle Gemeinschaft", + "other-communities":"weitere Gemeinschaften", + "switch-to-this-community":"zu dieser Gemeinschaft wechseln" + }, "decay": { "calculation_decay": "Berechnung der Vergänglichkeit", "created": "Geschöpft", @@ -17,8 +24,7 @@ "decay": "Vergänglichkeit", "decayStart": " - Startblock für Vergänglichkeit am: ", "decay_introduced": "Die Vergänglichkeit wurde Eingeführt am ", - "decay_since_last_transaction": "Vergänglichkeit seit der letzten Transaktion", - "fromCommunity": "Aus der Gemeinschaft", + "decay_since_last_transaction": "Vergänglichkeit seit der letzten Transaktion", "hours": "Stunden", "last_transaction": "Letzte Transaktion", "minutes": "Minuten", @@ -29,8 +35,7 @@ "seconds": "Sekunden", "sent": "Gesendet", "since_introduction": "seit Einführung der Vergänglichkeit", - "Starting_block_decay": "Startblock Vergänglichkeit", - "toCommunity": "An die Gemeinschaft", + "Starting_block_decay": "Startblock Vergänglichkeit", "year": "Jahre" }, "error": { diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 4edf8e72d..6366710a7 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -1,15 +1,22 @@ { "back": "Back", - "community": "Community", - "communitys": { - "form": { - "date_period": "Date / Period", - "hours": "hours", - "hours_report": "Hourly report", - "more_hours": "more hours", - "submit": "submit" - } - }, + "community": { + "choose-another-aommunity":"Choose another community", + "community": "Community", + "communitys": { + "form": { + "date_period": "Date / Period", + "hours": "hours", + "hours_report": "Hourly report", + "more_hours": "more hours", + "submit": "submit" + } + }, + "continue-to-registration":"Continue to registration", + "current-community":"Current community", + "other-communities":"Other communities", + "switch-to-this-community":"switch to this community" + }, "decay": { "calculation_decay": "Calculation of Decay", "created": "Created", @@ -17,8 +24,7 @@ "decay": "Decay", "decayStart": " - Starting block for decay at: ", "decay_introduced": "Decay was Introduced on", - "decay_since_last_transaction": "Decay since the last transaction", - "fromCommunity": "From the community", + "decay_since_last_transaction": "Decay since the last transaction", "hours": "Hours", "last_transaction": "Last transaction:", "minutes": "Minutes", @@ -29,8 +35,7 @@ "seconds": "Seconds", "sent": "Sent", "since_introduction": "Since the introduction of Decay", - "Starting_block_decay": "Starting Block Decay", - "toCommunity": "To the community", + "Starting_block_decay": "Starting Block Decay", "year": "Years" }, "error": { diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index 34d7a9d70..18af20d61 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -36,7 +36,7 @@ const routes = [ path: '/thx/:comingFrom', component: () => import('../views/Pages/thx.vue'), beforeEnter: (to, from, next) => { - const validFrom = ['password', 'reset', 'register'] + const validFrom = ['password', 'reset', 'register', 'community'] if (!validFrom.includes(from.path.split('/')[1])) { next({ path: '/login' }) } else { @@ -48,6 +48,14 @@ const routes = [ path: '/password', component: () => import('../views/Pages/ForgotPassword.vue'), }, + { + path: '/regist-community', + component: () => import('../views/Pages/RegisterCommunity.vue'), + }, + { + path: '/select-community', + component: () => import('../views/Pages/RegisterSelectCommunity.vue'), + }, { path: '/reset/:optin', component: () => import('../views/Pages/ResetPassword.vue'), diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index fcd877a59..40c157068 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -68,6 +68,14 @@ export const store = new Vuex.Store({ description: '', token: null, newsletterState: null, + community_name: 'Community 1', + community: { + name: 'Community 1', + name2: 'Community 1', + location: 'Ort 1', + description: + 'description 1 description 1 description 1 description 1 description 1 description 1', + }, }, getters: {}, // Syncronous mutation of the state diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index e5b365d75..a3c22b2e1 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -20,6 +20,12 @@
{{ $t('login') }} +
+
+ {{ $store.state.community_name }} +
+
+ {{ $store.state.community.description }}
@@ -44,7 +50,7 @@ - + {{ $t('site.login.new_wallet') }} diff --git a/frontend/src/views/Pages/Register.vue b/frontend/src/views/Pages/Register.vue index 8c70f94e6..8876a0e0c 100755 --- a/frontend/src/views/Pages/Register.vue +++ b/frontend/src/views/Pages/Register.vue @@ -1,5 +1,23 @@