diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..bd12985d2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: [push] + +jobs: + build: + name: Continuous Integration + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check translation files + run: | + scripts/translations/sort.sh + scripts/translations/missing-keys.sh + + - name: Build neo4j image + uses: docker/build-push-action@v1.1.0 + with: + repository: humanconnection/neo4j + tags: latest + path: neo4j/ + push: false + - name: Build backend base image + uses: docker/build-push-action@v1.1.0 + with: + repository: humanconnection/backend + tags: build-and-test + target: build-and-test + path: backend/ + push: false + - name: Build webapp base image + uses: docker/build-push-action@v1.1.0 + with: + repository: humanconnection/webapp + tags: build-and-test + target: build-and-test + path: webapp/ + push: false + + - name: Lint backend + run: docker run --rm humanconnection/backend:build-and-test yarn run lint + - name: Lint webapp + run: docker run --rm humanconnection/webapp:build-and-test yarn run lint + diff --git a/backend/.env.template b/backend/.env.template index 8531e6cd7..9cdceaa45 100644 --- a/backend/.env.template +++ b/backend/.env.template @@ -23,3 +23,6 @@ AWS_SECRET_ACCESS_KEY= AWS_ENDPOINT= AWS_REGION= AWS_BUCKET= + +EMAIL_DEFAULT_SENDER="info@human-connection.org" +EMAIL_SUPPORT="support@human-connection.org" diff --git a/backend/Dockerfile b/backend/Dockerfile index 9c32e83d5..6bef3579c 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,11 +1,10 @@ FROM node:12.19.0-alpine3.10 as base -LABEL Description="Backend of the Social Network Human-Connection.org" Vendor="Human Connection gGmbH" Version="0.0.1" Maintainer="Human Connection gGmbH (developer@human-connection.org)" EXPOSE 4000 CMD ["yarn", "run", "start"] ARG BUILD_COMMIT ENV BUILD_COMMIT=$BUILD_COMMIT -ARG WORKDIR=/develop-backend +ARG WORKDIR=/backend RUN mkdir -p $WORKDIR WORKDIR $WORKDIR @@ -22,7 +21,7 @@ RUN NODE_ENV=production yarn run build # reduce image size with a multistage build FROM base as production ENV NODE_ENV=production -COPY --from=build-and-test /develop-backend/dist ./dist +COPY --from=build-and-test /backend/dist ./dist COPY ./public/img/ ./public/img/ COPY ./public/providers.json ./public/providers.json RUN yarn install --production=true --frozen-lockfile --non-interactive --no-cache diff --git a/backend/graphql-playground.png b/backend/graphql-playground.png deleted file mode 100644 index 32396a577..000000000 Binary files a/backend/graphql-playground.png and /dev/null differ diff --git a/backend/humanconnection.png b/backend/humanconnection.png deleted file mode 100644 index f0576413f..000000000 Binary files a/backend/humanconnection.png and /dev/null differ diff --git a/backend/src/activitypub/NitroDataSource.js b/backend/src/activitypub/NitroDataSource.js index 2df895f58..476c91439 100644 --- a/backend/src/activitypub/NitroDataSource.js +++ b/backend/src/activitypub/NitroDataSource.js @@ -14,7 +14,7 @@ import { InMemoryCache } from 'apollo-cache-inmemory' import fetch from 'node-fetch' import { ApolloClient } from 'apollo-client' import trunc from 'trunc-html' -const debug = require('debug')('ea:nitro-datasource') +const debug = require('debug')('ea:datasource') export default class NitroDataSource { constructor(uri) { diff --git a/backend/src/activitypub/routes/webfinger.js b/backend/src/activitypub/routes/webfinger.js index e624d306a..6b8f3e14c 100644 --- a/backend/src/activitypub/routes/webfinger.js +++ b/backend/src/activitypub/routes/webfinger.js @@ -45,7 +45,7 @@ export async function handler(req, res) { } catch (error) { debug(error) return res.status(500).json({ - error: 'Something went terribly wrong. Please contact support@human-connection.org', + error: `Something went terribly wrong. Please visit ${CONFIG.SUPPORT_URL}`, }) } finally { session.close() diff --git a/backend/src/config/index.js b/backend/src/config/index.js index 4c81bb181..96fcac44a 100644 --- a/backend/src/config/index.js +++ b/backend/src/config/index.js @@ -1,7 +1,15 @@ import dotenv from 'dotenv' +import links from './links.js' +import metadata from './metadata.js' + if (require.resolve) { // are we in a nodejs environment? - dotenv.config({ path: require.resolve('../../.env') }) + try { + dotenv.config({ path: require.resolve('../../.env') }) + } catch (error) { + if (error.code !== 'MODULE_NOT_FOUND') throw error + console.log('WARN: No `.env` file found in /backend') // eslint-disable-line no-console + } } // eslint-disable-next-line no-undef @@ -31,6 +39,7 @@ const { REDIS_DOMAIN, REDIS_PORT, REDIS_PASSWORD, + EMAIL_DEFAULT_SENDER, } = env export const requiredConfigs = { @@ -83,6 +92,12 @@ export const s3Configs = { S3_CONFIGURED, } +export const customConfigs = { + EMAIL_DEFAULT_SENDER, + SUPPORT_URL: links.SUPPORT, + APPLICATION_NAME: metadata.APPLICATION_NAME, +} + export default { ...requiredConfigs, ...smtpConfigs, @@ -92,4 +107,5 @@ export default { ...sentryConfigs, ...redisConfigs, ...s3Configs, + ...customConfigs, } diff --git a/backend/src/config/links.js b/backend/src/config/links.js new file mode 100644 index 000000000..6068498c2 --- /dev/null +++ b/backend/src/config/links.js @@ -0,0 +1,6 @@ +export default { + ORGANIZATION: 'https://human-connection.org/', + DONATE: 'https://human-connection.org/spenden/', + FAQ: 'https://faq.human-connection.org/', + SUPPORT: 'https://human-connection.org/support' +} diff --git a/backend/src/config/metadata.js b/backend/src/config/metadata.js new file mode 100644 index 000000000..6017cd1af --- /dev/null +++ b/backend/src/config/metadata.js @@ -0,0 +1,7 @@ +export default { + APPLICATION_NAME: 'fyphe_O', + APPLICATION_SHORT_NAME: 'fyphe', + APPLICATION_DESCRIPTION: 'The Schools in Motion Network', + ORGANIZATION_NAME: 'Ensible e.V.', + ORGANIZATION_JURISDICTION: 'Köln', +} diff --git a/backend/src/middleware/email/templateBuilder.js b/backend/src/middleware/email/templateBuilder.js index b4b7b78ca..28acb633e 100644 --- a/backend/src/middleware/email/templateBuilder.js +++ b/backend/src/middleware/email/templateBuilder.js @@ -3,11 +3,17 @@ import CONFIG from '../../config' import * as templates from './templates' -const from = '"Human Connection" ' -const supportUrl = 'https://human-connection.org/en/contact' +const from = CONFIG.EMAIL_DEFAULT_SENDER +const welcomeImageUrl = new URL(`/img/custom/welcome.svg`, CONFIG.CLIENT_URI) + +const defaultParams = { + supportUrl: CONFIG.SUPPORT_URL, + APPLICATION_NAME: CONFIG.APPLICATION_NAME, + welcomeImageUrl +} export const signupTemplate = ({ email, nonce }) => { - const subject = 'Willkommen, Bienvenue, Welcome to Human Connection!' + const subject = `Willkommen, Bienvenue, Welcome to ${CONFIG.APPLICATION_NAME}!` const actionUrl = new URL('/registration/create-user-account', CONFIG.CLIENT_URI) actionUrl.searchParams.set('nonce', nonce) actionUrl.searchParams.set('email', email) @@ -18,7 +24,7 @@ export const signupTemplate = ({ email, nonce }) => { subject, html: mustache.render( templates.layout, - { actionUrl, nonce, supportUrl, subject }, + { ...defaultParams, actionUrl, nonce, subject }, { content: templates.signup }, ), } @@ -36,7 +42,7 @@ export const emailVerificationTemplate = ({ email, nonce, name }) => { subject, html: mustache.render( templates.layout, - { actionUrl, name, nonce, supportUrl, subject }, + { ...defaultParams, actionUrl, name, nonce, subject }, { content: templates.emailVerification }, ), } @@ -54,7 +60,7 @@ export const resetPasswordTemplate = ({ email, nonce, name }) => { subject, html: mustache.render( templates.layout, - { actionUrl, name, nonce, supportUrl, subject }, + { ...defaultParams, actionUrl, name, nonce, subject }, { content: templates.passwordReset }, ), } @@ -70,7 +76,7 @@ export const wrongAccountTemplate = ({ email }) => { subject, html: mustache.render( templates.layout, - { actionUrl, supportUrl }, + { actionUrl, supportUrl, welcomeImageUrl }, { content: templates.wrongAccount }, ), } diff --git a/backend/src/middleware/email/templates/emailVerification.html b/backend/src/middleware/email/templates/emailVerification.html index 939ceccdb..9982ad192 100644 --- a/backend/src/middleware/email/templates/emailVerification.html +++ b/backend/src/middleware/email/templates/emailVerification.html @@ -6,8 +6,8 @@ Human Connection community logo @@ -75,8 +75,8 @@

Sollte der Button für Dich nicht funktionieren, kannst Du auch folgenden Code in Dein Browserfenster kopieren: {{{ nonce }}}

Bis bald bei Human Connection!

-

– Dein Human Connection Team

+ style="color: #17b53e;">{{{APPLICATION_NAME}}}!

+

– Dein {{APPLICATION_NAME}} Team

@@ -104,8 +104,8 @@ Human Connection community logo @@ -173,8 +173,8 @@

If the above button doesn't work you can also copy the following code into your browser window: {{{ nonce }}}

See you soon on Human Connection!

-

– The Human Connection Team

+ style="color: #17b53e;">{{{APPLICATION_NAME}}}!

+

– The {{APPLICATION_NAME}} Team

diff --git a/backend/src/middleware/email/templates/layout.html b/backend/src/middleware/email/templates/layout.html index 7e1c39ace..a5731395d 100644 --- a/backend/src/middleware/email/templates/layout.html +++ b/backend/src/middleware/email/templates/layout.html @@ -170,7 +170,7 @@

- Human Connection gGmbH
Bahnhofstraße 11, 73235 Weilheim / + {{ORGANIZATION_NAME}}
Bahnhofstraße 11, 73235 Weilheim / Teck
Germany


diff --git a/backend/src/middleware/email/templates/resetPassword.html b/backend/src/middleware/email/templates/resetPassword.html index 768051070..8eb2203cb 100644 --- a/backend/src/middleware/email/templates/resetPassword.html +++ b/backend/src/middleware/email/templates/resetPassword.html @@ -6,8 +6,8 @@ Human Connection community logo @@ -75,8 +75,8 @@

Sollte der Button für Dich nicht funktionieren, kannst Du auch folgenden Code in Dein Browserfenster kopieren: {{{ nonce }}}

Bis bald bei Human Connection!

-

– Dein Human Connection Team

+ style="color: #17b53e;">{{APPLICATION_NAME}}!

+

– Dein {{APPLICATION_NAME}} Team

@@ -104,8 +104,8 @@ Human Connection community logo @@ -172,8 +172,8 @@

If the above button doesn't work you can also copy the following code into your browser window: {{{ nonce }}}

See you soon on Human Connection!

-

– The Human Connection Team

+ style="color: #17b53e;">{{APPLICATION_NAME}}!

+

– The {{APPLICATION_NAME}} Team

diff --git a/backend/src/middleware/email/templates/signup.html b/backend/src/middleware/email/templates/signup.html index ad60d9323..e939bc217 100644 --- a/backend/src/middleware/email/templates/signup.html +++ b/backend/src/middleware/email/templates/signup.html @@ -6,8 +6,8 @@ Human Connection community logo @@ -23,7 +23,7 @@ style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">

- Willkommen bei Human Connection!

+ Willkommen bei {{APPLICATION_NAME}}!

Danke, dass Du dich angemeldet hast – wir freuen uns, Dich dabei zu haben. Jetzt fehlt nur noch eine Kleinigkeit, bevor wir gemeinsam die Welt verbessern können ... Bitte bestätige Deine E-Mail Adresse:

@@ -63,7 +63,7 @@

Sollte der Button für Dich nicht funktionieren, kannst Du auch folgenden Code in Dein Browserfenster kopieren: {{{ nonce }}}

Das funktioniert allerdings nur, wenn du Dich über unsere Website registriert hast.

Falls Du Dich nicht selbst bei Human Connection angemeldet hast, schau doch mal vorbei! + style="color: #17b53e;">{{APPLICATION_NAME}} angemeldet hast, schau doch mal vorbei! Wir sind ein gemeinnütziges Aktionsnetzwerk – von Menschen für Menschen.

PS: Wenn Du keinen Account bei uns möchtest, kannst Du diese E-Mail einfach ignorieren. ;)

@@ -88,8 +88,8 @@

Melde Dich gerne bei unserem Support Team, wenn Du Fragen hast.

Bis bald bei Human Connection!

-

– Dein Human Connection Team

+ style="color: #17b53e;">{{APPLICATION_NAME}}!

+

– Dein {{APPLICATION_NAME}} Team

@@ -117,8 +117,8 @@ Human Connection community logo @@ -134,7 +134,7 @@ style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">

- Welcome to Human Connection!

+ Welcome to {{APPLICATION_NAME}}!

Thank you for joining our cause – it's awesome to have you on board. There's just one tiny step missing before we can start shaping the world together ... Please confirm your e-mail address by clicking the button below:

@@ -174,7 +174,7 @@

If the above button doesn't work, you can also copy the following code into your browser window: {{{ nonce }}}

However, this only works if you have registered through our website.

If you didn't sign up for Human Connection we recommend you to check it out! + style="color: #17b53e;">{{APPLICATION_NAME}} we recommend you to check it out! It's a social network from people for people who want to connect and change the world together.

PS: If you ignore this e-mail we will not create an account for @@ -201,8 +201,8 @@ support team with any questions you have.

See you soon on Human Connection!

-

– The Human Connection Team

+ style="color: #17b53e;">{{APPLICATION_NAME}}!

+

– The {{APPLICATION_NAME}} Team

diff --git a/backend/src/middleware/email/templates/wrongAccount.html b/backend/src/middleware/email/templates/wrongAccount.html index cbf6e3cbb..f828a4d1d 100644 --- a/backend/src/middleware/email/templates/wrongAccount.html +++ b/backend/src/middleware/email/templates/wrongAccount.html @@ -6,8 +6,8 @@ Human Connection community logo @@ -56,7 +56,7 @@

Wenn Du noch keinen Account bei Human Connection hast oder Dein Password gar nicht ändern willst, + style="color: #17b53e;">{{APPLICATION_NAME}} hast oder Dein Password gar nicht ändern willst, kannst Du diese E-Mail einfach ignorieren!

@@ -75,8 +75,8 @@

Ansonsten hilft Dir unser Support Team gerne weiter.

Bis bald bei Human Connection!

-

– Dein Human Connection Team

+ style="color: #17b53e;">{{APPLICATION_NAME}}!

+

– Dein {{APPLICATION_NAME}} Team

@@ -105,7 +105,7 @@ Human Connection community logo @@ -153,7 +153,7 @@

If you don't have an account at Human Connection yet or if you didn't want to reset your password, + style="color: #17b53e;">{{APPLICATION_NAME}} yet or if you didn't want to reset your password, please ignore this e-mail.

@@ -172,8 +172,8 @@

Otherwise our support team will be happy to help you out.

See you soon on Human Connection!

-

– The Human Connection Team

+ style="color: #17b53e;">{{APPLICATION_NAME}}!

+

– The {{APPLICATION_NAME}} Team

diff --git a/deployment/helm/human-connection/templates/deployments/deployment-backend.yaml b/deployment/helm/human-connection/templates/deployments/deployment-backend.yaml index e3f75a44c..4d5c34a21 100644 --- a/deployment/helm/human-connection/templates/deployments/deployment-backend.yaml +++ b/deployment/helm/human-connection/templates/deployments/deployment-backend.yaml @@ -44,7 +44,7 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - - mountPath: /develop-backend/public/uploads + - mountPath: /backend/public/uploads name: uploads dnsPolicy: ClusterFirst restartPolicy: Always diff --git a/deployment/helm/human-connection/values.yaml b/deployment/helm/human-connection/values.yaml index 792e22084..085c36fcb 100644 --- a/deployment/helm/human-connection/values.yaml +++ b/deployment/helm/human-connection/values.yaml @@ -50,4 +50,4 @@ privateKeyPassphrase: "YTdkc2Y3OHNhZGc4N2FkODdzZmFnc2FkZzc4" mapboxToken: "cGsuZXlKMUlqb2lhSFZ0WVc0dFkyOXVibVZqZEdsdmJpSXNJbUVpT2lKamFqbDBjbkJ1Ykdvd2VUVmxNM1Z3WjJsek5UTnVkM1p0SW4wLktaOEtLOWw3MG9talhiRWtrYkhHc1E=" uploadsStorage: "25Gi" neo4jStorage: "5Gi" -developmentMailserverDomain: nitro-mailserver.human-connection.org \ No newline at end of file +developmentMailserverDomain: nitro-mailserver.human-connection.org diff --git a/deployment/minikube/README.md b/deployment/minikube/README.md index 499fc8290..f582007a4 100644 --- a/deployment/minikube/README.md +++ b/deployment/minikube/README.md @@ -18,8 +18,8 @@ minikube dashboard, expose the services you want on your host system. For example: ```text -$ minikube service develop-webapp --namespace=human-connection +$ minikube service develop-webapp --namespace=ocelotsocialnetwork # optionally -$ minikube service develop-backend --namespace=human-connection +$ minikube service develop-backend --namespace=ocelotsocialnetwork ``` diff --git a/deployment/volumes/neo4j-online-backup/README.md b/deployment/volumes/neo4j-online-backup/README.md index 4eaa511ef..babb68d26 100644 --- a/deployment/volumes/neo4j-online-backup/README.md +++ b/deployment/volumes/neo4j-online-backup/README.md @@ -56,4 +56,4 @@ $ kubectl --namespace=human-connection exec -it bash > exit ``` -Revert your changes to deployment `develop-neo4j` which will restart the database. \ No newline at end of file +Revert your changes to deployment `develop-neo4j` which will restart the database. diff --git a/docker-compose.override.yml b/docker-compose.override.yml index ef6333596..d950d05f8 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -2,6 +2,7 @@ version: "3.4" services: webapp: + image: schoolsinmotion/webapp:build-and-test build: context: webapp target: build-and-test @@ -9,11 +10,12 @@ services: - ./webapp:/develop-webapp environment: - NUXT_BUILD=/tmp/nuxt # avoid file permission issues when `rm -rf .nuxt/` - - PUBLIC_REGISTRATION=false + - PUBLIC_REGISTRATION=true command: yarn run dev volumes: - webapp_node_modules:/nitro-web/node_modules backend: + image: schoolsinmotion/backend:build-and-test build: context: backend target: build-and-test diff --git a/docker-compose.yml b/docker-compose.yml index 59303e723..1b9ec4e94 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,6 +45,7 @@ services: - MAPBOX_TOKEN=pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ - PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78 - "DEBUG=${DEBUG}" + - EMAIL_DEFAULT_SENDER=info@human-connection.org neo4j: image: ocelotsocialnetwork/develop-neo4j:latest build: diff --git a/neo4j/Dockerfile b/neo4j/Dockerfile index b068b22b2..ee8516e4d 100644 --- a/neo4j/Dockerfile +++ b/neo4j/Dockerfile @@ -1,5 +1,4 @@ FROM neo4j:3.5.14-enterprise -LABEL Description="Neo4J database of the Social Network Human-Connection.org with preinstalled database constraints and indices" Vendor="Human Connection gGmbH" Version="0.0.1" Maintainer="Human Connection gGmbH (developer@human-connection.org)" ARG BUILD_COMMIT ENV BUILD_COMMIT=$BUILD_COMMIT diff --git a/webapp/.dockerignore b/webapp/.dockerignore index b0b6a6d6f..2f7daf103 100644 --- a/webapp/.dockerignore +++ b/webapp/.dockerignore @@ -13,8 +13,6 @@ scripts/ cypress/ README.md -screenshot*.png -lokalise.png .editorconfig maintenance/node_modules/ diff --git a/webapp/Dockerfile b/webapp/Dockerfile index fb0489476..73bf10c49 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -1,5 +1,4 @@ FROM node:12.19.0-alpine3.10 as base -LABEL Description="Web Frontend of the Social Network Human-Connection.org" Vendor="Human-Connection gGmbH" Version="0.0.1" Maintainer="Human-Connection gGmbH (developer@human-connection.org)" EXPOSE 3000 CMD ["yarn", "run", "start"] diff --git a/webapp/Dockerfile.maintenance b/webapp/Dockerfile.maintenance index dfa392b24..b6c9c10a7 100644 --- a/webapp/Dockerfile.maintenance +++ b/webapp/Dockerfile.maintenance @@ -1,5 +1,4 @@ FROM node:12.19.0-alpine3.10 as build -LABEL Description="Maintenance page of the Social Network Human-Connection.org" Vendor="Human-Connection gGmbH" Version="0.0.1" Maintainer="Human-Connection gGmbH (developer@human-connection.org)" EXPOSE 3000 CMD ["yarn", "run", "start"] @@ -25,6 +24,7 @@ COPY locales locales COPY mixins mixins COPY plugins/i18n.js plugins/v-tooltip.js plugins/styleguide.js plugins/ COPY static static +COPY constants constants COPY nuxt.config.js nuxt.config.js # this will also ovewrite the existing package.json diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index 20c9c2388..8492eda69 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -24,14 +24,6 @@
- - {{ $t('contribution.inappropriatePictureText') }} - -
+ + + + diff --git a/webapp/components/Logo/demo.md b/webapp/components/Logo/demo.md new file mode 100644 index 000000000..9cd6d0f4d --- /dev/null +++ b/webapp/components/Logo/demo.md @@ -0,0 +1,15 @@ +# Basic usage + +``` + + + +``` + +# Inverse Logo + +``` + + + +``` \ No newline at end of file diff --git a/webapp/components/Logo/style.scss b/webapp/components/Logo/style.scss new file mode 100644 index 000000000..305e907c5 --- /dev/null +++ b/webapp/components/Logo/style.scss @@ -0,0 +1,17 @@ +.ds-logo { + @include reset; + display: inline-flex; + justify-content: center; + align-items: center; + color: $text-color-primary; +} + +.ds-logo-inverse { + color: $text-color-primary-inverse; +} + +.ds-logo-svg { + width: 130px; + height: auto; + fill: currentColor; +} \ No newline at end of file diff --git a/webapp/components/PageFooter/PageFooter.vue b/webapp/components/PageFooter/PageFooter.vue index fc497bdf5..6c0d21c03 100644 --- a/webapp/components/PageFooter/PageFooter.vue +++ b/webapp/components/PageFooter/PageFooter.vue @@ -1,20 +1,20 @@ diff --git a/webapp/components/PasswordReset/ChangePassword.vue b/webapp/components/PasswordReset/ChangePassword.vue index 2873505c6..5d1e02acf 100644 --- a/webapp/components/PasswordReset/ChangePassword.vue +++ b/webapp/components/PasswordReset/ChangePassword.vue @@ -49,8 +49,9 @@

{{ $t('components.password-reset.change-password.help') }} -
- support@human-connection.org +

+

+ {{ supportEmail }}

@@ -60,6 +61,7 @@ diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js index 960785c0a..97640355c 100644 --- a/webapp/nuxt.config.js +++ b/webapp/nuxt.config.js @@ -1,5 +1,6 @@ import path from 'path' import dotenv from 'dotenv' +import manifest from './constants/manifest.js' dotenv.config() // we want to synchronize @nuxt-dotenv and nuxt-env @@ -56,6 +57,8 @@ export default { 'terms-and-conditions', 'code-of-conduct', 'changelog', + 'imprint', + 'data-privacy', ], // pages to keep alive keepAlivePages: ['index'], @@ -64,8 +67,8 @@ export default { ** Headers of the page */ head: { - title: 'Human Connection', - titleTemplate: '%s - Human Connection', + title: manifest.name, + titleTemplate: `%s - ${manifest.name}`, meta: [ { charset: 'utf-8', @@ -236,14 +239,7 @@ export default { config: additionalSentryConfig, }, - manifest: { - name: 'Human Connection', - short_name: 'HC', - homepage_url: 'https://human-connection.org/', - description: 'The free and open source social network for active citizenship', - theme_color: '#17b53f', - lang: 'en', - }, + manifest, /* ** Build configuration @@ -284,6 +280,13 @@ export default { }, ], }) + config.module.rules.push({ + enforce: 'pre', + test: /\.html$/, + loader: 'raw-loader', + exclude: /(node_modules)/, + }) + const tagAttributesForTesting = ['data-test', ':data-test', 'v-bind:data-test'] ctx.loaders.vue.compilerOptions = { modules: [ diff --git a/webapp/package.json b/webapp/package.json index 4f4146bb9..9cafb662d 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -135,6 +135,7 @@ "mutation-observer": "^1.0.3", "node-sass": "~4.13.1", "prettier": "~2.0.4", + "raw-loader": "^4.0.1", "sass-loader": "~8.0.2", "storybook-design-token": "^0.7.2", "storybook-vue-router": "^1.0.7", diff --git a/webapp/pages/code-of-conduct.vue b/webapp/pages/code-of-conduct.vue index e8b9ce214..3f8bc5911 100644 --- a/webapp/pages/code-of-conduct.vue +++ b/webapp/pages/code-of-conduct.vue @@ -2,7 +2,7 @@
{{ $t('site.code-of-conduct') }} -

{{ $t('code-of-conduct.subheader') }}

+

{{ $t('code-of-conduct.subheader', metadata) }}

@@ -39,6 +39,8 @@ diff --git a/webapp/pages/imprint.vue b/webapp/pages/imprint.vue new file mode 100644 index 000000000..57c9f680e --- /dev/null +++ b/webapp/pages/imprint.vue @@ -0,0 +1,22 @@ + + + diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue index e6504cc7a..d8a620518 100644 --- a/webapp/pages/index.vue +++ b/webapp/pages/index.vue @@ -7,7 +7,7 @@ @@ -74,6 +74,7 @@ import { mapGetters, mapMutations } from 'vuex' import { filterPosts } from '~/graphql/PostQuery.js' import PostMutations from '~/graphql/PostMutations' import UpdateQuery from '~/components/utils/UpdateQuery' +import links from '~/constants/links.js' export default { components: { @@ -87,6 +88,7 @@ export default { data() { const { hashtag = null } = this.$route.query return { + links, posts: [], hasMore: true, // Initialize your apollo data diff --git a/webapp/pages/logout.vue b/webapp/pages/logout.vue index 88bf755a3..ebd03938b 100644 --- a/webapp/pages/logout.vue +++ b/webapp/pages/logout.vue @@ -3,7 +3,7 @@ - Human Connection + Logging out Logging out... diff --git a/webapp/pages/password-reset.vue b/webapp/pages/password-reset.vue index 3d19f2e35..f320bd376 100644 --- a/webapp/pages/password-reset.vue +++ b/webapp/pages/password-reset.vue @@ -2,7 +2,7 @@