From 6632622b4efd9a0f4d9668ff9dd5e08b2bd54804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 19 Jul 2021 15:44:59 +0200 Subject: [PATCH 1/9] Implement route of landing page --- backend/src/config/links.js | 4 +++- webapp/constants/links.js | 4 +++- webapp/middleware/authenticated.js | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/backend/src/config/links.js b/backend/src/config/links.js index 6b945a5e0..f8de671f0 100644 --- a/backend/src/config/links.js +++ b/backend/src/config/links.js @@ -1,9 +1,11 @@ // this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding export default { + LANDING_PAGE: '/login', // examples: '/login', '/registration' ORGANIZATION: 'https://ocelot.social', SUPPORT: 'https://ocelot.social', - // on null or empty strings internal imprint is used, see 'webapp/locales/html/' + // on null or empty strings internal pages are used, see 'webapp/locales/html/' + // you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ DONATE: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly IMPRINT: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly TERMS_AND_CONDITIONS: null, diff --git a/webapp/constants/links.js b/webapp/constants/links.js index 6b945a5e0..f8de671f0 100644 --- a/webapp/constants/links.js +++ b/webapp/constants/links.js @@ -1,9 +1,11 @@ // this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding export default { + LANDING_PAGE: '/login', // examples: '/login', '/registration' ORGANIZATION: 'https://ocelot.social', SUPPORT: 'https://ocelot.social', - // on null or empty strings internal imprint is used, see 'webapp/locales/html/' + // on null or empty strings internal pages are used, see 'webapp/locales/html/' + // you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ DONATE: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly IMPRINT: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly TERMS_AND_CONDITIONS: null, diff --git a/webapp/middleware/authenticated.js b/webapp/middleware/authenticated.js index 3ea915bcc..1df2d4b11 100644 --- a/webapp/middleware/authenticated.js +++ b/webapp/middleware/authenticated.js @@ -1,4 +1,5 @@ import isEmpty from 'lodash/isEmpty' +import links from '~/constants/links.js' export default async ({ store, env, route, redirect }) => { const publicPages = env.publicPages @@ -22,5 +23,5 @@ export default async ({ store, env, route, redirect }) => { params.path = route.path } - return redirect('/registration', params) + return redirect(links.LANDING_PAGE, params) } From cd6f4d80789e1d1f918e0c8d8cdd0f6713c05169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 19 Jul 2021 15:51:26 +0200 Subject: [PATCH 2/9] Refined HTML of internal pages --- webapp/locales/html/de/code-of-conduct.html | 4 +++- webapp/locales/html/de/data-privacy.html | 4 +++- webapp/locales/html/de/faq.html | 4 +++- webapp/locales/html/de/imprint.html | 4 +++- webapp/locales/html/de/terms-and-conditions.html | 4 +++- webapp/locales/html/en/code-of-conduct.html | 4 +++- webapp/locales/html/en/data-privacy.html | 4 +++- webapp/locales/html/en/faq.html | 4 +++- webapp/locales/html/en/imprint.html | 4 +++- webapp/locales/html/en/terms-and-conditions.html | 4 +++- 10 files changed, 30 insertions(+), 10 deletions(-) diff --git a/webapp/locales/html/de/code-of-conduct.html b/webapp/locales/html/de/code-of-conduct.html index dda9c276e..d8da73234 100644 --- a/webapp/locales/html/de/code-of-conduct.html +++ b/webapp/locales/html/de/code-of-conduct.html @@ -1,3 +1,5 @@ - + + +

Ich bin der Inhalt vom Verhaltenskodex

diff --git a/webapp/locales/html/de/data-privacy.html b/webapp/locales/html/de/data-privacy.html index 3e1cc4d08..0b685cad6 100644 --- a/webapp/locales/html/de/data-privacy.html +++ b/webapp/locales/html/de/data-privacy.html @@ -1,3 +1,5 @@ - + + +

Das hier wäre der Inhalt der Datenschutzbestimmungen

diff --git a/webapp/locales/html/de/faq.html b/webapp/locales/html/de/faq.html index 6b04c72aa..bcd874a9b 100644 --- a/webapp/locales/html/de/faq.html +++ b/webapp/locales/html/de/faq.html @@ -1,3 +1,5 @@ - + + +

Hier stehen die FAQs

diff --git a/webapp/locales/html/de/imprint.html b/webapp/locales/html/de/imprint.html index 4cd4eafa4..24ad35c30 100644 --- a/webapp/locales/html/de/imprint.html +++ b/webapp/locales/html/de/imprint.html @@ -1,3 +1,5 @@ - + + +

Ich bin das Impressum

diff --git a/webapp/locales/html/de/terms-and-conditions.html b/webapp/locales/html/de/terms-and-conditions.html index 87bdaf672..3f27c8503 100644 --- a/webapp/locales/html/de/terms-and-conditions.html +++ b/webapp/locales/html/de/terms-and-conditions.html @@ -1,3 +1,5 @@ - + + +

Ich bin der Inhalt der Seite "Nutzungsbedingungen"

diff --git a/webapp/locales/html/en/code-of-conduct.html b/webapp/locales/html/en/code-of-conduct.html index b6d8ca55a..e28ea2e5c 100644 --- a/webapp/locales/html/en/code-of-conduct.html +++ b/webapp/locales/html/en/code-of-conduct.html @@ -1,3 +1,5 @@ - + + +

I am the content of the code of conduct

diff --git a/webapp/locales/html/en/data-privacy.html b/webapp/locales/html/en/data-privacy.html index 5a6c5d86f..028fb118d 100644 --- a/webapp/locales/html/en/data-privacy.html +++ b/webapp/locales/html/en/data-privacy.html @@ -1,3 +1,5 @@ - + + +

This would be our data privacy section

diff --git a/webapp/locales/html/en/faq.html b/webapp/locales/html/en/faq.html index c8a173b37..d8c3f67ef 100644 --- a/webapp/locales/html/en/faq.html +++ b/webapp/locales/html/en/faq.html @@ -1,3 +1,5 @@ - + + +

Here are the FAQs

diff --git a/webapp/locales/html/en/imprint.html b/webapp/locales/html/en/imprint.html index 03fa2f136..e87701d0f 100644 --- a/webapp/locales/html/en/imprint.html +++ b/webapp/locales/html/en/imprint.html @@ -1,3 +1,5 @@ - + + +

I am the imprint

diff --git a/webapp/locales/html/en/terms-and-conditions.html b/webapp/locales/html/en/terms-and-conditions.html index a93ad6642..451e054f4 100644 --- a/webapp/locales/html/en/terms-and-conditions.html +++ b/webapp/locales/html/en/terms-and-conditions.html @@ -1,3 +1,5 @@ - + + +

I am the content of the page "terms and conditions"

From c3a5efcc7212ebb90e683e6681ae8e81072c9d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 20 Jul 2021 10:14:15 +0200 Subject: [PATCH 3/9] Fix error for not viewing FAQs page without login --- webapp/nuxt.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js index 1d38a3a0a..cd929c14d 100644 --- a/webapp/nuxt.config.js +++ b/webapp/nuxt.config.js @@ -42,6 +42,7 @@ export default { 'changelog', 'imprint', 'data-privacy', + 'faq', ], // pages to keep alive keepAlivePages: ['index'], From 65450d289d2fe36b324133d06506f14ad0e43786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 20 Jul 2021 11:04:01 +0200 Subject: [PATCH 4/9] Add dot at line ends of HTML internal pages --- webapp/locales/html/de/code-of-conduct.html | 2 +- webapp/locales/html/de/data-privacy.html | 2 +- webapp/locales/html/de/faq.html | 2 +- webapp/locales/html/de/imprint.html | 2 +- webapp/locales/html/de/terms-and-conditions.html | 2 +- webapp/locales/html/en/code-of-conduct.html | 2 +- webapp/locales/html/en/data-privacy.html | 2 +- webapp/locales/html/en/faq.html | 2 +- webapp/locales/html/en/imprint.html | 2 +- webapp/locales/html/en/terms-and-conditions.html | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/webapp/locales/html/de/code-of-conduct.html b/webapp/locales/html/de/code-of-conduct.html index d8da73234..96ac29482 100644 --- a/webapp/locales/html/de/code-of-conduct.html +++ b/webapp/locales/html/de/code-of-conduct.html @@ -2,4 +2,4 @@
-

Ich bin der Inhalt vom Verhaltenskodex

+

Ich bin der Inhalt vom Verhaltenskodex.

diff --git a/webapp/locales/html/de/data-privacy.html b/webapp/locales/html/de/data-privacy.html index 0b685cad6..cdfe50ac9 100644 --- a/webapp/locales/html/de/data-privacy.html +++ b/webapp/locales/html/de/data-privacy.html @@ -2,4 +2,4 @@
-

Das hier wäre der Inhalt der Datenschutzbestimmungen

+

Das hier wäre der Inhalt der Datenschutzbestimmungen.

diff --git a/webapp/locales/html/de/faq.html b/webapp/locales/html/de/faq.html index bcd874a9b..db20366ef 100644 --- a/webapp/locales/html/de/faq.html +++ b/webapp/locales/html/de/faq.html @@ -2,4 +2,4 @@
-

Hier stehen die FAQs

+

Hier stehen die FAQs.

diff --git a/webapp/locales/html/de/imprint.html b/webapp/locales/html/de/imprint.html index 24ad35c30..fc610d802 100644 --- a/webapp/locales/html/de/imprint.html +++ b/webapp/locales/html/de/imprint.html @@ -2,4 +2,4 @@
-

Ich bin das Impressum

+

Ich bin das Impressum.

diff --git a/webapp/locales/html/de/terms-and-conditions.html b/webapp/locales/html/de/terms-and-conditions.html index 3f27c8503..3a3c76775 100644 --- a/webapp/locales/html/de/terms-and-conditions.html +++ b/webapp/locales/html/de/terms-and-conditions.html @@ -2,4 +2,4 @@
-

Ich bin der Inhalt der Seite "Nutzungsbedingungen"

+

Ich bin der Inhalt der Seite "Nutzungsbedingungen".

diff --git a/webapp/locales/html/en/code-of-conduct.html b/webapp/locales/html/en/code-of-conduct.html index e28ea2e5c..f971a2c31 100644 --- a/webapp/locales/html/en/code-of-conduct.html +++ b/webapp/locales/html/en/code-of-conduct.html @@ -2,4 +2,4 @@
-

I am the content of the code of conduct

+

I am the content of the code of conduct.

diff --git a/webapp/locales/html/en/data-privacy.html b/webapp/locales/html/en/data-privacy.html index 028fb118d..1383a0870 100644 --- a/webapp/locales/html/en/data-privacy.html +++ b/webapp/locales/html/en/data-privacy.html @@ -2,4 +2,4 @@
-

This would be our data privacy section

+

This would be our data privacy section.

diff --git a/webapp/locales/html/en/faq.html b/webapp/locales/html/en/faq.html index d8c3f67ef..0ed093fa9 100644 --- a/webapp/locales/html/en/faq.html +++ b/webapp/locales/html/en/faq.html @@ -2,4 +2,4 @@
-

Here are the FAQs

+

Here are the FAQs.

diff --git a/webapp/locales/html/en/imprint.html b/webapp/locales/html/en/imprint.html index e87701d0f..3f85b6e86 100644 --- a/webapp/locales/html/en/imprint.html +++ b/webapp/locales/html/en/imprint.html @@ -2,4 +2,4 @@
-

I am the imprint

+

I am the imprint.

diff --git a/webapp/locales/html/en/terms-and-conditions.html b/webapp/locales/html/en/terms-and-conditions.html index 451e054f4..a34211eda 100644 --- a/webapp/locales/html/en/terms-and-conditions.html +++ b/webapp/locales/html/en/terms-and-conditions.html @@ -2,4 +2,4 @@
-

I am the content of the page "terms and conditions"

+

I am the content of the page "Terms And Conditions".

From 3b214c9db96558d8bb16bd9e28d90c1adf880c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 20 Jul 2021 11:33:44 +0200 Subject: [PATCH 5/9] Implement HTML internal support and organization pages --- backend/src/config/links.js | 10 ++--- .../components/PageFooter/PageFooter.spec.js | 38 ++++++++++--------- webapp/components/PageFooter/PageFooter.vue | 5 ++- webapp/constants/links.js | 10 ++--- webapp/locales/de.json | 1 + webapp/locales/en.json | 1 + webapp/locales/html/de/index.js | 4 ++ webapp/locales/html/de/organization.html | 5 +++ webapp/locales/html/de/support.html | 5 +++ webapp/locales/html/en/index.js | 4 ++ webapp/locales/html/en/organization.html | 5 +++ webapp/locales/html/en/support.html | 5 +++ webapp/nuxt.config.js | 2 + webapp/pages/organization.spec.js | 38 +++++++++++++++++++ webapp/pages/organization.vue | 21 ++++++++++ webapp/pages/support.spec.js | 38 +++++++++++++++++++ webapp/pages/support.vue | 21 ++++++++++ 17 files changed, 185 insertions(+), 28 deletions(-) create mode 100644 webapp/locales/html/de/organization.html create mode 100644 webapp/locales/html/de/support.html create mode 100644 webapp/locales/html/en/organization.html create mode 100644 webapp/locales/html/en/support.html create mode 100644 webapp/pages/organization.spec.js create mode 100644 webapp/pages/organization.vue create mode 100644 webapp/pages/support.spec.js create mode 100644 webapp/pages/support.vue diff --git a/backend/src/config/links.js b/backend/src/config/links.js index f8de671f0..4a55fc56e 100644 --- a/backend/src/config/links.js +++ b/backend/src/config/links.js @@ -1,11 +1,11 @@ -// this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding +// this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/constants/ export default { - LANDING_PAGE: '/login', // examples: '/login', '/registration' - ORGANIZATION: 'https://ocelot.social', - SUPPORT: 'https://ocelot.social', - + LANDING_PAGE: '/login', // examples: '/login', '/registration', '/organization' + SUPPORT: 'https://ocelot.social', // example for internal support page: 'https://staging.ocelot.social/support' + // on null or empty strings internal pages are used, see 'webapp/locales/html/' // you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ + ORGANIZATION: 'https://ocelot.social', DONATE: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly IMPRINT: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly TERMS_AND_CONDITIONS: null, diff --git a/webapp/components/PageFooter/PageFooter.spec.js b/webapp/components/PageFooter/PageFooter.spec.js index 53aaaa073..02e788737 100644 --- a/webapp/components/PageFooter/PageFooter.spec.js +++ b/webapp/components/PageFooter/PageFooter.spec.js @@ -47,12 +47,8 @@ describe('PageFooter.vue', () => { wrapper = Wrapper() }) - it('renders ORGANIZATION', () => { - expect(wrapper.find('a[data-test="organization-link"]').exists()).toBe(true) - }) - it('renders version', () => { - expect(wrapper.find('a[data-test="version-link"]').exists()).toBe(true) + expect(wrapper.find('a[data-test="version-link"]').exists()).toBeTruthy() }) }) @@ -60,6 +56,7 @@ describe('PageFooter.vue', () => { beforeEach(async () => { const links = { ...linksDefault, + ORGANIZATION: null, IMPRINT: null, TERMS_AND_CONDITIONS: null, CODE_OF_CONDUCT: null, @@ -71,24 +68,28 @@ describe('PageFooter.vue', () => { await wrapper.vm.$nextTick() }) + it('renders ORGANIZATION as nuxt-link', () => { + expect(wrapper.find('span[data-test="organization-nuxt-link"]').exists()).toBeTruthy() + }) + it('renders IMPRINT as nuxt-link', () => { - expect(wrapper.find('span[data-test="imprint-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="imprint-nuxt-link"]').exists()).toBeTruthy() }) it('renders TERMS_AND_CONDITIONS as nuxt-link', () => { - expect(wrapper.find('span[data-test="terms-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="terms-nuxt-link"]').exists()).toBeTruthy() }) it('renders CODE_OF_CONDUCT as nuxt-link', () => { - expect(wrapper.find('span[data-test="code-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="code-nuxt-link"]').exists()).toBeTruthy() }) it('renders DATA_PRIVACY as nuxt-link', () => { - expect(wrapper.find('span[data-test="data-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="data-nuxt-link"]').exists()).toBeTruthy() }) it('renders FAQ as nuxt-link', () => { - expect(wrapper.find('span[data-test="faq-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="faq-nuxt-link"]').exists()).toBeTruthy() }) }) @@ -96,6 +97,7 @@ describe('PageFooter.vue', () => { beforeEach(async () => { const links = { ...linksDefault, + ORGANIZATION: 'https://ocelot.social', IMPRINT: 'https://ocelot.social/IMPRINT', TERMS_AND_CONDITIONS: 'https://ocelot.social/TERMS_AND_CONDITIONS', CODE_OF_CONDUCT: 'https://ocelot.social/CODE_OF_CONDUCT', @@ -107,26 +109,28 @@ describe('PageFooter.vue', () => { await wrapper.vm.$nextTick() }) + it('renders ORGANIZATION as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social"]`).exists()).toBeTruthy() + }) + it('renders IMPRINT as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/IMPRINT"]`).exists()).toBe(true) + expect(wrapper.find(`a[href="https://ocelot.social/IMPRINT"]`).exists()).toBeTruthy() }) it('renders TERMS_AND_CONDITIONS as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/TERMS_AND_CONDITIONS"]`).exists()).toBe( - true, - ) + expect(wrapper.find(`a[href="https://ocelot.social/TERMS_AND_CONDITIONS"]`).exists()).toBeTruthy() }) it('renders CODE_OF_CONDUCT as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/CODE_OF_CONDUCT"]`).exists()).toBe(true) + expect(wrapper.find(`a[href="https://ocelot.social/CODE_OF_CONDUCT"]`).exists()).toBeTruthy() }) it('renders DATA_PRIVACY as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/DATA_PRIVACY"]`).exists()).toBe(true) + expect(wrapper.find(`a[href="https://ocelot.social/DATA_PRIVACY"]`).exists()).toBeTruthy() }) it('renders FAQ as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/FAQ"]`).exists()).toBe(true) + expect(wrapper.find(`a[href="https://ocelot.social/FAQ"]`).exists()).toBeTruthy() }) }) }) diff --git a/webapp/components/PageFooter/PageFooter.vue b/webapp/components/PageFooter/PageFooter.vue index e31bc3e2a..ab7ab576b 100644 --- a/webapp/components/PageFooter/PageFooter.vue +++ b/webapp/components/PageFooter/PageFooter.vue @@ -1,7 +1,10 @@