@@ -48,6 +48,7 @@ import metadata from '~/constants/metadata.js'
import ComponentSlider from '~/components/ComponentSlider/ComponentSlider'
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
import Logo from '~/components/Logo/Logo'
+import PageParamsLink from '~/components/_new/features/PageParamsLink/PageParamsLink.vue'
import RegistrationSlideCreate from './RegistrationSlideCreate'
import RegistrationSlideEmail from './RegistrationSlideEmail'
import RegistrationSlideInvite from './RegistrationSlideInvite'
@@ -60,6 +61,7 @@ export default {
ComponentSlider,
LocaleSwitch,
Logo,
+ PageParamsLink,
RegistrationSlideCreate,
RegistrationSlideEmail,
RegistrationSlideInvite,
diff --git a/webapp/components/_new/features/InternalPage/InternalPage.vue b/webapp/components/_new/features/InternalPage/InternalPage.vue
new file mode 100644
index 000000000..99982e89b
--- /dev/null
+++ b/webapp/components/_new/features/InternalPage/InternalPage.vue
@@ -0,0 +1,34 @@
+
+
+
+
+ {{ $t(pageParams.internalPage.headlineIdent) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/webapp/components/_new/features/PageParamsLink/PageParamsLink.vue b/webapp/components/_new/features/PageParamsLink/PageParamsLink.vue
new file mode 100644
index 000000000..ae01dd319
--- /dev/null
+++ b/webapp/components/_new/features/PageParamsLink/PageParamsLink.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/webapp/components/utils/InternalPages.js b/webapp/components/utils/InternalPages.js
new file mode 100644
index 000000000..f45601af9
--- /dev/null
+++ b/webapp/components/utils/InternalPages.js
@@ -0,0 +1,140 @@
+import { PageParams } from '~/components/utils/PageParams.js'
+
+export const defaultPageParamsPages = {
+ ORGANIZATION: new PageParams({
+ name: 'organization',
+
+ externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ pageRoute: '/organization', // static, don't change! internal page in case no external is defined
+ footerIdent: 'site.made', // localized string identifier
+ headTitleIdent: 'site.made', // localized string identifier
+ headlineIdent: 'site.made', // localized string identifier. on null it's hidden, on empty string default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ htmlIdent: 'html.organization',
+ },
+ }),
+ DONATE: new PageParams({
+ name: 'donate',
+
+ externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ pageRoute: '/donate', // static, don't change! internal page in case no external is defined
+ footerIdent: 'site.donate', // localized string identifier
+ headTitleIdent: 'site.donate', // localized string identifier
+ headlineIdent: 'site.donate', // localized string identifier. on null it's hidden, on empty string default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ htmlIdent: 'html.donate',
+ },
+ }),
+ IMPRINT: new PageParams({
+ name: 'imprint',
+
+ externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ pageRoute: '/imprint', // static, don't change! internal page in case no external is defined
+ footerIdent: 'site.imprint', // localized string identifier
+ headTitleIdent: 'site.imprint', // localized string identifier
+ headlineIdent: 'site.imprint', // localized string identifier. on null it's hidden, on empty string default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ htmlIdent: 'html.imprint',
+ },
+ }),
+ TERMS_AND_CONDITIONS: new PageParams({
+ name: 'terms-and-conditions',
+
+ externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ pageRoute: '/terms-and-conditions', // static, don't change! internal page in case no external is defined
+ footerIdent: 'site.termsAndConditions', // localized string identifier
+ headTitleIdent: 'site.termsAndConditions', // localized string identifier
+ headlineIdent: 'site.termsAndConditions', // localized string identifier. on null it's hidden, on empty string default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ htmlIdent: 'html.termsAndConditions',
+ },
+ }),
+ CODE_OF_CONDUCT: new PageParams({
+ name: 'code-of-conduct',
+
+ externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ pageRoute: '/code-of-conduct', // static, don't change! internal page in case no external is defined
+ footerIdent: 'site.code-of-conduct', // localized string identifier
+ headTitleIdent: 'site.code-of-conduct', // localized string identifier
+ headlineIdent: 'site.code-of-conduct', // localized string identifier. on null it's hidden, on empty string default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ htmlIdent: 'html.codeOfConduct',
+ },
+ }),
+ DATA_PRIVACY: new PageParams({
+ name: 'data-privacy',
+
+ externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ pageRoute: '/data-privacy', // static, don't change! internal page in case no external is defined
+ footerIdent: 'site.data-privacy', // localized string identifier
+ headTitleIdent: 'site.data-privacy', // localized string identifier
+ headlineIdent: 'site.data-privacy', // localized string identifier. on null it's hidden, on empty string default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ htmlIdent: 'html.dataPrivacy',
+ },
+ }),
+ FAQ: new PageParams({
+ name: 'faq',
+
+ externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ pageRoute: '/faq', // static, don't change! internal page in case no external is defined
+ footerIdent: 'site.faq', // localized string identifier
+ headTitleIdent: 'site.faq', // localized string identifier
+ headlineIdent: 'site.faq', // localized string identifier. on null it's hidden, on empty string default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ htmlIdent: 'html.faq',
+ },
+ }),
+ SUPPORT: new PageParams({
+ name: 'support',
+
+ externalLink: null,
+
+ internalPage: {
+ pageRoute: '/support', // static, don't change '*/support'! internal page in case no external is defined
+ footerIdent: 'site.support', // localized string identifier
+ headTitleIdent: 'site.support', // localized string identifier
+ headlineIdent: 'site.support', // localized string identifier. on null it's hidden, on empty string default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ htmlIdent: 'html.support',
+ },
+ }),
+}
diff --git a/webapp/components/utils/PageParams.js b/webapp/components/utils/PageParams.js
new file mode 100644
index 000000000..9d1fc6dfe
--- /dev/null
+++ b/webapp/components/utils/PageParams.js
@@ -0,0 +1,41 @@
+export class PageParams {
+ constructor(pageParams) {
+ this.name = pageParams.name
+ this.externalLink = pageParams.externalLink
+ this.internalPage = pageParams.internalPage
+ }
+
+ overwrite(assignPageParams) {
+ const pageParams = this
+ if (assignPageParams.name !== undefined) {
+ pageParams.name = assignPageParams.name
+ }
+ if (assignPageParams.externalLink !== undefined) {
+ pageParams.externalLink = assignPageParams.externalLink
+ }
+ if (assignPageParams.internalPage !== undefined) {
+ pageParams.internalPage = { ...pageParams.internalPage, ...assignPageParams.internalPage }
+ }
+ return pageParams
+ }
+
+ noStringDefined(string) {
+ return !string || string.length === 0
+ }
+
+ get isInternalPage() {
+ return this.noStringDefined(this.externalLink)
+ }
+
+ get link() {
+ return this.isInternalPage ? this.internalPage.pageRoute : this.externalLink
+ }
+
+ redirectToPage(thisComponent) {
+ if (this.isInternalPage) {
+ thisComponent.$router.push(this.internalPage.pageRoute)
+ } else if (typeof window !== 'undefined') {
+ window.location.href = this.externalLink
+ }
+ }
+}
diff --git a/webapp/constants/emails.js b/webapp/constants/emails.js
index b7d188c67..34daaecb0 100644
--- a/webapp/constants/emails.js
+++ b/webapp/constants/emails.js
@@ -1,4 +1,8 @@
+// this file is duplicated in `backend/src/config/` and `webapp/constants/` and replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/constants/
export default {
- SUPPORT: 'devops@ocelot.social',
- MODERATION: 'devops@ocelot.social',
+ SUPPORT_EMAIL: 'devops@ocelot.social',
+ MODERATION_EMAIL: 'devops@ocelot.social',
+ // ATTENTION: the following links have to be defined even for internal pages with full URLs as example like 'https://staging.ocelot.social/support', because they are used in e-mails!
+ ORGANIZATION_LINK: 'https://ocelot.social',
+ SUPPORT_LINK: 'https://ocelot.social',
}
diff --git a/webapp/constants/links.js b/webapp/constants/links.js
index b111726f3..16d3d085f 100644
--- a/webapp/constants/links.js
+++ b/webapp/constants/links.js
@@ -1,17 +1,136 @@
-// 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/
+// this file is replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/constants/
+
+import { defaultPageParamsPages } from '~/components/utils/InternalPages.js'
+
+const ORGANIZATION = defaultPageParamsPages.ORGANIZATION.overwrite({
+ externalLink: 'https://ocelot.social', // if string is defined and not empty it's dominating
+
+ internalPage: {
+ // footerIdent: 'site.made', // localized string identifier, if undefined default is used
+ // headTitleIdent: 'site.made', // localized string identifier, if undefined default is used
+ // headlineIdent: 'site.made', // localized string identifier, on null it's hidden, if undefined default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ },
+})
+const DONATE = defaultPageParamsPages.DONATE.overwrite({
+ // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly
+ externalLink: 'https://ocelot-social.herokuapp.com/donations', // if string is defined and not empty it's dominating
+
+ internalPage: {
+ // footerIdent: 'site.donate', // localized string identifier, if undefined default is used
+ // headTitleIdent: 'site.donate', // localized string identifier, if undefined default is used
+ // headlineIdent: 'site.donate', // localized string identifier, on null it's hidden, if undefined default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ },
+})
+const IMPRINT = defaultPageParamsPages.IMPRINT.overwrite({
+ // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly
+ externalLink: 'https://ocelot-social.herokuapp.com/imprint', // if string is defined and not empty it's dominating
+
+ internalPage: {
+ // footerIdent: 'site.imprint', // localized string identifier, if undefined default is used
+ // headTitleIdent: 'site.imprint', // localized string identifier, if undefined default is used
+ // headlineIdent: 'site.imprint', // localized string identifier, on null it's hidden, if undefined default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ },
+})
+const TERMS_AND_CONDITIONS = defaultPageParamsPages.TERMS_AND_CONDITIONS.overwrite({
+ // externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ // footerIdent: 'site.termsAndConditions', // localized string identifier, if undefined default is used
+ // headTitleIdent: 'site.termsAndConditions', // localized string identifier, if undefined default is used
+ // headlineIdent: 'site.termsAndConditions', // localized string identifier, on null it's hidden, if undefined default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ },
+})
+const CODE_OF_CONDUCT = defaultPageParamsPages.CODE_OF_CONDUCT.overwrite({
+ // externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ // footerIdent: 'site.code-of-conduct', // localized string identifier, if undefined default is used
+ // headTitleIdent: 'site.code-of-conduct', // localized string identifier, if undefined default is used
+ // headlineIdent: 'site.code-of-conduct', // localized string identifier, on null it's hidden, if undefined default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ },
+})
+const DATA_PRIVACY = defaultPageParamsPages.DATA_PRIVACY.overwrite({
+ // externalLink: null, // if string is defined and not empty it's dominating
+
+ internalPage: {
+ // footerIdent: 'site.data-privacy', // localized string identifier, if undefined default is used
+ // headTitleIdent: 'site.data-privacy', // localized string identifier, if undefined default is used
+ // headlineIdent: 'site.data-privacy', // localized string identifier, on null it's hidden, if undefined default is used
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ },
+})
+const FAQ = defaultPageParamsPages.FAQ.overwrite({
+ externalLink: 'https://ocelot.social', // if string is defined and not empty it's dominating
+
+ internalPage: {
+ // footerIdent: 'site.faq', // localized string identifier, if undefined default is used
+ // headTitleIdent: 'site.faq', // localized string identifier, if undefined default is used
+ // headlineIdent: 'site.faq', // on null default is used, on empty string it's hidden
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ },
+})
+const SUPPORT = defaultPageParamsPages.SUPPORT.overwrite({
+ externalLink: 'https://ocelot.social', // if string is defined and not empty it's dominating
+
+ internalPage: {
+ // footerIdent: 'site.support', // localized string identifier, if undefined default is used
+ // headTitleIdent: 'site.support', // localized string identifier, if undefined default is used
+ // headlineIdent: 'site.support', // on null default is used, on empty string it's hidden
+ hasContainer: true,
+ hasBaseCard: true,
+ hasLoginInHeader: true,
+ // in case internal page content is here 'webapp/locales/html/'
+ },
+})
+
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/
+ // 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!
+ ORGANIZATION,
+ DONATE,
+ IMPRINT,
+ TERMS_AND_CONDITIONS,
+ CODE_OF_CONDUCT,
+ DATA_PRIVACY,
+ FAQ,
+ SUPPORT,
- // 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',
+ FOOTER_LINK_LIST: [
+ ORGANIZATION,
+ TERMS_AND_CONDITIONS,
+ CODE_OF_CONDUCT,
+ DATA_PRIVACY,
+ FAQ,
+ DONATE,
+ IMPRINT,
+ // SUPPORT,
+ ],
}
diff --git a/webapp/layouts/basic.spec.js b/webapp/layouts/basic.spec.js
index 5094a970b..f84195246 100644
--- a/webapp/layouts/basic.spec.js
+++ b/webapp/layouts/basic.spec.js
@@ -1,3 +1,4 @@
+import Vuex from 'vuex'
import { config, shallowMount } from '@vue/test-utils'
import Basic from './basic.vue'
@@ -8,16 +9,23 @@ config.stubs.nuxt = ''
describe('basic.vue', () => {
let wrapper
let mocks
+ let store
beforeEach(() => {
mocks = {
$t: jest.fn(),
}
+ store = new Vuex.Store({
+ getters: {
+ 'auth/isLoggedIn': () => true,
+ },
+ })
})
describe('shallow mount', () => {
const Wrapper = () => {
return shallowMount(Basic, {
+ store,
mocks,
localVue,
})
diff --git a/webapp/layouts/basic.vue b/webapp/layouts/basic.vue
index 01872868e..5eadb42af 100644
--- a/webapp/layouts/basic.vue
+++ b/webapp/layouts/basic.vue
@@ -10,7 +10,14 @@
-
+
+
+
+
+
+
+
+
@@ -26,18 +33,26 @@
+
+
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/code-of-conduct.html b/webapp/locales/html/de/code-of-conduct.html
index 96ac29482..bd0d41ba8 100644
--- a/webapp/locales/html/de/code-of-conduct.html
+++ b/webapp/locales/html/de/code-of-conduct.html
@@ -1,5 +1,4 @@
-
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 cdfe50ac9..a6fc04470 100644
--- a/webapp/locales/html/de/data-privacy.html
+++ b/webapp/locales/html/de/data-privacy.html
@@ -1,5 +1,4 @@
-
Das hier wäre der Inhalt der Datenschutzbestimmungen.
diff --git a/webapp/locales/html/de/donate.html b/webapp/locales/html/de/donate.html
new file mode 100644
index 000000000..70cf6e0bb
--- /dev/null
+++ b/webapp/locales/html/de/donate.html
@@ -0,0 +1,4 @@
+
+
+
+Hier steht was zu den Spenden.
diff --git a/webapp/locales/html/de/faq.html b/webapp/locales/html/de/faq.html
index db20366ef..da3b2447a 100644
--- a/webapp/locales/html/de/faq.html
+++ b/webapp/locales/html/de/faq.html
@@ -1,5 +1,4 @@
-
Hier stehen die FAQs.
diff --git a/webapp/locales/html/de/imprint.html b/webapp/locales/html/de/imprint.html
index fc610d802..82450b370 100644
--- a/webapp/locales/html/de/imprint.html
+++ b/webapp/locales/html/de/imprint.html
@@ -1,5 +1,4 @@
-
Ich bin das Impressum.
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/de/organization.html b/webapp/locales/html/de/organization.html
index e3c2811f4..6abd63a6e 100644
--- a/webapp/locales/html/de/organization.html
+++ b/webapp/locales/html/de/organization.html
@@ -1,5 +1,4 @@
-
Hier wird das Netzwerk beschrieben.
diff --git a/webapp/locales/html/de/support.html b/webapp/locales/html/de/support.html
index 65899c77b..081b6dbfa 100644
--- a/webapp/locales/html/de/support.html
+++ b/webapp/locales/html/de/support.html
@@ -1,5 +1,4 @@
-
Ich bin der Inhalt vom Support.
diff --git a/webapp/locales/html/de/terms-and-conditions.html b/webapp/locales/html/de/terms-and-conditions.html
index 3a3c76775..af6c023a3 100644
--- a/webapp/locales/html/de/terms-and-conditions.html
+++ b/webapp/locales/html/de/terms-and-conditions.html
@@ -1,5 +1,4 @@
-
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 f971a2c31..d3a9d7078 100644
--- a/webapp/locales/html/en/code-of-conduct.html
+++ b/webapp/locales/html/en/code-of-conduct.html
@@ -1,5 +1,4 @@
-
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 1383a0870..5c38928c8 100644
--- a/webapp/locales/html/en/data-privacy.html
+++ b/webapp/locales/html/en/data-privacy.html
@@ -1,5 +1,4 @@
-
This would be our data privacy section.
diff --git a/webapp/locales/html/en/donate.html b/webapp/locales/html/en/donate.html
new file mode 100644
index 000000000..82abaff6a
--- /dev/null
+++ b/webapp/locales/html/en/donate.html
@@ -0,0 +1,4 @@
+
+
+
+Here's what it says about donations.
diff --git a/webapp/locales/html/en/faq.html b/webapp/locales/html/en/faq.html
index 0ed093fa9..e87174838 100644
--- a/webapp/locales/html/en/faq.html
+++ b/webapp/locales/html/en/faq.html
@@ -1,5 +1,4 @@
-
Here are the FAQs.
diff --git a/webapp/locales/html/en/imprint.html b/webapp/locales/html/en/imprint.html
index 3f85b6e86..5f1cdae19 100644
--- a/webapp/locales/html/en/imprint.html
+++ b/webapp/locales/html/en/imprint.html
@@ -1,5 +1,4 @@
-
I am the imprint.
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/locales/html/en/organization.html b/webapp/locales/html/en/organization.html
index 377fb0ba6..2be0dc833 100644
--- a/webapp/locales/html/en/organization.html
+++ b/webapp/locales/html/en/organization.html
@@ -1,5 +1,4 @@
-
Here the network is described.
diff --git a/webapp/locales/html/en/support.html b/webapp/locales/html/en/support.html
index c663964b3..44b519e1d 100644
--- a/webapp/locales/html/en/support.html
+++ b/webapp/locales/html/en/support.html
@@ -1,5 +1,4 @@
-
I am the content of the support.
diff --git a/webapp/locales/html/en/terms-and-conditions.html b/webapp/locales/html/en/terms-and-conditions.html
index a34211eda..746851607 100644
--- a/webapp/locales/html/en/terms-and-conditions.html
+++ b/webapp/locales/html/en/terms-and-conditions.html
@@ -1,5 +1,4 @@
-
I am the content of the page "Terms And Conditions".
diff --git a/webapp/maintenance/source/pages/index.vue b/webapp/maintenance/source/pages/index.vue
index 2e2cdfe3b..c38041ca7 100644
--- a/webapp/maintenance/source/pages/index.vue
+++ b/webapp/maintenance/source/pages/index.vue
@@ -8,9 +8,19 @@
-
-
-
+
+
+
+
+
+
+
@@ -35,17 +45,20 @@
diff --git a/webapp/mixins/internalPageMixins.js b/webapp/mixins/internalPageMixins.js
new file mode 100644
index 000000000..2c2a517c4
--- /dev/null
+++ b/webapp/mixins/internalPageMixins.js
@@ -0,0 +1,26 @@
+import InternalPage from '~/components/_new/features/InternalPage/InternalPage.vue'
+
+export function internalPageMixins(pageParams) {
+ return {
+ layout: 'basic',
+ components: {
+ InternalPage,
+ },
+ data() {
+ return { pageParams }
+ },
+ head() {
+ return {
+ title: this.$t(this.pageParams.internalPage.headTitleIdent),
+ }
+ },
+ created() {
+ if (!this.pageParams.isInternalPage) {
+ // to avoid possible errors, because 'window' is only defined on browser side but not in NodeJS on client side. check for 'typeof window' is neccessary, because if it's not defined at all you can't check for 'window !== undefined' without the same error 'window is undefined'
+ if (typeof window !== 'undefined') {
+ window.location.href = this.pageParams.externalLink
+ }
+ }
+ },
+ }
+}
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/code-of-conduct.spec.js b/webapp/pages/code-of-conduct.spec.js
index 75e244c79..c050f65ba 100644
--- a/webapp/pages/code-of-conduct.spec.js
+++ b/webapp/pages/code-of-conduct.spec.js
@@ -5,6 +5,11 @@ import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
+// avoid: 'Error: Not implemented: navigation (except hash changes)', see https://stackoverflow.com/questions/54090231/how-to-fix-error-not-implemented-navigation-except-hash-changes
+const assignMock = jest.fn()
+delete window.location
+window.location = { assign: assignMock }
+
describe('code-of-conduct.vue', () => {
let wrapper
let mocks
@@ -28,7 +33,7 @@ describe('code-of-conduct.vue', () => {
})
it('renders', () => {
- expect(wrapper.is('div')).toBe(true)
+ expect(wrapper.is('div')).toBeTruthy()
})
it('has correct content', () => {
diff --git a/webapp/pages/code-of-conduct.vue b/webapp/pages/code-of-conduct.vue
index c3cf3bf54..3a3275c39 100644
--- a/webapp/pages/code-of-conduct.vue
+++ b/webapp/pages/code-of-conduct.vue
@@ -1,21 +1,12 @@
-
-
- {{ $t('site.code-of-conduct') }}
-
-
-
-
-
+
diff --git a/webapp/pages/data-privacy.spec.js b/webapp/pages/data-privacy.spec.js
index a919bb742..c5e4e4d62 100644
--- a/webapp/pages/data-privacy.spec.js
+++ b/webapp/pages/data-privacy.spec.js
@@ -5,6 +5,11 @@ import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
+// avoid: 'Error: Not implemented: navigation (except hash changes)', see https://stackoverflow.com/questions/54090231/how-to-fix-error-not-implemented-navigation-except-hash-changes
+const assignMock = jest.fn()
+delete window.location
+window.location = { assign: assignMock }
+
describe('data-privacy.vue', () => {
let wrapper
let mocks
@@ -28,7 +33,7 @@ describe('data-privacy.vue', () => {
})
it('renders', () => {
- expect(wrapper.is('div')).toBe(true)
+ expect(wrapper.is('div')).toBeTruthy()
})
it('has correct content', () => {
diff --git a/webapp/pages/data-privacy.vue b/webapp/pages/data-privacy.vue
index 236fa5eeb..31f86c9b8 100644
--- a/webapp/pages/data-privacy.vue
+++ b/webapp/pages/data-privacy.vue
@@ -1,21 +1,12 @@
-
-
- {{ $t('site.data-privacy') }}
-
-
-
-
-
+
diff --git a/webapp/pages/donate.spec.js b/webapp/pages/donate.spec.js
new file mode 100644
index 000000000..62a5d0f7d
--- /dev/null
+++ b/webapp/pages/donate.spec.js
@@ -0,0 +1,43 @@
+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' })
+
+// avoid: 'Error: Not implemented: navigation (except hash changes)', see https://stackoverflow.com/questions/54090231/how-to-fix-error-not-implemented-navigation-except-hash-changes
+const assignMock = jest.fn()
+delete window.location
+window.location = { assign: assignMock }
+
+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')).toBeTruthy()
+ })
+
+ 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..aac73695f
--- /dev/null
+++ b/webapp/pages/donate.vue
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/webapp/pages/faq.spec.js b/webapp/pages/faq.spec.js
index bb68a3638..3e92d3f7f 100644
--- a/webapp/pages/faq.spec.js
+++ b/webapp/pages/faq.spec.js
@@ -5,6 +5,11 @@ import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
+// avoid: 'Error: Not implemented: navigation (except hash changes)', see https://stackoverflow.com/questions/54090231/how-to-fix-error-not-implemented-navigation-except-hash-changes
+const assignMock = jest.fn()
+delete window.location
+window.location = { assign: assignMock }
+
describe('faq.vue', () => {
let wrapper
let mocks
@@ -28,7 +33,7 @@ describe('faq.vue', () => {
})
it('renders', () => {
- expect(wrapper.is('div')).toBe(true)
+ expect(wrapper.is('div')).toBeTruthy()
})
it('has correct content', () => {
diff --git a/webapp/pages/faq.vue b/webapp/pages/faq.vue
index 843c78461..ec0ee8eda 100644
--- a/webapp/pages/faq.vue
+++ b/webapp/pages/faq.vue
@@ -1,21 +1,12 @@
-
-
- {{ $t('site.faq') }}
-
-
-
-
-
+
diff --git a/webapp/pages/imprint.spec.js b/webapp/pages/imprint.spec.js
index 1a84b5794..120d99932 100644
--- a/webapp/pages/imprint.spec.js
+++ b/webapp/pages/imprint.spec.js
@@ -5,6 +5,11 @@ import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
+// avoid: 'Error: Not implemented: navigation (except hash changes)', see https://stackoverflow.com/questions/54090231/how-to-fix-error-not-implemented-navigation-except-hash-changes
+const assignMock = jest.fn()
+delete window.location
+window.location = { assign: assignMock }
+
describe('imprint.vue', () => {
let wrapper
let mocks
@@ -28,7 +33,7 @@ describe('imprint.vue', () => {
})
it('renders', () => {
- expect(wrapper.is('div')).toBe(true)
+ expect(wrapper.is('div')).toBeTruthy()
})
it('has correct content', () => {
diff --git a/webapp/pages/imprint.vue b/webapp/pages/imprint.vue
index 538e023a9..3c5fea10e 100644
--- a/webapp/pages/imprint.vue
+++ b/webapp/pages/imprint.vue
@@ -1,21 +1,12 @@
-
-
- {{ $t('site.imprint') }}
-
-
-
-
-
+
diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue
index d23582ad7..306ff49f1 100644
--- a/webapp/pages/index.vue
+++ b/webapp/pages/index.vue
@@ -5,11 +5,11 @@
-
+
{
let wrapper
let mocks
@@ -28,7 +33,7 @@ describe('organization.vue', () => {
})
it('renders', () => {
- expect(wrapper.is('div')).toBe(true)
+ expect(wrapper.is('div')).toBeTruthy()
})
it('has correct content', () => {
diff --git a/webapp/pages/organization.vue b/webapp/pages/organization.vue
index 32add9fbb..7f6f3abd6 100644
--- a/webapp/pages/organization.vue
+++ b/webapp/pages/organization.vue
@@ -1,21 +1,12 @@
-
-
- {{ $t('site.made') }}
-
-
-
-
-
+
diff --git a/webapp/pages/password-reset.vue b/webapp/pages/password-reset.vue
index caa7c3455..6d67c4cae 100644
--- a/webapp/pages/password-reset.vue
+++ b/webapp/pages/password-reset.vue
@@ -2,9 +2,9 @@
-
+
-
+
@@ -19,11 +19,13 @@ import links from '~/constants/links.js'
import metadata from '~/constants/metadata.js'
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
import Logo from '~/components/Logo/Logo'
+import PageParamsLink from '~/components/_new/features/PageParamsLink/PageParamsLink.vue'
export default {
components: {
LocaleSwitch,
Logo,
+ PageParamsLink,
},
layout: 'no-header',
data() {
diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue
index 18bcfe343..b1ca870d7 100644
--- a/webapp/pages/post/_id/_slug/index.vue
+++ b/webapp/pages/post/_id/_slug/index.vue
@@ -80,7 +80,9 @@
{{ $t('settings.blocked-users.explanation.commenting-disabled') }}
{{ $t('settings.blocked-users.explanation.commenting-explanation') }}
- FAQ
+
+ {{ $t('site.faq') }}
+
@@ -95,6 +97,7 @@ import UserTeaser from '~/components/UserTeaser/UserTeaser'
import HcShoutButton from '~/components/ShoutButton.vue'
import CommentForm from '~/components/CommentForm/CommentForm'
import CommentList from '~/components/CommentList/CommentList'
+import PageParamsLink from '~/components/_new/features/PageParamsLink/PageParamsLink.vue'
import {
postMenuModalsData,
deletePostMutation,
@@ -111,13 +114,14 @@ export default {
mode: 'out-in',
},
components: {
- HcHashtag,
- UserTeaser,
- HcShoutButton,
ContentMenu,
CommentForm,
CommentList,
ContentViewer,
+ HcHashtag,
+ HcShoutButton,
+ PageParamsLink,
+ UserTeaser,
},
head() {
return {
diff --git a/webapp/pages/settings/my-email-address/verify.vue b/webapp/pages/settings/my-email-address/verify.vue
index 26f435182..cfab25f0a 100644
--- a/webapp/pages/settings/my-email-address/verify.vue
+++ b/webapp/pages/settings/my-email-address/verify.vue
@@ -60,7 +60,7 @@ export default {
},
data() {
return {
- supportEmail: emails.SUPPORT,
+ supportEmail: emails.SUPPORT_EMAIL,
}
},
async asyncData(context) {
diff --git a/webapp/pages/support.spec.js b/webapp/pages/support.spec.js
index 43c9debd6..4e3003553 100644
--- a/webapp/pages/support.spec.js
+++ b/webapp/pages/support.spec.js
@@ -5,6 +5,11 @@ import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
+// avoid: 'Error: Not implemented: navigation (except hash changes)', see https://stackoverflow.com/questions/54090231/how-to-fix-error-not-implemented-navigation-except-hash-changes
+const assignMock = jest.fn()
+delete window.location
+window.location = { assign: assignMock }
+
describe('support.vue', () => {
let wrapper
let mocks
@@ -28,7 +33,7 @@ describe('support.vue', () => {
})
it('renders', () => {
- expect(wrapper.is('div')).toBe(true)
+ expect(wrapper.is('div')).toBeTruthy()
})
it('has correct content', () => {
diff --git a/webapp/pages/support.vue b/webapp/pages/support.vue
index b94b358a8..e157693c7 100644
--- a/webapp/pages/support.vue
+++ b/webapp/pages/support.vue
@@ -1,21 +1,12 @@
-
-
- {{ $t('site.support') }}
-
-
-
-
-
+
diff --git a/webapp/pages/terms-and-conditions.spec.js b/webapp/pages/terms-and-conditions.spec.js
index d6ae6dce7..6046c2e41 100644
--- a/webapp/pages/terms-and-conditions.spec.js
+++ b/webapp/pages/terms-and-conditions.spec.js
@@ -5,6 +5,11 @@ import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
+// avoid: 'Error: Not implemented: navigation (except hash changes)', see https://stackoverflow.com/questions/54090231/how-to-fix-error-not-implemented-navigation-except-hash-changes
+const assignMock = jest.fn()
+delete window.location
+window.location = { assign: assignMock }
+
describe('terms-and-conditions.vue', () => {
let wrapper
let mocks
@@ -28,7 +33,7 @@ describe('terms-and-conditions.vue', () => {
})
it('renders', () => {
- expect(wrapper.is('div')).toBe(true)
+ expect(wrapper.is('div')).toBeTruthy()
})
it('has correct content', () => {
diff --git a/webapp/pages/terms-and-conditions.vue b/webapp/pages/terms-and-conditions.vue
index 07ac41cfc..341de62db 100644
--- a/webapp/pages/terms-and-conditions.vue
+++ b/webapp/pages/terms-and-conditions.vue
@@ -1,21 +1,12 @@
-
-
- {{ $t('site.termsAndConditions') }}
-
-
-
-
-
+