mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Merge branch 'master' of github.com:Ocelot-Social-Community/Ocelot-Social into dependabot/npm_and_yarn/babel/preset-env-7.22.9
# Conflicts: # package.json
This commit is contained in:
commit
b3fc704b93
109
CHANGELOG.md
109
CHANGELOG.md
@ -4,8 +4,117 @@ All notable changes to this project will be documented in this file. Dates are d
|
||||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
#### [3.0.2](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.0...3.0.2)
|
||||
|
||||
- fix(webapp): fix wrong font in whole network comming from chat component [`#6672`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6672)
|
||||
- fix(webapp): fix 'm.avatar is null' error message [`#6671`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6671)
|
||||
- chore(release): release v3.0.1 – fix chat avatars [`#6667`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6667)
|
||||
- fix(webapp): try to fix avatars [`#6660`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6660)
|
||||
- Releasde v3.0.1 – fix chat avatars [`0daeb5b`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/0daeb5b957e11d206ceddc3e8b275929e1850d18)
|
||||
- Remove font 'Quicksand' from the chat [`5b95419`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5b954197dc93bd5715f657539ca1b9b32d7d557a)
|
||||
- conditional url replacement [`5c1ab88`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5c1ab880127a5f4c1b457598fafd3ae9fe1a0d12)
|
||||
|
||||
### [3.0.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.7.0...3.0.0)
|
||||
|
||||
> 7 August 2023
|
||||
|
||||
- chore(other): release v3.0.0 [`#6658`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6658)
|
||||
- fix(webapp): add missing locales [`#6652`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6652)
|
||||
- fix(webapp): fix wrong labels in filter menu buttons [`#6656`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6656)
|
||||
- refactor(webapp): refactor filter menu [`#6535`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6535)
|
||||
- fix(webapp): correct chat usertag profile link [`#6646`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6646)
|
||||
- fix(webapp): fix create event typing issues [`#6643`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6643)
|
||||
- fix(webapp): mini chat: dynamic header buttons [`#6641`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6641)
|
||||
- fix(webapp): start search of user after three characters (chat new room, add group member) [`#6639`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6639)
|
||||
- refactor(webapp): updated/refactored ui of create post page [`#6559`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6559)
|
||||
- fix(webapp): fix code in editor component [`#6624`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6624)
|
||||
- fix(backend): security subscriptions [`#6621`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6621)
|
||||
- fix(webapp): change the background color of my messages to the same color as side menu [`#6620`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6620)
|
||||
- feat(webapp): change general search hint [`#6619`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6619)
|
||||
- feat(webapp): chat component + button open search [`#6618`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6618)
|
||||
- feat(webapp): change color red to green on cancel buttons of post and comments [`#6565`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6565)
|
||||
- fix(webapp): groups highlighting [`#6608`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6608)
|
||||
- feat(webapp): chat link to chat page [`#6617`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6617)
|
||||
- fix(webapp): fix lastMessage to contain proper values [`#6615`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6615)
|
||||
- fix(backend): chat create message - only take 2000 chat message characters [`#6613`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6613)
|
||||
- feat(webapp): chat component can now show clickable urls [`#6614`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6614)
|
||||
- fix(webapp): highlight username functionality for chat [`#6609`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6609)
|
||||
- fix(webapp): fix chat behaviour [`#6611`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6611)
|
||||
- feat(webapp): chat seen check style [`#6612`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6612)
|
||||
- feat(webapp): on open chat room page close or on change profile and click chat change small chat [`#6605`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6605)
|
||||
- feat(webapp): change text for chat room search to `Filter chat rooms` [`#6601`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6601)
|
||||
- fix(backend): convert indexId to string (neo4j number problem) [`#6603`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6603)
|
||||
- fix(other): github cache in workflow [`#6604`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6604)
|
||||
- feat(webapp): show last message and unread count in room list [`#6595`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6595)
|
||||
- refactor(other): cache docker images for backend webapp e2e testing [`#6585`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6585)
|
||||
- feat(backend): chat message added subscription [`#6586`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6586)
|
||||
- refactor(backend): removed promise all from seed [`#6599`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6599)
|
||||
- feat(webapp): add headline to chat page [`#6563`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6563)
|
||||
- fix(other): set workflow not to fail while deleting cache [`#6594`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6594)
|
||||
- feat(backend): room count subscription [`#6584`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6584)
|
||||
- fix(backend): profile query fix [`#6587`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6587)
|
||||
- feat(webapp): mark messages as seen [`#6567`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6567)
|
||||
- feat(webapp): changed usertag in chat messages to user-slug [`#6555`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6555)
|
||||
- feat(backend): more room properties [`#6564`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6564)
|
||||
- refactor(backend): chat messages - order by indexId instead of createdAt [`#6562`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6562)
|
||||
- feat(webapp): chat language is reactive [`#6560`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6560)
|
||||
- feat(backend): unread rooms query [`#6566`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6566)
|
||||
- feat(webapp): chat last seen in webapp [`#6580`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6580)
|
||||
- feat(webapp): chat paginate rooms [`#6579`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6579)
|
||||
- refactor(other): use cached docker images in github e2e flow to decrease run time of e2e test job runs [`#6582`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6582)
|
||||
- fix(webapp): show room header images. [`#6581`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6581)
|
||||
- feat(backend): chat seed [`#6561`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6561)
|
||||
- feat(webapp): chat message pagination [`#6549`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6549)
|
||||
- feat(webapp): chat remove reply smileys [`#6553`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6553)
|
||||
- feat(webapp): remove message actions for chat [`#6552`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6552)
|
||||
- feat(backend): more message props [`#6547`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6547)
|
||||
- refactor(backend): fix seed to not use promise all where easily refactored [`#6520`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6520)
|
||||
- refactor(other): add proper reporting to cypress tests [`#6540`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6540)
|
||||
- refactor(other): cypress - migrate from cypress-file-upload to .selectFile() [`#6528`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6528)
|
||||
- feat(webapp): change chat style and lang [`#6517`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6517)
|
||||
- feat(webapp): show events with locations on the map [`#6518`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6518)
|
||||
- feat(webapp): refine chat notification in header menu and chat button on user profile [`#6550`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6550)
|
||||
- refactor(other): disable cypress test retries [`#6527`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6527)
|
||||
- feat(webapp): event creation page -better placeholder texts for venue and city inputs [`#6525`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6525)
|
||||
- refactor(other): refine webapp github workflow conditions [`#6526`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6526)
|
||||
- docs(other): update TODO-next-update.md for 2.7.0-470 [`#6532`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6532)
|
||||
- fix(backend): chat - do not allow to create room with self [`#6530`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6530)
|
||||
- feat(webapp): chat message capability [`#6524`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6524)
|
||||
- chore(backend): bump @faker-js/faker from 5.1.0 to 8.0.2 [`#6368`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6368)
|
||||
- chore(other): bump cypress from 12.14.0 to 12.17.0 [`#6509`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6509)
|
||||
- feat(webapp): chat rooms [`#6519`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6519)
|
||||
- fix(other): fix branded build - rename files to js for the webapp [`#6516`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6516)
|
||||
- fix(backend): fix branded build (migration) [`#6508`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6508)
|
||||
- fix(backend): fix branded build [`#6507`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6507)
|
||||
- feat(webapp): create a component chat scaffholding [`#6503`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6503)
|
||||
- fix(webapp): fix create post & notifications [`#6505`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6505)
|
||||
- feat(backend): typescript eslint backend [`#6478`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6478)
|
||||
- fix(backend): subscriptions [`#6477`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6477)
|
||||
- fix(backend): seed reports [`#6472`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6472)
|
||||
- refactor(backend): remove activity pub [`#6470`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6470)
|
||||
- fix(webapp): change registration `terms and conditions`, `data privacy` links to use `page-params-link` [`#6441`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6441)
|
||||
- feat(backend): message properties [`#6471`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6471)
|
||||
- feat(backend): room properties [`#6451`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6451)
|
||||
- fix(backend): create message mutation [`#6469`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6469)
|
||||
- feat(backend): messages [`#6450`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6450)
|
||||
- feat(backend): rooms [`#6444`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6444)
|
||||
- fix(other): neo4j config map & node version [`#6464`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6464)
|
||||
- Bump @babel/core from 7.22.1 to 7.22.5 [`#6413`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6413)
|
||||
- refactor(database): update neo4j to 4.4 [`#6306`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6306)
|
||||
- Bump cypress from 12.13.0 to 12.14.0 [`#6414`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6414)
|
||||
- Bump node from 20.2.0-alpine3.17 to 20.3.0-alpine3.17 in /backend [`#6409`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6409)
|
||||
- Bump node from 20.2.0-alpine3.17 to 20.3.0-alpine3.17 in /webapp [`#6408`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6408)
|
||||
- fix(backend): typescript fix [`#6448`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6448)
|
||||
- refactor(backend): migrate completely to typescript [`#6434`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6434)
|
||||
- remove package cypress-file-upload from e2e testing [`73f6bc6`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/73f6bc642194b0c73769d4e8d8e53645b6e80adf)
|
||||
- fixed cypress [`5f545f3`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5f545f3b8fc6927954e036b27ad2e123bcd36149)
|
||||
- fix seed to not use promise all where easily refactored [`1b0f512`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/1b0f5124159033214f99bfbc4cebe9dfaa7dd76e)
|
||||
|
||||
#### [2.7.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.6.0...2.7.0)
|
||||
|
||||
> 14 June 2023
|
||||
|
||||
- chore(release): v2.7.0 [`#6440`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6440)
|
||||
- fix(webapp): fix event teaser date from start to end by new components [`#6385`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6385)
|
||||
- refactor(webapp): optimize create and update event form [`#6381`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6381)
|
||||
- feat(backend): show events not ended yet [`#6405`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6405)
|
||||
|
||||
@ -8,9 +8,11 @@
|
||||
|
||||
[ocelot.social](https://ocelot.social) is free and open source software program code to run social networks. Its development is supported by a community of programmers and interested network operators.
|
||||
|
||||
<!-- markdownlint-disable MD033 -->
|
||||
<p align="center">
|
||||
<a href="https://ocelot.social" target="_blank"><img src="webapp/static/img/custom/logo-squared.svg" alt="ocelot.social" width="40%" height="40%"></a>
|
||||
</p>
|
||||
<!-- markdownlint-enable MD033 -->
|
||||
|
||||
Our goal is to enable people to participate fairly and equally in online social networks. The equality of opportunity applies both to the fundamental equality of all people and to the possibility of letting their diverse voices be heard.
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
* [Frontend tests](webapp/testing.md)
|
||||
* [Backend tests](backend/testing.md)
|
||||
* [Docker More Closely](DOCKER_MORE_CLOSELY.md)
|
||||
* [Deployment](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/blob/master/deployment/README.md)
|
||||
* [Deployment](deployment/README.md)
|
||||
* [Contributing](CONTRIBUTING.md)
|
||||
* [Feature Specification](cypress/features.md)
|
||||
* [Code of conduct](CODE_OF_CONDUCT.md)
|
||||
|
||||
@ -5,11 +5,19 @@ NEO4J_USERNAME=neo4j
|
||||
NEO4J_PASSWORD=letmein
|
||||
GRAPHQL_URI=http://localhost:4000
|
||||
CLIENT_URI=http://localhost:3000
|
||||
|
||||
# EMail
|
||||
EMAIL_SUPPORT="devops@ocelot.social"
|
||||
EMAIL_DEFAULT_SENDER="devops@ocelot.social"
|
||||
SMTP_HOST=
|
||||
SMTP_PORT=
|
||||
SMTP_IGNORE_TLS=true
|
||||
SMTP_USERNAME=
|
||||
SMTP_PASSWORD=
|
||||
SMTP_SECURE="false" # true for 465, false for other ports
|
||||
SMTP_DKIM_DOMAINNAME=
|
||||
SMTP_DKIM_KEYSELECTOR=
|
||||
SMTP_DKIM_PRIVATKEY=
|
||||
|
||||
JWT_SECRET="b/&&7b78BF&fv/Vd"
|
||||
JWT_EXPIRES="2y"
|
||||
@ -28,7 +36,4 @@ AWS_ENDPOINT=
|
||||
AWS_REGION=
|
||||
AWS_BUCKET=
|
||||
|
||||
EMAIL_DEFAULT_SENDER="devops@ocelot.social"
|
||||
EMAIL_SUPPORT="devops@ocelot.social"
|
||||
|
||||
CATEGORIES_ACTIVE=false
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ocelot-social-backend",
|
||||
"version": "2.7.0",
|
||||
"version": "3.0.2",
|
||||
"description": "GraphQL Backend for ocelot.social",
|
||||
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
|
||||
"author": "ocelot.social Community",
|
||||
@ -113,9 +113,9 @@
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-security": "^1.7.1",
|
||||
"prettier": "^2.8.7",
|
||||
"jest": "^27.2.4",
|
||||
"nodemon": "~2.0.2",
|
||||
"prettier": "^2.8.7",
|
||||
"rosie": "^2.0.1",
|
||||
"ts-jest": "^27.0.5",
|
||||
"ts-node": "^10.9.1",
|
||||
|
||||
@ -40,6 +40,8 @@ const server = {
|
||||
JWT_EXPIRES: env.JWT_EXPIRES || '2y',
|
||||
}
|
||||
|
||||
const hasDKIMData = env.SMTP_DKIM_DOMAINNAME && env.SMTP_DKIM_KEYSELECTOR && env.SMTP_DKIM_PRIVATKEY
|
||||
|
||||
const smtp = {
|
||||
SMTP_HOST: env.SMTP_HOST,
|
||||
SMTP_PORT: env.SMTP_PORT,
|
||||
@ -47,6 +49,10 @@ const smtp = {
|
||||
SMTP_SECURE: env.SMTP_SECURE === 'true',
|
||||
SMTP_USERNAME: env.SMTP_USERNAME,
|
||||
SMTP_PASSWORD: env.SMTP_PASSWORD,
|
||||
SMTP_DKIM_DOMAINNAME: hasDKIMData && env.SMTP_DKIM_DOMAINNAME,
|
||||
SMTP_DKIM_KEYSELECTOR: hasDKIMData && env.SMTP_DKIM_KEYSELECTOR,
|
||||
// PEM format: https://docs.progress.com/bundle/datadirect-hybrid-data-pipeline-installation-46/page/PEM-file-format.html
|
||||
SMTP_DKIM_PRIVATKEY: hasDKIMData && env.SMTP_DKIM_PRIVATKEY.replace(/\\n/g, '\n'), // replace all "\n" in .env string by real line break
|
||||
}
|
||||
|
||||
const neo4j = {
|
||||
|
||||
@ -5,6 +5,8 @@ import { htmlToText } from 'nodemailer-html-to-text'
|
||||
|
||||
const hasEmailConfig = CONFIG.SMTP_HOST && CONFIG.SMTP_PORT
|
||||
const hasAuthData = CONFIG.SMTP_USERNAME && CONFIG.SMTP_PASSWORD
|
||||
const hasDKIMData =
|
||||
CONFIG.SMTP_DKIM_DOMAINNAME && CONFIG.SMTP_DKIM_KEYSELECTOR && CONFIG.SMTP_DKIM_PRIVATKEY
|
||||
|
||||
let sendMailCallback: any = async () => {}
|
||||
if (!hasEmailConfig) {
|
||||
@ -44,6 +46,11 @@ if (!hasEmailConfig) {
|
||||
user: CONFIG.SMTP_USERNAME,
|
||||
pass: CONFIG.SMTP_PASSWORD,
|
||||
},
|
||||
dkim: hasDKIMData && {
|
||||
domainName: CONFIG.SMTP_DKIM_DOMAINNAME,
|
||||
keySelector: CONFIG.SMTP_DKIM_KEYSELECTOR,
|
||||
privateKey: CONFIG.SMTP_DKIM_PRIVATKEY,
|
||||
},
|
||||
})
|
||||
|
||||
transporter.use(
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
[](https://www.codetriage.com/ocelot-social-community/ocelot-social-deploy-rebranding)
|
||||
|
||||
This repository is an in use template to rebrand, configure, and deploy [ocelot.social](https://github.com/Ocelot-Social-Community/Ocelot-Social) networks.
|
||||
The forked original repository is [Ocelot-Social-Deploy-Rebranding](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding).
|
||||
The forked original repository is [stage.ocelot.social](https://github.com/Ocelot-Social-Community/stage.ocelot.social).
|
||||
|
||||
<!-- markdownlint-disable MD033 -->
|
||||
<p align="center">
|
||||
<a href="https://ocelot.social" target="_blank"><img src="branding/static/img/custom/logo-squared.svg" alt="Ocelot-Social" width="40%" height="40%"></a>
|
||||
<a href="https://ocelot.social" target="_blank"><img src="../webapp/static/img/custom/logo-squared.svg" alt="ocelot.social" width="40%" height="40%"></a>
|
||||
</p>
|
||||
<!-- markdownlint-enable MD033 -->
|
||||
|
||||
@ -47,7 +47,8 @@ Since all deployment methods described here depend on [Docker](https://docker.co
|
||||
|
||||
The next step is:
|
||||
|
||||
- [Configure And Branding](/branding/README.md)
|
||||
- [Set Environment Variables and Configurations](./deployment-values.md)
|
||||
- [Configure And Branding](./configurations/stage.ocelot.social/branding/README.md)
|
||||
|
||||
### Optional: Locally Testing Configuration And Branding
|
||||
|
||||
@ -99,7 +100,7 @@ See the login details and browser addresses above.
|
||||
|
||||
### Deployment
|
||||
|
||||
Afterwards you can [deploy](/deployment/README.md) it on your server:
|
||||
Afterwards you can [deploy](/deployment/deployment.md) it on your server:
|
||||
|
||||
- [Kubernetes with Helm](/deployment/kubernetes/README.md)
|
||||
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
# Todo For Next Update
|
||||
|
||||
When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings:
|
||||
When you introduce a new version and branding and deploy it on your network, you need to consider the following changes and actions:
|
||||
|
||||
## Version >= 3.3.0 with 'ocelotDockerVersionTag' 3.3.0-XXX
|
||||
|
||||
- We have the new option to configure DKIM for sent e-mails in environment variables (`.env` or `values.yaml`), see [here](deployment.md):
|
||||
- `SMTP_DKIM_DOMAINNAME=`
|
||||
- `SMTP_DKIM_KEYSELECTOR=`
|
||||
- `SMTP_DKIM_PRIVATKEY=`
|
||||
|
||||
## Version >= 2.7.0 with 'ocelotDockerVersionTag' 2.7.0-470
|
||||
|
||||
|
||||
38
deployment/deployment-values.md
Normal file
38
deployment/deployment-values.md
Normal file
@ -0,0 +1,38 @@
|
||||
# Deployment Values
|
||||
|
||||
For each deployment, you need to set the environment variables and configurations.
|
||||
Here is some specific information on how to set the values.
|
||||
|
||||
## E-Mails
|
||||
|
||||
You need to set environment variables to send registration and invitation information or notifications to users, for example.
|
||||
|
||||
### SPF and DKIM
|
||||
|
||||
More and more e-mail providers require settings for authorization and verification of e-mail senders.
|
||||
|
||||
### SPF
|
||||
|
||||
Sometimes it is enough to create an SPF record in your DNS.
|
||||
|
||||
### DKIM
|
||||
|
||||
However, if you need DKIM authorization and verification, you must set the appropriate environment variables:
|
||||
|
||||
```bash
|
||||
SMTP_DKIM_DOMAINNAME=<your e-mail sender domain>
|
||||
SMTP_DKIM_KEYSELECTOR=2017
|
||||
SMTP_DKIM_PRIVATKEY="-----BEGIN RSA PRIVATE KEY-----\n<your base64 encoded privat key data>\n-----END RSA PRIVATE KEY-----\n"
|
||||
```
|
||||
|
||||
You can find out how DKIM works here:
|
||||
|
||||
<https://www.ionos.com/digitalguide/e-mail/e-mail-security/dkim-domainkeys/>
|
||||
|
||||
To create the private and public DKIM key, see here:
|
||||
|
||||
<https://knowledge.ondmarc.redsift.com/en/articles/2141592-generating-2048-bits-dkim-public-and-private-keys-using-openssl-on-a-mac>
|
||||
|
||||
Information about the required PEM format can be found here:
|
||||
|
||||
<https://docs.progress.com/bundle/datadirect-hybrid-data-pipeline-installation-46/page/PEM-file-format.html>
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ocelot-social",
|
||||
"version": "2.7.0",
|
||||
"version": "3.0.2",
|
||||
"description": "Free and open source software program code available to run social networks.",
|
||||
"author": "ocelot.social Community",
|
||||
"license": "MIT",
|
||||
@ -34,7 +34,7 @@
|
||||
"release": "yarn version --no-git-tag-version --no-commit-hooks --no-commit && auto-changelog --latest-version $(node -p -e \"require('./package.json').version\") && cd backend && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\") && cd ../webapp && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\") && cd ../webapp/maintenance/source && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../../../package.json').version\")"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.5",
|
||||
"@babel/core": "^7.22.9",
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
"@babel/register": "^7.12.10",
|
||||
"@badeball/cypress-cucumber-preprocessor": "^15.1.4",
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
@fetch-more-rooms="fetchRooms"
|
||||
@add-room="toggleUserSearch"
|
||||
@show-demo-options="showDemoOptions = $event"
|
||||
@open-user-tag="redirectToUserProfile($event.detail[0])"
|
||||
>
|
||||
<div
|
||||
v-if="selectedRoom && selectedRoom.roomId"
|
||||
@ -333,6 +334,7 @@ export default {
|
||||
;[...this.messages, ...Message].forEach((m) => {
|
||||
if (m.senderId !== this.currentUser.id) m.seen = true
|
||||
m.date = new Date(m.date).toDateString()
|
||||
m.avatar = this.$filters.proxyApiUrl(m.avatar)
|
||||
msgs[m.indexId] = m
|
||||
})
|
||||
this.messages = msgs.filter(Boolean)
|
||||
@ -405,6 +407,7 @@ export default {
|
||||
const fixedRoom = {
|
||||
...room,
|
||||
index: room.lastMessage ? room.lastMessage.date : room.createdAt,
|
||||
avatar: this.$filters.proxyApiUrl(room.avatar),
|
||||
lastMessage: room.lastMessage
|
||||
? {
|
||||
...room.lastMessage,
|
||||
@ -412,7 +415,7 @@ export default {
|
||||
}
|
||||
: null,
|
||||
users: room.users.map((u) => {
|
||||
return { ...u, username: u.name, avatar: u.avatar?.url }
|
||||
return { ...u, username: u.name, avatar: this.$filters.proxyApiUrl(u.avatar?.url) }
|
||||
}),
|
||||
}
|
||||
if (!fixedRoom.avatar) {
|
||||
@ -447,13 +450,17 @@ export default {
|
||||
// this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
redirectToUserProfile({ user }) {
|
||||
const userID = user.id
|
||||
const userName = user.name.toLowerCase().replaceAll(' ', '-')
|
||||
const url = `/profile/${userID}/${userName}`
|
||||
this.$router.push({ path: url })
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
body {
|
||||
font-family: 'Quicksand', sans-serif;
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
.vac-avatar {
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
|
||||
@ -4,7 +4,7 @@ import CategoriesFilter from './CategoriesFilter'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
let wrapper, environmentAndNatureButton, democracyAndPoliticsButton
|
||||
let wrapper, environmentAndNatureButton
|
||||
|
||||
describe('CategoriesFilter.vue', () => {
|
||||
const mutations = {
|
||||
@ -63,12 +63,13 @@ describe('CategoriesFilter.vue', () => {
|
||||
expect(allCategoriesButton.attributes().class).toContain('--filled')
|
||||
})
|
||||
|
||||
it('sets category button attribute `filled` when corresponding category is filtered', async () => {
|
||||
getters['posts/filteredCategoryIds'] = jest.fn(() => ['cat9'])
|
||||
wrapper = await Wrapper()
|
||||
democracyAndPoliticsButton = wrapper.find('.categories-filter .item-save-topics .base-button')
|
||||
expect(democracyAndPoliticsButton.attributes().class).toContain('--filled')
|
||||
})
|
||||
// TODO move to FilterMenuComponent.spec.js?
|
||||
// it('sets category button attribute `filled` when corresponding category is filtered', async () => {
|
||||
// getters['posts/filteredCategoryIds'] = jest.fn(() => ['cat9'])
|
||||
// wrapper = await Wrapper()
|
||||
// democracyAndPoliticsButton = wrapper.find('.categories-filter .item-save-topics .base-button')
|
||||
// expect(democracyAndPoliticsButton.attributes().class).toContain('--filled')
|
||||
// })
|
||||
|
||||
describe('click on an "catetories-buttons" button', () => {
|
||||
it('calls TOGGLE_CATEGORY when clicked', () => {
|
||||
@ -88,13 +89,14 @@ describe('CategoriesFilter.vue', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('save categories', () => {
|
||||
it('calls the API', async () => {
|
||||
wrapper = await Wrapper()
|
||||
const saveButton = wrapper.find('.categories-filter .item-save-topics .base-button')
|
||||
saveButton.trigger('click')
|
||||
expect(apolloMutationMock).toBeCalled()
|
||||
})
|
||||
})
|
||||
// TODO move to FilterMenuComponent.spec.js?
|
||||
// describe('save categories', () => {
|
||||
// it('calls the API', async () => {
|
||||
// wrapper = await Wrapper()
|
||||
// const saveButton = wrapper.find('.categories-filter .item-save-topics .base-button')
|
||||
// saveButton.trigger('click')
|
||||
// expect(apolloMutationMock).toBeCalled()
|
||||
// })
|
||||
// })
|
||||
})
|
||||
})
|
||||
|
||||
@ -1,27 +1,23 @@
|
||||
<template>
|
||||
<filter-menu-section :title="$t('filter-menu.categories')" class="categories-filter">
|
||||
<template #filter-topics>
|
||||
<li class="item item-all-topics">
|
||||
<labeled-button
|
||||
<template #filter-list>
|
||||
<div class="item item-all-topics">
|
||||
<base-button
|
||||
:filled="!filteredCategoryIds.length"
|
||||
:label="$t('filter-menu.all')"
|
||||
icon="check"
|
||||
@click="setResetCategories"
|
||||
/>
|
||||
</li>
|
||||
<li class="item item-save-topics">
|
||||
<labeled-button filled :label="$t('actions.save')" icon="save" @click="saveCategories" />
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<template #filter-list>
|
||||
size="small"
|
||||
>
|
||||
{{ $t('filter-menu.all') }}
|
||||
</base-button>
|
||||
</div>
|
||||
<div class="category-filter-list">
|
||||
<hr />
|
||||
<ds-space margin="small" />
|
||||
<!-- <ds-space margin="small" /> -->
|
||||
<base-button
|
||||
v-for="category in categories"
|
||||
:key="category.id"
|
||||
@click="toggleCategory(category.id)"
|
||||
@click="saveCategories(category.id)"
|
||||
:filled="filteredCategoryIds.includes(category.id)"
|
||||
:icon="category.icon"
|
||||
size="small"
|
||||
@ -40,15 +36,12 @@
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import CategoryQuery from '~/graphql/CategoryQuery.js'
|
||||
import SaveCategories from '~/graphql/SaveCategories.js'
|
||||
import FilterMenuSection from '~/components/FilterMenu/FilterMenuSection'
|
||||
import LabeledButton from '~/components/_new/generic/LabeledButton/LabeledButton'
|
||||
import SortCategories from '~/mixins/sortCategoriesMixin.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FilterMenuSection,
|
||||
LabeledButton,
|
||||
},
|
||||
mixins: [SortCategories],
|
||||
data() {
|
||||
@ -70,19 +63,9 @@ export default {
|
||||
this.resetCategories()
|
||||
this.$emit('showFilterMenu')
|
||||
},
|
||||
saveCategories() {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: SaveCategories(),
|
||||
variables: { activeCategories: this.filteredCategoryIds },
|
||||
})
|
||||
.then(() => {
|
||||
this.$emit('showFilterMenu')
|
||||
this.$toast.success(this.$t('filter-menu.save.success'))
|
||||
})
|
||||
.catch(() => {
|
||||
this.$toast.error(this.$t('filter-menu.save.error'))
|
||||
})
|
||||
saveCategories(categoryId) {
|
||||
this.toggleCategory(categoryId)
|
||||
this.$emit('updateCategories', categoryId)
|
||||
},
|
||||
},
|
||||
apollo: {
|
||||
@ -101,7 +84,7 @@ export default {
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.category-filter-list {
|
||||
margin-left: $space-xx-large;
|
||||
margin-left: $space-xx-small;
|
||||
|
||||
> .base-button {
|
||||
margin-right: $space-xx-small;
|
||||
|
||||
@ -2,24 +2,30 @@
|
||||
<filter-menu-section class="order-by-filter" :title="sectionTitle" :divider="false">
|
||||
<template #filter-list>
|
||||
<li class="item">
|
||||
<labeled-button
|
||||
<base-button
|
||||
icon="check"
|
||||
:label="$t('filter-menu.ended.all.label')"
|
||||
:filled="!eventsEnded"
|
||||
:title="$t('filter-menu.ended.all.hint')"
|
||||
@click="toggleEventsEnded"
|
||||
data-test="all-button"
|
||||
/>
|
||||
size="small"
|
||||
>
|
||||
{{ $t('filter-menu.ended.all.label') }}
|
||||
</base-button>
|
||||
</li>
|
||||
<li class="item">
|
||||
<labeled-button
|
||||
<base-button
|
||||
icon="calendar"
|
||||
:label="$t('filter-menu.ended.onlyEnded.label')"
|
||||
:filled="eventsEnded"
|
||||
:title="$t('filter-menu.ended.onlyEnded.hint')"
|
||||
@click="toggleEventsEnded"
|
||||
data-test="not-ended-button"
|
||||
/>
|
||||
size="small"
|
||||
>
|
||||
{{ $t('filter-menu.ended.onlyEnded.label') }}
|
||||
</base-button>
|
||||
</li>
|
||||
</template>
|
||||
</filter-menu-section>
|
||||
@ -28,13 +34,11 @@
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import FilterMenuSection from '~/components/FilterMenu/FilterMenuSection'
|
||||
import LabeledButton from '~/components/_new/generic/LabeledButton/LabeledButton'
|
||||
|
||||
export default {
|
||||
name: 'EventsByFilter',
|
||||
components: {
|
||||
FilterMenuSection,
|
||||
LabeledButton,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
|
||||
@ -1,9 +1,19 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="filter-menu-options">
|
||||
<h2 class="title">{{ $t('filter-menu.filter-by') }}</h2>
|
||||
<following-filter />
|
||||
<div class="filter-header">
|
||||
<h2 class="title">{{ $t('filter-menu.filter-by') }}</h2>
|
||||
<div class="item-save-topics">
|
||||
<labeled-button
|
||||
filled
|
||||
:label="$t('actions.saveCategories')"
|
||||
icon="save"
|
||||
@click="saveCategories"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<post-type-filter />
|
||||
<following-filter @showFilterMenu="$emit('showFilterMenu')" />
|
||||
<categories-filter v-if="categoriesActive" @showFilterMenu="$emit('showFilterMenu')" />
|
||||
</div>
|
||||
<div v-if="eventSetInPostTypeFilter" class="filter-menu-options">
|
||||
@ -24,6 +34,8 @@ import PostTypeFilter from './PostTypeFilter'
|
||||
import FollowingFilter from './FollowingFilter'
|
||||
import OrderByFilter from './OrderByFilter'
|
||||
import CategoriesFilter from './CategoriesFilter'
|
||||
import LabeledButton from '~/components/_new/generic/LabeledButton/LabeledButton'
|
||||
import SaveCategories from '~/graphql/SaveCategories.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -32,24 +44,49 @@ export default {
|
||||
OrderByFilter,
|
||||
CategoriesFilter,
|
||||
PostTypeFilter,
|
||||
LabeledButton,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
categoriesActive: this.$env.CATEGORIES_ACTIVE,
|
||||
categoriesActive: this.$env ? this.$env.CATEGORIES_ACTIVE : false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
filteredPostTypes: 'posts/filteredPostTypes',
|
||||
filteredCategoryIds: 'posts/filteredCategoryIds',
|
||||
}),
|
||||
eventSetInPostTypeFilter() {
|
||||
return this.filteredPostTypes.includes('Event')
|
||||
return this.filteredPostTypes ? this.filteredPostTypes.includes('Event') : null
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
saveCategories() {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: SaveCategories(),
|
||||
variables: { activeCategories: this.filteredCategoryIds },
|
||||
})
|
||||
.then(() => {
|
||||
this.$emit('showFilterMenu')
|
||||
this.$toast.success(this.$t('filter-menu.save.success'))
|
||||
})
|
||||
.catch(() => {
|
||||
this.$toast.error(this.$t('filter-menu.save.error'))
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.filter-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
& .labeled-button {
|
||||
margin-right: 2em;
|
||||
}
|
||||
}
|
||||
.filter-menu-options {
|
||||
max-width: $size-max-width-filter-menu;
|
||||
padding: $space-small $space-x-small;
|
||||
|
||||
@ -61,18 +61,18 @@ export default {
|
||||
|
||||
> .filter-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-basis: 100%;
|
||||
flex-grow: 1;
|
||||
padding-left: $space-base;
|
||||
|
||||
> .item {
|
||||
width: 30%;
|
||||
padding: 0 $space-x-small;
|
||||
// width: 30%;
|
||||
padding: 0 $space-xx-small;
|
||||
margin-bottom: $space-small;
|
||||
text-align: center;
|
||||
|
||||
@media only screen and (min-width: 800px) {
|
||||
width: 20%;
|
||||
// width: 15%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -80,10 +80,6 @@ export default {
|
||||
@media only screen and (max-width: 630px) {
|
||||
flex-direction: column;
|
||||
|
||||
> .title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
// > .sidebar {
|
||||
// max-width: none;
|
||||
// }
|
||||
|
||||
@ -10,6 +10,7 @@ describe('FollowingFilter', () => {
|
||||
const mutations = {
|
||||
'posts/TOGGLE_FILTER_BY_FOLLOWED': jest.fn(),
|
||||
'posts/TOGGLE_FILTER_BY_MY_GROUPS': jest.fn(),
|
||||
'posts/RESET_FOLLOWERS_FILTER': jest.fn(),
|
||||
}
|
||||
const getters = {
|
||||
'auth/user': () => {
|
||||
@ -65,5 +66,15 @@ describe('FollowingFilter', () => {
|
||||
expect(mutations['posts/TOGGLE_FILTER_BY_MY_GROUPS']).toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
describe('clears follower filter', () => {
|
||||
it('when all button is clicked', async () => {
|
||||
wrapper = await Wrapper()
|
||||
const clearFollowerButton = wrapper.find(
|
||||
'.following-filter .item-all-follower .base-button',
|
||||
)
|
||||
clearFollowerButton.trigger('click')
|
||||
expect(mutations['posts/RESET_FOLLOWERS_FILTER']).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -1,24 +1,47 @@
|
||||
<template>
|
||||
<filter-menu-section :divider="false" class="following-filter">
|
||||
<filter-menu-section
|
||||
:title="$t('filter-menu.following-title')"
|
||||
:divider="false"
|
||||
class="following-filter"
|
||||
>
|
||||
<template #filter-follower>
|
||||
<li class="item follower-item">
|
||||
<labeled-button
|
||||
icon="user-plus"
|
||||
:label="$t('filter-menu.following')"
|
||||
:filled="filteredByUsersFollowed"
|
||||
:title="$t('contribution.filterFollow')"
|
||||
@click="toggleFilteredByFollowed(currentUser.id)"
|
||||
/>
|
||||
</li>
|
||||
<li class="item posts-in-my-groups-item">
|
||||
<labeled-button
|
||||
icon="users"
|
||||
:label="$t('filter-menu.my-groups')"
|
||||
:filled="filteredByPostsInMyGroups"
|
||||
:title="$t('contribution.filterMyGroups')"
|
||||
@click="toggleFilteredByMyGroups()"
|
||||
/>
|
||||
</li>
|
||||
<div class="item item-all-follower">
|
||||
<base-button
|
||||
:filled="!filteredByUsersFollowed && !filteredByPostsInMyGroups"
|
||||
:label="$t('filter-menu.all')"
|
||||
icon="check"
|
||||
@click="setResetFollowers"
|
||||
size="small"
|
||||
>
|
||||
{{ $t('filter-menu.all') }}
|
||||
</base-button>
|
||||
</div>
|
||||
<div class="follower-filter-list">
|
||||
<li class="item follower-item">
|
||||
<base-button
|
||||
icon="user-plus"
|
||||
:label="$t('filter-menu.following')"
|
||||
:filled="filteredByUsersFollowed"
|
||||
:title="$t('filter-menu.following')"
|
||||
@click="toggleFilteredByFollowed(currentUser.id)"
|
||||
size="small"
|
||||
>
|
||||
{{ $t('filter-menu.following') }}
|
||||
</base-button>
|
||||
</li>
|
||||
<li class="item posts-in-my-groups-item">
|
||||
<base-button
|
||||
icon="users"
|
||||
:label="$t('filter-menu.my-groups')"
|
||||
:filled="filteredByPostsInMyGroups"
|
||||
:title="$t('contribution.filterMyGroups')"
|
||||
@click="toggleFilteredByMyGroups()"
|
||||
size="small"
|
||||
>
|
||||
{{ $t('contribution.filterMyGroups') }}
|
||||
</base-button>
|
||||
</li>
|
||||
</div>
|
||||
</template>
|
||||
</filter-menu-section>
|
||||
</template>
|
||||
@ -26,13 +49,11 @@
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import FilterMenuSection from '~/components/FilterMenu/FilterMenuSection'
|
||||
import LabeledButton from '~/components/_new/generic/LabeledButton/LabeledButton'
|
||||
|
||||
export default {
|
||||
name: 'FollowingFilter',
|
||||
components: {
|
||||
FilterMenuSection,
|
||||
LabeledButton,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
@ -43,9 +64,26 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({
|
||||
resetFollowers: 'posts/RESET_FOLLOWERS_FILTER',
|
||||
toggleFilteredByFollowed: 'posts/TOGGLE_FILTER_BY_FOLLOWED',
|
||||
toggleFilteredByMyGroups: 'posts/TOGGLE_FILTER_BY_MY_GROUPS',
|
||||
}),
|
||||
setResetFollowers() {
|
||||
this.resetFollowers()
|
||||
this.$emit('showFilterMenu')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.follower-filter-list {
|
||||
display: flex;
|
||||
margin-left: $space-xx-small;
|
||||
|
||||
& .base-button {
|
||||
margin-right: $space-xx-small;
|
||||
margin-bottom: $space-xx-small;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -35,7 +35,7 @@ describe('OrderByFilter', () => {
|
||||
it('sets "newest-button" attribute `filled`', () => {
|
||||
expect(
|
||||
wrapper
|
||||
.find('.order-by-filter .filter-list [data-test="newest-button"] .base-button')
|
||||
.find('.order-by-filter .filter-list .base-button[data-test="newest-button"]')
|
||||
.classes('--filled'),
|
||||
).toBe(true)
|
||||
})
|
||||
@ -43,7 +43,7 @@ describe('OrderByFilter', () => {
|
||||
it('don\'t sets "oldest-button" attribute `filled`', () => {
|
||||
expect(
|
||||
wrapper
|
||||
.find('.order-by-filter .filter-list [data-test="oldest-button"] .base-button')
|
||||
.find('.order-by-filter .filter-list .base-button[data-test="oldest-button"]')
|
||||
.classes('--filled'),
|
||||
).toBe(false)
|
||||
})
|
||||
@ -58,7 +58,7 @@ describe('OrderByFilter', () => {
|
||||
it('don\'t sets "newest-button" attribute `filled`', () => {
|
||||
expect(
|
||||
wrapper
|
||||
.find('.order-by-filter .filter-list [data-test="newest-button"] .base-button')
|
||||
.find('.order-by-filter .filter-list .base-button[data-test="newest-button"]')
|
||||
.classes('--filled'),
|
||||
).toBe(false)
|
||||
})
|
||||
@ -66,7 +66,7 @@ describe('OrderByFilter', () => {
|
||||
it('sets "oldest-button" attribute `filled`', () => {
|
||||
expect(
|
||||
wrapper
|
||||
.find('.order-by-filter .filter-list [data-test="oldest-button"] .base-button')
|
||||
.find('.order-by-filter .filter-list .base-button[data-test="oldest-button"]')
|
||||
.classes('--filled'),
|
||||
).toBe(true)
|
||||
})
|
||||
@ -75,7 +75,7 @@ describe('OrderByFilter', () => {
|
||||
describe('click "newest-button"', () => {
|
||||
it('calls TOGGLE_ORDER with "createdAt_desc"', () => {
|
||||
wrapper
|
||||
.find('.order-by-filter .filter-list [data-test="newest-button"] .base-button')
|
||||
.find('.order-by-filter .filter-list .base-button[data-test="newest-button"]')
|
||||
.trigger('click')
|
||||
expect(mutations['posts/TOGGLE_ORDER']).toHaveBeenCalledWith({}, 'createdAt_desc')
|
||||
})
|
||||
@ -84,7 +84,7 @@ describe('OrderByFilter', () => {
|
||||
describe('click "oldest-button"', () => {
|
||||
it('calls TOGGLE_ORDER with "createdAt_asc"', () => {
|
||||
wrapper
|
||||
.find('.order-by-filter .filter-list [data-test="oldest-button"] .base-button')
|
||||
.find('.order-by-filter .filter-list .base-button[data-test="oldest-button"]')
|
||||
.trigger('click')
|
||||
expect(mutations['posts/TOGGLE_ORDER']).toHaveBeenCalledWith({}, 'createdAt_asc')
|
||||
})
|
||||
|
||||
@ -2,24 +2,30 @@
|
||||
<filter-menu-section class="order-by-filter" :title="sectionTitle" :divider="false">
|
||||
<template #filter-list>
|
||||
<li class="item">
|
||||
<labeled-button
|
||||
<base-button
|
||||
icon="sort-amount-asc"
|
||||
:label="buttonLabel('desc')"
|
||||
:filled="orderBy === orderedDesc"
|
||||
:title="buttonTitle('desc')"
|
||||
@click="toggleOrder(orderedDesc)"
|
||||
data-test="newest-button"
|
||||
/>
|
||||
size="small"
|
||||
>
|
||||
{{ buttonLabel('desc') }}
|
||||
</base-button>
|
||||
</li>
|
||||
<li class="item">
|
||||
<labeled-button
|
||||
<base-button
|
||||
icon="sort-amount-desc"
|
||||
:label="buttonLabel('asc')"
|
||||
:filled="orderBy === orderedAsc"
|
||||
:title="buttonTitle('asc')"
|
||||
@click="toggleOrder(orderedAsc)"
|
||||
data-test="oldest-button"
|
||||
/>
|
||||
size="small"
|
||||
>
|
||||
{{ buttonLabel('asc') }}
|
||||
</base-button>
|
||||
</li>
|
||||
</template>
|
||||
</filter-menu-section>
|
||||
@ -28,13 +34,11 @@
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import FilterMenuSection from '~/components/FilterMenu/FilterMenuSection'
|
||||
import LabeledButton from '~/components/_new/generic/LabeledButton/LabeledButton'
|
||||
|
||||
export default {
|
||||
name: 'OrderByFilter',
|
||||
components: {
|
||||
FilterMenuSection,
|
||||
LabeledButton,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<filter-menu-section
|
||||
:title="$t('filter-menu.post-type')"
|
||||
:divider="false"
|
||||
class="following-filter"
|
||||
class="post-type-filter"
|
||||
>
|
||||
<template #filter-follower>
|
||||
<li class="item all-item">
|
||||
@ -12,7 +12,9 @@
|
||||
:filled="filteredPostTypes.length === 0"
|
||||
:title="$t('filter-menu.all')"
|
||||
@click="togglePostType(null)"
|
||||
/>
|
||||
>
|
||||
{{ $t('filter-menu.all') }}
|
||||
</labeled-button>
|
||||
</li>
|
||||
<li class="item article-item">
|
||||
<labeled-button
|
||||
@ -59,3 +61,14 @@ export default {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.post-type-filter {
|
||||
& .filter-list {
|
||||
display: flex;
|
||||
flex-basis: 100%;
|
||||
flex-grow: 1;
|
||||
padding-left: $space-base;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
"edit": "Bearbeiten",
|
||||
"loading": "wird geladen",
|
||||
"loadMore": "mehr laden",
|
||||
"save": "Speichern"
|
||||
"save": "Speichern",
|
||||
"saveCategories": "Themen speichern"
|
||||
},
|
||||
"admin": {
|
||||
"categories": {
|
||||
@ -298,16 +299,16 @@
|
||||
"happy": "Glücklich",
|
||||
"surprised": "Erstaunt"
|
||||
},
|
||||
"filterFollow": "Beiträge von Nutzern filtern, denen ich folge",
|
||||
"filterFollow": "Nutzern, denen ich folge",
|
||||
"filterMasonryGrid": {
|
||||
"myFriends": "Nutzer denen ich folge",
|
||||
"myFriends": "Nutzer, denen ich folge",
|
||||
"myGroups": "Aus meinen Gruppen",
|
||||
"myTopics": "Meine Themen",
|
||||
"noFilter": "Inhalt filtern",
|
||||
"onlyArticles": "Nur Beiträge",
|
||||
"onlyEvents": "Nur Veranstaltungen"
|
||||
"noFilter": "Inhalte filtern",
|
||||
"onlyArticles": "Beiträge",
|
||||
"onlyEvents": "Veranstaltungen"
|
||||
},
|
||||
"filterMyGroups": "Beiträge in meinen Gruppen",
|
||||
"filterMyGroups": "Meine Gruppen",
|
||||
"inappropriatePicture": "Dieses Bild kann für einige Menschen unangemessen sein.",
|
||||
"languageSelectLabel": "Sprache Deines Beitrags",
|
||||
"languageSelectText": "Sprache wählen",
|
||||
@ -418,21 +419,22 @@
|
||||
"emotions": "Emotionen",
|
||||
"ended": {
|
||||
"all": {
|
||||
"hint": "Zeige alle, auch beendete",
|
||||
"hint": "Zeige alle, auch zukünftige",
|
||||
"label": "Alle"
|
||||
},
|
||||
"onlyEnded": {
|
||||
"hint": "Zeige nur noch nicht beendete",
|
||||
"label": "Nicht beendete"
|
||||
"hint": "Zeige nur noch zukünftige",
|
||||
"label": "Zukünftige"
|
||||
}
|
||||
},
|
||||
"event": "Veranstaltung",
|
||||
"eventsBy": "Veranstaltungen – zeige ...",
|
||||
"eventsEnded": "Beendet",
|
||||
"filter-by": "Filtern nach ...",
|
||||
"following": "Nutzer denen ich folge",
|
||||
"following": "Nutzer, denen ich folge",
|
||||
"following-title": "Quellen",
|
||||
"languages": "Sprachen",
|
||||
"my-groups": "Meinen Gruppen",
|
||||
"my-groups": "Meine Gruppen",
|
||||
"order": {
|
||||
"last": {
|
||||
"hint": "Sortiere die Letzten nach vorn",
|
||||
@ -723,6 +725,9 @@
|
||||
"unread": "Ungelesen"
|
||||
},
|
||||
"group": "Beschreibung",
|
||||
"headerMenuButton": {
|
||||
"tooltip": "Meine Banachrichtigungen"
|
||||
},
|
||||
"markAllAsRead": "Markiere alle als gelesen",
|
||||
"pageLink": "Alle Benachrichtigungen",
|
||||
"post": "Beitrag oder Gruppe",
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
"edit": "Edit",
|
||||
"loading": "loading",
|
||||
"loadMore": "load more",
|
||||
"save": "Save"
|
||||
"save": "Save",
|
||||
"saveCategories": "Save topics"
|
||||
},
|
||||
"admin": {
|
||||
"categories": {
|
||||
@ -298,16 +299,16 @@
|
||||
"happy": "Happy",
|
||||
"surprised": "Surprised"
|
||||
},
|
||||
"filterFollow": "Filter contributions from users I follow",
|
||||
"filterFollow": "Users I follow",
|
||||
"filterMasonryGrid": {
|
||||
"myFriends": "Users I follow",
|
||||
"myGroups": "By my groups",
|
||||
"myTopics": "My topics",
|
||||
"noFilter": "Filter content",
|
||||
"onlyArticles": "Only articles",
|
||||
"onlyEvents": "Only events"
|
||||
"onlyArticles": "Articles",
|
||||
"onlyEvents": "Events"
|
||||
},
|
||||
"filterMyGroups": "Contributions in my groups",
|
||||
"filterMyGroups": "My groups",
|
||||
"inappropriatePicture": "This image may be inappropriate for some people.",
|
||||
"languageSelectLabel": "Language of your contribution",
|
||||
"languageSelectText": "Select Language",
|
||||
@ -431,6 +432,7 @@
|
||||
"eventsEnded": "Ended",
|
||||
"filter-by": "Filter by ...",
|
||||
"following": "Users I follow",
|
||||
"following-title": "Sources",
|
||||
"languages": "Languages",
|
||||
"my-groups": "My groups",
|
||||
"order": {
|
||||
@ -723,6 +725,9 @@
|
||||
"unread": "Unread"
|
||||
},
|
||||
"group": "Description",
|
||||
"headerMenuButton": {
|
||||
"tooltip": "My notifications"
|
||||
},
|
||||
"markAllAsRead": "Mark all as read",
|
||||
"pageLink": "All notifications",
|
||||
"post": "Post or Group",
|
||||
|
||||
@ -405,6 +405,10 @@
|
||||
"read": "Lire",
|
||||
"unread": "Non lu"
|
||||
},
|
||||
"group": "Description",
|
||||
"headerMenuButton": {
|
||||
"tooltip": "Mes notifications"
|
||||
},
|
||||
"markAllAsRead": "Tout marquer comme lu",
|
||||
"pageLink": "Toutes les notifications",
|
||||
"post": "Post",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ocelot-social/maintenance",
|
||||
"version": "2.7.0",
|
||||
"version": "3.0.2",
|
||||
"description": "Maintenance page for ocelot.social",
|
||||
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
|
||||
"author": "ocelot.social Community",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ocelot-social-webapp",
|
||||
"version": "2.7.0",
|
||||
"version": "3.0.2",
|
||||
"description": "ocelot.social Frontend",
|
||||
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
|
||||
"author": "ocelot.social Community",
|
||||
|
||||
@ -270,7 +270,7 @@ export default {
|
||||
},
|
||||
group: {
|
||||
linkTitle: '&' + e.features[0].properties.slug,
|
||||
link: `/group/${e.features[0].properties.id}/${e.features[0].properties.slug}`,
|
||||
link: `/groups/${e.features[0].properties.id}/${e.features[0].properties.slug}`,
|
||||
},
|
||||
event: {
|
||||
linkTitle: e.features[0].properties.slug,
|
||||
|
||||
@ -98,6 +98,7 @@ export default ({ app = {} }) => {
|
||||
proxyApiUrl: (input) => {
|
||||
const url = input && (input.url || input)
|
||||
if (!url) return url
|
||||
if (url.startsWith('/api/')) return url
|
||||
return url.startsWith('/') ? url.replace('/', '/api/') : url
|
||||
},
|
||||
})
|
||||
|
||||
@ -47,6 +47,16 @@ export const mutations = {
|
||||
delete filter.categories_some
|
||||
state.filter = filter
|
||||
},
|
||||
RESET_FOLLOWERS_FILTER(state) {
|
||||
const filter = clone(state.filter)
|
||||
if (get(filter, 'postsInMyGroups')) {
|
||||
delete filter.postsInMyGroups
|
||||
}
|
||||
if (get(filter, 'author.followedBy_some.id')) {
|
||||
delete filter.author
|
||||
}
|
||||
state.filter = filter
|
||||
},
|
||||
RESET_EMOTIONS(state) {
|
||||
const filter = clone(state.filter)
|
||||
delete filter.emotions_some
|
||||
|
||||
@ -146,6 +146,25 @@ describe('mutations', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('RESET_FOLLOWERS_FILTER', () => {
|
||||
beforeEach(() => {
|
||||
testMutation = () => {
|
||||
mutations.RESET_FOLLOWERS_FILTER(state)
|
||||
return getters.filter(state)
|
||||
}
|
||||
})
|
||||
|
||||
it('resets the categories filter', () => {
|
||||
state = {
|
||||
filter: {
|
||||
author: { followedBy_some: { id: 4711 } },
|
||||
postsInMyGroups: true,
|
||||
},
|
||||
}
|
||||
expect(testMutation()).toEqual({})
|
||||
})
|
||||
})
|
||||
|
||||
describe('TOGGLE_LANGUAGE', () => {
|
||||
beforeEach(() => {
|
||||
testMutation = (languageCode) => {
|
||||
|
||||
44
yarn.lock
44
yarn.lock
@ -22,31 +22,36 @@
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730"
|
||||
integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==
|
||||
|
||||
"@babel/core@^7.16.0", "@babel/core@^7.22.5":
|
||||
version "7.22.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.8.tgz#386470abe884302db9c82e8e5e87be9e46c86785"
|
||||
integrity sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw==
|
||||
"@babel/compat-data@^7.22.9":
|
||||
version "7.22.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730"
|
||||
integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==
|
||||
|
||||
"@babel/core@^7.16.0", "@babel/core@^7.22.9":
|
||||
version "7.22.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.9.tgz#bd96492c68822198f33e8a256061da3cf391f58f"
|
||||
integrity sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==
|
||||
dependencies:
|
||||
"@ampproject/remapping" "^2.2.0"
|
||||
"@babel/code-frame" "^7.22.5"
|
||||
"@babel/generator" "^7.22.7"
|
||||
"@babel/helper-compilation-targets" "^7.22.6"
|
||||
"@babel/helper-module-transforms" "^7.22.5"
|
||||
"@babel/generator" "^7.22.9"
|
||||
"@babel/helper-compilation-targets" "^7.22.9"
|
||||
"@babel/helper-module-transforms" "^7.22.9"
|
||||
"@babel/helpers" "^7.22.6"
|
||||
"@babel/parser" "^7.22.7"
|
||||
"@babel/template" "^7.22.5"
|
||||
"@babel/traverse" "^7.22.8"
|
||||
"@babel/types" "^7.22.5"
|
||||
"@nicolo-ribaudo/semver-v6" "^6.3.3"
|
||||
convert-source-map "^1.7.0"
|
||||
debug "^4.1.0"
|
||||
gensync "^1.0.0-beta.2"
|
||||
json5 "^2.2.2"
|
||||
semver "^6.3.1"
|
||||
|
||||
"@babel/generator@^7.22.7":
|
||||
version "7.22.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.7.tgz#a6b8152d5a621893f2c9dacf9a4e286d520633d5"
|
||||
integrity sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ==
|
||||
"@babel/generator@^7.22.7", "@babel/generator@^7.22.9":
|
||||
version "7.22.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d"
|
||||
integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==
|
||||
dependencies:
|
||||
"@babel/types" "^7.22.5"
|
||||
"@jridgewell/gen-mapping" "^0.3.2"
|
||||
@ -147,19 +152,16 @@
|
||||
dependencies:
|
||||
"@babel/types" "^7.22.5"
|
||||
|
||||
"@babel/helper-module-transforms@^7.22.5":
|
||||
version "7.22.5"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz#0f65daa0716961b6e96b164034e737f60a80d2ef"
|
||||
integrity sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==
|
||||
"@babel/helper-module-transforms@^7.22.5", "@babel/helper-module-transforms@^7.22.9":
|
||||
version "7.22.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz#92dfcb1fbbb2bc62529024f72d942a8c97142129"
|
||||
integrity sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==
|
||||
dependencies:
|
||||
"@babel/helper-environment-visitor" "^7.22.5"
|
||||
"@babel/helper-module-imports" "^7.22.5"
|
||||
"@babel/helper-simple-access" "^7.22.5"
|
||||
"@babel/helper-split-export-declaration" "^7.22.5"
|
||||
"@babel/helper-split-export-declaration" "^7.22.6"
|
||||
"@babel/helper-validator-identifier" "^7.22.5"
|
||||
"@babel/template" "^7.22.5"
|
||||
"@babel/traverse" "^7.22.5"
|
||||
"@babel/types" "^7.22.5"
|
||||
|
||||
"@babel/helper-optimise-call-expression@^7.22.5":
|
||||
version "7.22.5"
|
||||
@ -209,7 +211,7 @@
|
||||
dependencies:
|
||||
"@babel/types" "^7.22.5"
|
||||
|
||||
"@babel/helper-split-export-declaration@^7.22.5", "@babel/helper-split-export-declaration@^7.22.6":
|
||||
"@babel/helper-split-export-declaration@^7.22.6":
|
||||
version "7.22.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c"
|
||||
integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user