diff --git a/backend/src/config/emails.js b/backend/src/config/emails.js new file mode 100644 index 000000000..34daaecb0 --- /dev/null +++ b/backend/src/config/emails.js @@ -0,0 +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_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/backend/src/config/index.js b/backend/src/config/index.js index f3a8fb63c..d6d8cc166 100644 --- a/backend/src/config/index.js +++ b/backend/src/config/index.js @@ -1,5 +1,5 @@ import dotenv from 'dotenv' -import links from './links.js' +import emails from './emails.js' import metadata from './metadata.js' // Load env file @@ -79,9 +79,9 @@ const s3 = { const options = { EMAIL_DEFAULT_SENDER: env.EMAIL_DEFAULT_SENDER, - SUPPORT_URL: links.SUPPORT, + SUPPORT_URL: emails.SUPPORT_LINK, APPLICATION_NAME: metadata.APPLICATION_NAME, - ORGANIZATION_URL: links.ORGANIZATION, + ORGANIZATION_URL: emails.ORGANIZATION_LINK, PUBLIC_REGISTRATION: env.PUBLIC_REGISTRATION === 'true' || false, INVITE_REGISTRATION: env.INVITE_REGISTRATION !== 'false', // default = true } diff --git a/backend/src/config/links.js b/backend/src/config/links.js deleted file mode 100644 index b111726f3..000000000 --- a/backend/src/config/links.js +++ /dev/null @@ -1,17 +0,0 @@ -// 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/ - - 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', -} diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 5fceb2776..15cf00e7a 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -60,6 +60,11 @@ services: networks: - external-net +# the following network from the main YAML gives the warning `WARNING: Some networks were defined but are not used by any service: internal-net` and should be removed +# but removing is not possible yet, it seems: https://github.com/docker/compose/issues/3729#issuecomment-623154878 +# networks: +# internal-net: + volumes: webapp_node_modules: backend_node_modules: diff --git a/webapp/Dockerfile.maintenance b/webapp/Dockerfile.maintenance index dcc06ad61..d9fa6fe43 100644 --- a/webapp/Dockerfile.maintenance +++ b/webapp/Dockerfile.maintenance @@ -57,8 +57,10 @@ COPY package.json yarn.lock ./ RUN yarn install --production=false --frozen-lockfile --non-interactive COPY assets assets +# COPY components/_new/generic/ components/_new/generic COPY components/LocaleSwitch/ components/LocaleSwitch COPY components/Dropdown.vue components/Dropdown.vue +# COPY components/Logo/ components/Logo COPY layouts/blank.vue layouts/blank.vue COPY locales locales COPY mixins mixins diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index d2cb419a4..a06679149 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -25,10 +25,10 @@
- - {{ $t('contribution.inappropriatePictureText') }} + + {{ $t('contribution.inappropriatePicture') }} - +
{ const Wrapper = () => mount(DonationInfo, { mocks, localVue }) - it('includes a link to the ocelot.social donations website', () => { - expect(Wrapper().find('a').attributes('href')).toBe( - 'https://ocelot-social.herokuapp.com/donations', - ) - }) - it('displays a call to action button', () => { expect(Wrapper().find('.base-button').text()).toBe('donations.donate-now') }) diff --git a/webapp/components/DonationInfo/DonationInfo.vue b/webapp/components/DonationInfo/DonationInfo.vue index b1916a6e9..c6db40bc8 100644 --- a/webapp/components/DonationInfo/DonationInfo.vue +++ b/webapp/components/DonationInfo/DonationInfo.vue @@ -1,9 +1,9 @@ @@ -36,6 +36,11 @@ export default { }) }, }, + methods: { + redirectToPage(pageParams) { + pageParams.redirectToPage(this) + }, + }, apollo: { Donations: { query() { diff --git a/webapp/components/LoginButton/LoginButton.spec.js b/webapp/components/LoginButton/LoginButton.spec.js new file mode 100644 index 000000000..62e663714 --- /dev/null +++ b/webapp/components/LoginButton/LoginButton.spec.js @@ -0,0 +1,41 @@ +import { config, mount } from '@vue/test-utils' +import LoginButton from './LoginButton.vue' + +config.stubs['v-popover'] = '' + +describe('LoginButton.vue', () => { + let wrapper + let mocks + let propsData + + beforeEach(() => { + mocks = { + $t: jest.fn(), + navigator: { + clipboard: { + writeText: jest.fn(), + }, + }, + } + propsData = {} + }) + + describe('mount', () => { + const Wrapper = () => { + return mount(LoginButton, { mocks, propsData }) + } + + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders', () => { + expect(wrapper.contains('.login-button')).toBe(true) + }) + + it('open popup', () => { + wrapper.find('.base-button').trigger('click') + expect(wrapper.contains('.login-button')).toBe(true) + }) + }) +}) diff --git a/webapp/components/LoginButton/LoginButton.vue b/webapp/components/LoginButton/LoginButton.vue new file mode 100644 index 000000000..39f0fa4ae --- /dev/null +++ b/webapp/components/LoginButton/LoginButton.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/webapp/components/LoginForm/LoginForm.vue b/webapp/components/LoginForm/LoginForm.vue index 57429baa3..bd4d6c645 100644 --- a/webapp/components/LoginForm/LoginForm.vue +++ b/webapp/components/LoginForm/LoginForm.vue @@ -6,9 +6,9 @@

{{ $t('login.login') }}

@@ -54,6 +54,7 @@ @@ -101,7 +43,8 @@ export default { padding: 10px 10px; box-shadow: 0px -6px 12px -4px rgba(0, 0, 0, 0.1); } -span { +.division-line { + margin-left: 0.2rem; margin-right: 0.2rem; } diff --git a/webapp/components/PasswordReset/ChangePassword.vue b/webapp/components/PasswordReset/ChangePassword.vue index 5d1e02acf..e65a7a04f 100644 --- a/webapp/components/PasswordReset/ChangePassword.vue +++ b/webapp/components/PasswordReset/ChangePassword.vue @@ -79,7 +79,7 @@ export default { data() { const passwordForm = PasswordForm({ translate: this.$t }) return { - supportEmail: emails.SUPPORT, + supportEmail: emails.SUPPORT_EMAIL, formData: { ...passwordForm.formData, }, diff --git a/webapp/components/Registration/RegistrationSlideCreate.vue b/webapp/components/Registration/RegistrationSlideCreate.vue index cab0e1cce..35bba6614 100644 --- a/webapp/components/Registration/RegistrationSlideCreate.vue +++ b/webapp/components/Registration/RegistrationSlideCreate.vue @@ -142,7 +142,7 @@ export default { const passwordForm = PasswordForm({ translate: this.$t }) return { links, - supportEmail: emails.SUPPORT, + supportEmail: emails.SUPPORT_EMAIL, formData: { name: '', ...passwordForm.formData, diff --git a/webapp/components/Registration/RegistrationSlider.vue b/webapp/components/Registration/RegistrationSlider.vue index 2e297bc86..fc2878c1b 100644 --- a/webapp/components/Registration/RegistrationSlider.vue +++ b/webapp/components/Registration/RegistrationSlider.vue @@ -2,9 +2,9 @@