From 0bdedfc5bc19de08a6f28a215c9317cdd8612267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 28 Jul 2021 15:15:59 +0200 Subject: [PATCH 01/21] Create sender.fm internal organization page --- webapp/locales/html/de/organization.html | 77 +++++++++++++++++++++++- webapp/locales/html/en/organization.html | 77 +++++++++++++++++++++++- 2 files changed, 152 insertions(+), 2 deletions(-) diff --git a/webapp/locales/html/de/organization.html b/webapp/locales/html/de/organization.html index e3c2811f4..c63df9929 100644 --- a/webapp/locales/html/de/organization.html +++ b/webapp/locales/html/de/organization.html @@ -2,4 +2,79 @@
-

Hier wird das Netzwerk beschrieben.

+

+ sender.fm +

+ +

+ Hier wird sender.fm in Zukunft vorgestellt … +

+ +
+

+ Unser Radio-Stream +

+
+ + +
+

+ Sende-Wochenplan +

+ +
+
+ + + + diff --git a/webapp/locales/html/en/organization.html b/webapp/locales/html/en/organization.html index 377fb0ba6..3ae6a69b8 100644 --- a/webapp/locales/html/en/organization.html +++ b/webapp/locales/html/en/organization.html @@ -2,4 +2,79 @@
-

Here the network is described.

+

+ sender.fm +

+ +

+ Here sender.fm will be described in the future … +

+ +
+

+ Our Radio Stream +

+
+ + +
+

+ Radio Weekly Plan +

+ +
+
+ + + + From 0b1bdc495fb6f1231af560e7bedded1a8b591dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 29 Jul 2021 16:54:20 +0200 Subject: [PATCH 02/21] Implement configuration of internal pages --- backend/src/config/links.js | 3 +- webapp/constants/links.js | 140 ++++++++++++++++++++++++++--- webapp/locales/de.json | 1 + webapp/locales/en.json | 1 + webapp/locales/html/de/donate.html | 5 ++ webapp/locales/html/de/index.js | 2 + webapp/locales/html/en/donate.html | 5 ++ webapp/locales/html/en/index.js | 2 + webapp/nuxt.config.js | 1 + webapp/pages/donate.spec.js | 38 ++++++++ webapp/pages/donate.vue | 21 +++++ 11 files changed, 207 insertions(+), 12 deletions(-) create mode 100644 webapp/locales/html/de/donate.html create mode 100644 webapp/locales/html/en/donate.html create mode 100644 webapp/pages/donate.spec.js create mode 100644 webapp/pages/donate.vue diff --git a/backend/src/config/links.js b/backend/src/config/links.js index b111726f3..07b97aa60 100644 --- a/backend/src/config/links.js +++ b/backend/src/config/links.js @@ -1,6 +1,7 @@ // 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', or external 'https://ocelot.social' + // Wolle LANDING_PAGE: '/login', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social' + LANDING_PAGE: '/organization', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social' // you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ diff --git a/webapp/constants/links.js b/webapp/constants/links.js index b111726f3..aa96fc2f3 100644 --- a/webapp/constants/links.js +++ b/webapp/constants/links.js @@ -1,17 +1,135 @@ // 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', or external 'https://ocelot.social' - // you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ +const ORGANIZATION = { + name: 'organization', + + // Wolle externalLink: 'https://ocelot.social', + externalLink: null, // if string is defined and not empty it's dominating + + // in case internal page content is here 'webapp/locales/html/' + internalLink: '/organization', // static, don't change! internal page in case no external is defined + internalPage: { + footerIdent: 'site.made', // localized string identifier + // Wolle headlineIdent: null, // on null default is used, on empty string it's hidden + headlineIdent: '', // localized string identifier. on null default is used, on empty string it's hidden + hasBaseCard: true, + hasLoginInHeader: true, + }, +} +const DONATE = { + name: 'donate', + + // Wolle externalLink: '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 + externalLink: '', // if string is defined and not empty it's dominating + + // in case internal page content is here 'webapp/locales/html/' + internalLink: '/donate', // static, don't change! internal page in case no external is defined + internalPage: { + footerIdent: 'site.donate', // localized string identifier + headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden + hasBaseCard: true, + hasLoginInHeader: true, + }, +} +const IMPRINT = { + name: 'imprint', + + // Wolle externalLink: '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 + externalLink: '', // if string is defined and not empty it's dominating + + // in case internal page content is here 'webapp/locales/html/' + internalLink: '/imprint', // static, don't change! internal page in case no external is defined + internalPage: { + footerIdent: 'site.imprint', // localized string identifier + headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden + hasBaseCard: true, + hasLoginInHeader: true, + }, +} +const TERMS_AND_CONDITIONS = { + name: 'terms-and-conditions', + + externalLink: null, // if string is defined and not empty it's dominating + + // in case internal page content is here 'webapp/locales/html/' + internalLink: '/terms-and-conditions', // static, don't change! internal page in case no external is defined + internalPage: { + footerIdent: 'site.termsAndConditions', // localized string identifier + headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden + hasBaseCard: true, + hasLoginInHeader: true, + }, +} +const CODE_OF_CONDUCT = { + name: 'code-of-conduct', + + externalLink: null, // if string is defined and not empty it's dominating + + // in case internal page content is here 'webapp/locales/html/' + internalLink: '/code-of-conduct', // static, don't change! internal page in case no external is defined + internalPage: { + footerIdent: 'site.code-of-conduct', // localized string identifier + headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden + hasBaseCard: true, + hasLoginInHeader: true, + }, +} +const DATA_PRIVACY = { + name: 'data-privacy', + + externalLink: null, // if string is defined and not empty it's dominating + + // in case internal page content is here 'webapp/locales/html/' + internalLink: '/data-privacy', // static, don't change! internal page in case no external is defined + internalPage: { + footerIdent: 'site.data-privacy', // localized string identifier + headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden + hasBaseCard: true, + hasLoginInHeader: true, + }, +} +const FAQ = { + name: 'faq', + + // Wolle externalLink: 'https://ocelot.social', + externalLink: null, // if string is defined and not empty it's dominating + + // in case internal page content is here 'webapp/locales/html/' + internalLink: '/faq', // static, don't change! internal page in case no external is defined + internalPage: { + footerIdent: 'site.faq', // localized string identifier + // Wolle headlineIdent: null, // on null default is used, on empty string it's hidden + headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden + hasBaseCard: true, + hasLoginInHeader: true, + }, +} + +export default { + // Wolle LANDING_PAGE: '/login', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social' + LANDING_PAGE: '/organization', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social' + + // you can find and store templates for 👇🏼 at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ SUPPORT: 'https://ocelot.social', // example for internal support page: 'https://staging.ocelot.social/support'. set a full URL please, because it is used in e-mails as well! - // on null or empty strings internal pages are used, see 'webapp/locales/html/' - 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, - CODE_OF_CONDUCT: null, - DATA_PRIVACY: null, - FAQ: 'https://ocelot.social', + ORGANIZATION, + DONATE, + IMPRINT, + TERMS_AND_CONDITIONS, + CODE_OF_CONDUCT, + DATA_PRIVACY, + FAQ, + + FOOTER_LINK_LIST: [ + ORGANIZATION, + TERMS_AND_CONDITIONS, + CODE_OF_CONDUCT, + DATA_PRIVACY, + FAQ, + // DONATE, + // Wolle + DONATE, + IMPRINT, + ], } diff --git a/webapp/locales/de.json b/webapp/locales/de.json index de8e98888..aa63d455a 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -781,6 +781,7 @@ "contact": "Kontakt", "data-privacy": "Datenschutzerklärung", "director": "Geschäftsführer", + "donate": "Spenden", "error-occurred": "Ein Fehler ist aufgetreten.", "faq": "FAQ", "germany": "Deutschland", diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 0ad660272..06086f04d 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -781,6 +781,7 @@ "contact": "Contact", "data-privacy": "Data privacy", "director": "Managing Director", + "donate": "Donate", "error-occurred": "An error occurred.", "faq": "FAQ", "germany": "Germany", diff --git a/webapp/locales/html/de/donate.html b/webapp/locales/html/de/donate.html new file mode 100644 index 000000000..773c5db32 --- /dev/null +++ b/webapp/locales/html/de/donate.html @@ -0,0 +1,5 @@ + + + +
+

Hier steht was zu den Spenden.

diff --git a/webapp/locales/html/de/index.js b/webapp/locales/html/de/index.js index 4daae480e..341ab9bdd 100644 --- a/webapp/locales/html/de/index.js +++ b/webapp/locales/html/de/index.js @@ -5,6 +5,7 @@ import codeOfConduct from './code-of-conduct.html' import dataPrivacy from './data-privacy.html' import faq from './faq.html' import imprint from './imprint.html' +import donate from './donate.html' export default { organization, @@ -14,4 +15,5 @@ export default { dataPrivacy, faq, imprint, + donate, } diff --git a/webapp/locales/html/en/donate.html b/webapp/locales/html/en/donate.html new file mode 100644 index 000000000..c82001587 --- /dev/null +++ b/webapp/locales/html/en/donate.html @@ -0,0 +1,5 @@ + + + +
+

Here's what it says about donations.

diff --git a/webapp/locales/html/en/index.js b/webapp/locales/html/en/index.js index 4daae480e..341ab9bdd 100644 --- a/webapp/locales/html/en/index.js +++ b/webapp/locales/html/en/index.js @@ -5,6 +5,7 @@ import codeOfConduct from './code-of-conduct.html' import dataPrivacy from './data-privacy.html' import faq from './faq.html' import imprint from './imprint.html' +import donate from './donate.html' export default { organization, @@ -14,4 +15,5 @@ export default { dataPrivacy, faq, imprint, + donate, } diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js index 08eb66989..b4fc3aa7c 100644 --- a/webapp/nuxt.config.js +++ b/webapp/nuxt.config.js @@ -45,6 +45,7 @@ export default { 'imprint', 'data-privacy', 'faq', + 'donate', ], // pages to keep alive keepAlivePages: ['index'], diff --git a/webapp/pages/donate.spec.js b/webapp/pages/donate.spec.js new file mode 100644 index 000000000..2fae9d67a --- /dev/null +++ b/webapp/pages/donate.spec.js @@ -0,0 +1,38 @@ +import { mount } from '@vue/test-utils' +import Donate from './donate.vue' +import VueMeta from 'vue-meta' + +const localVue = global.localVue +localVue.use(VueMeta, { keyName: 'head' }) + +describe('donate.vue', () => { + let wrapper + let mocks + + beforeEach(() => { + mocks = { + $t: (t) => t, + } + }) + + describe('mount', () => { + const Wrapper = () => { + return mount(Donate, { + mocks, + localVue, + }) + } + + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders', () => { + expect(wrapper.is('div')).toBe(true) + }) + + it('has correct content', () => { + expect(wrapper.vm.$metaInfo.title).toBe('site.donate') + }) + }) +}) diff --git a/webapp/pages/donate.vue b/webapp/pages/donate.vue new file mode 100644 index 000000000..a3e25bb46 --- /dev/null +++ b/webapp/pages/donate.vue @@ -0,0 +1,21 @@ + + + From 59dd7ba104008754827464ea0bdcd585849a9d38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 29 Jul 2021 16:54:52 +0200 Subject: [PATCH 03/21] Implement configuration of footer link list --- .../components/PageFooter/PageFooter.spec.js | 30 +++---- webapp/components/PageFooter/PageFooter.vue | 89 ++++--------------- webapp/components/utils/InternalPages.js | 7 ++ 3 files changed, 40 insertions(+), 86 deletions(-) create mode 100644 webapp/components/utils/InternalPages.js diff --git a/webapp/components/PageFooter/PageFooter.spec.js b/webapp/components/PageFooter/PageFooter.spec.js index a7349496b..d82d03982 100644 --- a/webapp/components/PageFooter/PageFooter.spec.js +++ b/webapp/components/PageFooter/PageFooter.spec.js @@ -56,12 +56,12 @@ describe('PageFooter.vue', () => { beforeEach(async () => { const links = { ...linksDefault, - ORGANIZATION: null, - IMPRINT: null, - TERMS_AND_CONDITIONS: null, - CODE_OF_CONDUCT: null, - DATA_PRIVACY: null, - FAQ: null, + ORGANIZATION: { ...linksDefault.ORGANIZATION, externalLink: null }, + IMPRINT: { ...linksDefault.IMPRINT, externalLink: null }, + TERMS_AND_CONDITIONS: { ...linksDefault.TERMS_AND_CONDITIONS, externalLink: null }, + CODE_OF_CONDUCT: { ...linksDefault.CODE_OF_CONDUCT, externalLink: null }, + DATA_PRIVACY: { ...linksDefault.DATA_PRIVACY, externalLink: null }, + FAQ: { ...linksDefault.FAQ, externalLink: null }, } wrapper = Wrapper() wrapper.setData({ links }) @@ -77,15 +77,15 @@ describe('PageFooter.vue', () => { }) it('renders TERMS_AND_CONDITIONS as nuxt-link', () => { - expect(wrapper.find('span[data-test="terms-nuxt-link"]').exists()).toBeTruthy() + expect(wrapper.find('span[data-test="terms-and-conditions-nuxt-link"]').exists()).toBeTruthy() }) it('renders CODE_OF_CONDUCT as nuxt-link', () => { - expect(wrapper.find('span[data-test="code-nuxt-link"]').exists()).toBeTruthy() + expect(wrapper.find('span[data-test="code-of-conduct-nuxt-link"]').exists()).toBeTruthy() }) it('renders DATA_PRIVACY as nuxt-link', () => { - expect(wrapper.find('span[data-test="data-nuxt-link"]').exists()).toBeTruthy() + expect(wrapper.find('span[data-test="data-privacy-nuxt-link"]').exists()).toBeTruthy() }) it('renders FAQ as nuxt-link', () => { @@ -97,12 +97,12 @@ 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', - DATA_PRIVACY: 'https://ocelot.social/DATA_PRIVACY', - FAQ: 'https://ocelot.social/FAQ', + ORGANIZATION: { ...linksDefault.ORGANIZATION, externalLink: 'https://ocelot.social' }, + IMPRINT: { ...linksDefault.IMPRINT, externalLink: 'https://ocelot.social/IMPRINT' }, + TERMS_AND_CONDITIONS: { ...linksDefault.TERMS_AND_CONDITIONS, externalLink: 'https://ocelot.social/TERMS_AND_CONDITIONS' }, + CODE_OF_CONDUCT: { ...linksDefault.CODE_OF_CONDUCT, externalLink: 'https://ocelot.social/CODE_OF_CONDUCT' }, + DATA_PRIVACY: { ...linksDefault.DATA_PRIVACY, externalLink: 'https://ocelot.social/DATA_PRIVACY' }, + FAQ: { ...linksDefault.FAQ, externalLink: 'https://ocelot.social/FAQ' }, } wrapper = Wrapper() wrapper.setData({ links }) diff --git a/webapp/components/PageFooter/PageFooter.vue b/webapp/components/PageFooter/PageFooter.vue index 6bf049b05..89e2d60d3 100644 --- a/webapp/components/PageFooter/PageFooter.vue +++ b/webapp/components/PageFooter/PageFooter.vue @@ -1,69 +1,19 @@ diff --git a/webapp/components/Registration/RegistrationSlider.vue b/webapp/components/Registration/RegistrationSlider.vue index 2e297bc86..818f6c5e9 100644 --- a/webapp/components/Registration/RegistrationSlider.vue +++ b/webapp/components/Registration/RegistrationSlider.vue @@ -2,7 +2,7 @@