From f06369ad7cd6d85a8276e978430dbf36101ba600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 27 Jun 2023 12:52:18 +0200 Subject: [PATCH 01/39] =?UTF-8?q?Setup=20displaying=20events=20on=20map=20?= =?UTF-8?q?=E2=80=93=20first=20step?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webapp/pages/map.vue | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/webapp/pages/map.vue b/webapp/pages/map.vue index 1a34cbda1..e6c0950a6 100644 --- a/webapp/pages/map.vue +++ b/webapp/pages/map.vue @@ -66,6 +66,7 @@ import '@mapbox/mapbox-gl-geocoder/dist/mapbox-gl-geocoder.css' import { mapGetters } from 'vuex' import { profileUserQuery, mapUserQuery } from '~/graphql/User' import { groupQuery } from '~/graphql/groups' +import { filterPosts } from '~/graphql/PostQuery.js' import mobile from '~/mixins/mobile' import Empty from '~/components/Empty/Empty' import MapStylesButtons from '~/components/Map/MapStylesButtons' @@ -95,6 +96,7 @@ export default { currentUserCoordinates: null, users: null, groups: null, + posts: null, markers: { icons: [ { @@ -483,6 +485,29 @@ export default { }, fetchPolicy: 'cache-and-network', }, + Post: { + query() { + return filterPosts(this.$i18n) + }, + variables() { + return { + // Wolle: postType: 'Event', + filter: { + postType_in: ['Event'], + eventLocation: true, + eventStart_gte: new Date(), + }, + // Wolle first: this.pageSize, + // Wolle orderBy: ['pinned_asc', this.orderBy], + // Wolle offset: 0, + } + }, + update({ Post }) { + this.posts = Post + console.log('this.posts: ', this.posts) + }, + fetchPolicy: 'cache-and-network', + }, }, } From f247e6bd7b7554442493b799780186b916890043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 27 Jun 2023 12:53:47 +0200 Subject: [PATCH 02/39] Try to filter only for events with location --- backend/src/schema/resolvers/posts.ts | 9 +++++++-- backend/src/schema/types/type/Location.gql | 8 +++++++- backend/src/schema/types/type/Post.gql | 6 ++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/backend/src/schema/resolvers/posts.ts b/backend/src/schema/resolvers/posts.ts index 0bd4507b5..c4d695e88 100644 --- a/backend/src/schema/resolvers/posts.ts +++ b/backend/src/schema/resolvers/posts.ts @@ -1,6 +1,6 @@ import { v4 as uuid } from 'uuid' import { neo4jgraphql } from 'neo4j-graphql-js' -import { isEmpty } from 'lodash' +import { isEmpty, cloneDeep } from 'lodash' import { UserInputError } from 'apollo-server' import { mergeImage, deleteImage } from './images/images' import Resolver from './helpers/Resolver' @@ -12,12 +12,15 @@ import { createOrUpdateLocations } from './users/location' import CONFIG from '../../config' const maintainPinnedPosts = (params) => { + const filter = cloneDeep(params.filter) const pinnedPostFilter = { pinned: true } if (isEmpty(params.filter)) { params.filter = { OR: [pinnedPostFilter, {}] } } else { - params.filter = { OR: [pinnedPostFilter, { ...params.filter }] } + console.log('maintainPinnedPosts before: ', {...filter}) + params.filter = { OR: [pinnedPostFilter, { ...filter }] } } + console.log('maintainPinnedPosts after: ', {...filter}) return params } @@ -38,6 +41,8 @@ export default { params = await filterForMutedUsers(params, context) params = filterEventDates(params) params = await maintainPinnedPosts(params) + console.log('maintainPinnedPosts filter.OR[1].eventLocation: ', params.filter.OR[1].eventLocation) + console.log('maintainPinnedPosts filter: ', params.filter) return neo4jgraphql(object, params, context, resolveInfo) }, profilePagePosts: async (object, params, context, resolveInfo) => { diff --git a/backend/src/schema/types/type/Location.gql b/backend/src/schema/types/type/Location.gql index fad24cc26..96e2479d2 100644 --- a/backend/src/schema/types/type/Location.gql +++ b/backend/src/schema/types/type/Location.gql @@ -1,3 +1,10 @@ +input _LocationFilter { + NOT: _LocationFilter + id: ID + id_not: ID + name: String +} + type Location { id: ID! name: String! @@ -25,4 +32,3 @@ type LocationMapBox { type Query { queryLocations(place: String!, lang: String!): [LocationMapBox]! } - diff --git a/backend/src/schema/types/type/Post.gql b/backend/src/schema/types/type/Post.gql index 0a7277515..41525f47e 100644 --- a/backend/src/schema/types/type/Post.gql +++ b/backend/src/schema/types/type/Post.gql @@ -84,8 +84,10 @@ input _PostFilter { group: _GroupFilter postsInMyGroups: Boolean postType_in: [PostType] - eventStart_gte: String - eventEnd_gte: String + eventLocation_not: _LocationFilter + eventLocation: _LocationFilter + eventStart_gte: String + eventEnd_gte: String } enum _PostOrdering { From ee359309d9e04f7bade9bde24cc57314aa9a90ef Mon Sep 17 00:00:00 2001 From: Markus Date: Sat, 8 Jul 2023 16:12:16 +0200 Subject: [PATCH 03/39] [feature] added i18n for chat component --- webapp/components/Chat/Chat.vue | 24 ++++++++++++------------ webapp/locales/de.json | 14 ++++++++++++++ webapp/locales/en.json | 14 ++++++++++++++ 3 files changed, 40 insertions(+), 12 deletions(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index c2b02c0af..5bdac4768 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -79,18 +79,18 @@ export default { }, ], textMessages: { - ROOMS_EMPTY: 'Aucune conversation', - ROOM_EMPTY: 'Aucune conversation sélectionnée', - NEW_MESSAGES: 'Nouveaux messages', - MESSAGE_DELETED: 'Ce message a été supprimé', - MESSAGES_EMPTY: 'Aucun message', - CONVERSATION_STARTED: 'La conversation a commencée le :', - TYPE_MESSAGE: 'Tapez votre message', - SEARCH: 'Rechercher', - IS_ONLINE: 'est en ligne', - LAST_SEEN: 'dernière connexion ', - IS_TYPING: 'est en train de taper...', - CANCEL_SELECT_MESSAGE: 'Annuler Sélection', + ROOMS_EMPTY: this.$t('chat.roomsEmpty'), + ROOM_EMPTY: this.$t('chat.roomEmpty'), + NEW_MESSAGES: this.$t('chat.newMessages'), + MESSAGE_DELETED: this.$t('chat.messageDeleted'), + MESSAGES_EMPTY: this.$t('chat.messagesEmpty'), + CONVERSATION_STARTED: this.$t('chat.conversationStarted'), + TYPE_MESSAGE: this.$t('chat.typeMessage'), + SEARCH: this.$t('chat.search'), + IS_ONLINE: this.$t('chat.isOnline'), + LAST_SEEN: this.$t('chat.lastSeen'), + IS_TYPING: this.$t('chat.isTyping'), + CANCEL_SELECT_MESSAGE: this.$t('chat.cancelSelectMessage') }, roomActions: [ { diff --git a/webapp/locales/de.json b/webapp/locales/de.json index febb8898c..c482cfff9 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -77,6 +77,20 @@ } } }, + "chat": { + "roomsEmpty" : "Keine Räume", + "roomEmpty" : "Keinen Raum selektiert", + "newMessages" : "Neue Nachrichten", + "messageDeleted": "Diese Nachricht wuerde gelöscht", + "messagesEmpty": "Keine Nachrichten", + "conversationStarted": "Unterhaltung startete am:", + "typeMessage": "Nachricht schreiben", + "search": "Suche", + "isOnline": "online", + "lastSeen": "zuletzt gesehen ", + "isTyping": "tippt...", + "cancelSelectMessage": "Abbrechen" + }, "client-only": { "loading": "Lade …" }, diff --git a/webapp/locales/en.json b/webapp/locales/en.json index c0fb5c2f6..0e71a2f4f 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -77,6 +77,20 @@ } } }, + "chat": { + "roomsEmpty" : "No rooms", + "roomEmpty" : "No room selected", + "newMessages" : "New Messages", + "messageDeleted": "This message was deleted", + "messagesEmpty": "No messages", + "conversationStarted": "Conversation started on:", + "typeMessage": "Type message", + "search": "Search", + "isOnline": "is online", + "lastSeen": "last seen ", + "isTyping": "is writing...", + "cancelSelectMessage": "Cancel" + }, "client-only": { "loading": "Loading …" }, From 59828c25d26bd9d9bcdd9d057a970ea81439a70a Mon Sep 17 00:00:00 2001 From: Markus Date: Sat, 8 Jul 2023 16:29:22 +0200 Subject: [PATCH 04/39] [feature] added basic custom styling for chat --- webapp/assets/_new/styles/tokens.scss | 7 +- webapp/components/Chat/Chat.vue | 8 + webapp/constants/chat.js | 302 ++++++++++++++++++++++++++ 3 files changed, 316 insertions(+), 1 deletion(-) create mode 100644 webapp/constants/chat.js diff --git a/webapp/assets/_new/styles/tokens.scss b/webapp/assets/_new/styles/tokens.scss index 22e0214ff..4fd8fd055 100644 --- a/webapp/assets/_new/styles/tokens.scss +++ b/webapp/assets/_new/styles/tokens.scss @@ -406,4 +406,9 @@ $color-toast-green: $color-success; $color-ribbon-event: $background-color-third; $color-ribbon-event-active: $background-color-third-active; $color-ribbon-article: $background-color-secondary; -$color-ribbon-article-active: $background-color-secondary-active; \ No newline at end of file +$color-ribbon-article-active: $background-color-secondary-active; + + +:export { + colorYellow: $color-yellow; +} \ No newline at end of file diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 5bdac4768..cb5922660 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -15,6 +15,7 @@ :rooms-loaded="true" show-files="false" show-audio="false" + :styles="JSON.stringify(computedChatStyle)" :show-footer="true" @send-message="sendMessage($event.detail[0])" @fetch-messages="fetchMessages($event.detail[0])" @@ -29,6 +30,7 @@ From 073adbe48c6f9093879f64b4b945fbc90fa7dfd2 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 11 Jul 2023 11:19:01 +0200 Subject: [PATCH 13/39] do not allow to create room with self --- backend/src/schema/resolvers/rooms.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/schema/resolvers/rooms.ts b/backend/src/schema/resolvers/rooms.ts index 02309e172..293cd6e91 100644 --- a/backend/src/schema/resolvers/rooms.ts +++ b/backend/src/schema/resolvers/rooms.ts @@ -32,6 +32,9 @@ export default { const { user: { id: currentUserId }, } = context + if (userId === currentUserId) { + throw new Error('Cannot create a room with yourself') + } const session = context.driver.session() const writeTxResultPromise = session.writeTransaction(async (transaction) => { const createRoomCypher = ` From 91b2961562a780fcf7dc24231de3246cb427e64a Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 11 Jul 2023 11:31:00 +0200 Subject: [PATCH 14/39] [feature] adjusted avatar style for chat if no image is available --- webapp/components/Chat/Chat.vue | 51 +++++++++++++++++++++++++++++++++ webapp/layouts/default.vue | 1 - 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index ce4d869ee..2f39afd07 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -28,6 +28,28 @@ + +
+
+
+ {{ getInitialsName(selectedRoom.roomName) }} +
+
+ +
+
+
+ {{ getInitialsName(room.roomName) }} +
+
@@ -122,6 +144,7 @@ export default { showDemoOptions: true, responsiveBreakpoint: 600, singleRoom: !!this.singleRoomId || false, + selectedRoom: null, } }, mounted() { @@ -174,6 +197,8 @@ export default { this.$toast.error(error.message) } this.messagesLoaded = true + + this.selectedRoom = room }) }, @@ -195,6 +220,11 @@ export default { } this.refetchMessage(message.roomId) }, + + getInitialsName(fullname){ + if(!fullname) return + return fullname.match(/\b\w/g).join('').substring(0, 3).toUpperCase() + } }, apollo: { Rooms: { @@ -235,4 +265,25 @@ export default { body { font-family: 'Quicksand', sans-serif; } +.vac-avatar { + background-size: cover; + background-position: center center; + background-repeat: no-repeat; + background-color: $color-primary-dark; + color: $text-color-primary-inverse; + height: 42px; + width: 42px; + min-height: 42px; + min-width: 42px; + margin-right: 15px; + border-radius: 50%; + position: relative; + + > .initials{ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } +} diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index 39a84bf14..0e7420956 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -19,7 +19,6 @@
- > From dd4e6bf2dca0debe9457bdf674aab7292e7701e9 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 11 Jul 2023 12:13:46 +0200 Subject: [PATCH 18/39] fix open chat functionality after relog co-authored-by: Ogerly --- webapp/layouts/default.spec.js | 2 +- webapp/layouts/default.vue | 5 ++++- webapp/store/chat.js | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/webapp/layouts/default.spec.js b/webapp/layouts/default.spec.js index 1b83491d7..cce8c2eca 100644 --- a/webapp/layouts/default.spec.js +++ b/webapp/layouts/default.spec.js @@ -37,7 +37,7 @@ describe('default.vue', () => { getters: { 'auth/isLoggedIn': () => true, 'chat/showChat': () => { - return { showChat: false, roomID: 'u0' } + return { showChat: false, roomID: null } }, }, }) diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index 8b6b80604..f14c4055f 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -16,7 +16,7 @@
RoomID: {{ $store.getters['chat/showChat'].roomID }} - + x @@ -41,6 +41,9 @@ export default { ChatModule, }, mixins: [seo, mobile()], + beforeCreate() { + this.$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: null }) + }, } diff --git a/webapp/store/chat.js b/webapp/store/chat.js index 2ee8a47ad..be4ddaec0 100644 --- a/webapp/store/chat.js +++ b/webapp/store/chat.js @@ -1,14 +1,14 @@ export const state = () => { return { showChat: false, - roomID: 'u0', + roomID: null, } } export const mutations = { SET_OPEN_CHAT(state, ctx) { state.showChat = ctx.showChat || false - state.roomID = ctx.roomID || 'u0' + state.roomID = ctx.roomID || null }, } From 11afa1f6d54e98b600cd864d3011c8035f0c490e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 11 Jul 2023 12:14:21 +0200 Subject: [PATCH 19/39] Simplify the map legend --- webapp/pages/map.vue | 85 ++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/webapp/pages/map.vue b/webapp/pages/map.vue index 5bb800ba8..8fffad1cf 100644 --- a/webapp/pages/map.vue +++ b/webapp/pages/map.vue @@ -5,33 +5,15 @@ {{ $t('map.pageTitle') }}
- - {{ $t('map.legend.theUser') }} -    - - {{ $t('map.legend.user') }} -    - - {{ $t('map.legend.group') }} -    - - {{ $t('map.legend.event') }} + + + {{ $t('map.legend.' + type.id) }} +    +
@@ -115,22 +97,38 @@ export default { groups: null, posts: null, markers: { - icons: [ + types: [ { - id: 'marker-blue', - name: 'mapbox-marker-icon-20px-blue.png', + id: 'theUser', + icon: { + id: 'marker-orange', + legendName: 'mapbox-marker-icon-orange.svg', + mapName: 'mapbox-marker-icon-20px-orange.png', + }, }, { - id: 'marker-green', - name: 'mapbox-marker-icon-20px-green.png', + id: 'user', + icon: { + id: 'marker-green', + legendName: 'mapbox-marker-icon-green.svg', + mapName: 'mapbox-marker-icon-20px-green.png', + }, }, { - id: 'marker-orange', - name: 'mapbox-marker-icon-20px-orange.png', + id: 'group', + icon: { + id: 'marker-blue', + legendName: 'mapbox-marker-icon-blue.svg', + mapName: 'mapbox-marker-icon-20px-blue.png', + }, }, { - id: 'marker-purple', - name: 'mapbox-marker-icon-20px-purple.png', + id: 'event', + icon: { + id: 'marker-purple', + legendName: 'mapbox-marker-icon-purple.svg', + mapName: 'mapbox-marker-icon-20px-purple.png', + }, }, ], isImagesLoaded: false, @@ -339,15 +337,18 @@ export default { }, loadMarkersIconsAndAddMarkers() { Promise.all( - this.markers.icons.map( + this.markers.types.map( (marker) => new Promise((resolve, reject) => { // our images have to be in the 'static/img/*' folder otherwise they are not reachable via URL - this.map.loadImage('img/mapbox/marker-icons/' + marker.name, (error, image) => { - if (error) throw error - this.map.addImage(marker.id, image) - resolve() - }) + this.map.loadImage( + 'img/mapbox/marker-icons/' + marker.icon.mapName, + (error, image) => { + if (error) throw error + this.map.addImage(marker.icon.id, image) + resolve() + }, + ) }), ), ).then(() => { From f217c1d63c2eb10f6f77ac71f9f5f7c9b8397235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 11 Jul 2023 12:22:07 +0200 Subject: [PATCH 20/39] Replace `properties.about` by `properties.description` on map --- webapp/pages/map.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/pages/map.vue b/webapp/pages/map.vue index 8fffad1cf..1db2b189a 100644 --- a/webapp/pages/map.vue +++ b/webapp/pages/map.vue @@ -290,11 +290,11 @@ export default {
` description += - e.features[0].properties.about && e.features[0].properties.about.length > 0 + e.features[0].properties.description && e.features[0].properties.description.length > 0 ? `
- ${e.features[0].properties.about} + ${e.features[0].properties.description}
` : '' @@ -372,7 +372,7 @@ export default { id: user.id, slug: user.slug, name: user.name, - about: user.about ? user.about : undefined, + description: user.about ? user.about : undefined, }, geometry: { type: 'Point', @@ -392,7 +392,7 @@ export default { id: this.currentUser.id, slug: this.currentUser.slug, name: this.currentUser.name, - about: this.currentUser.about ? this.currentUser.about : undefined, + description: this.currentUser.about ? this.currentUser.about : undefined, }, geometry: { type: 'Point', @@ -412,7 +412,7 @@ export default { id: group.id, slug: group.slug, name: group.name, - about: group.about ? group.about : undefined, + description: group.about ? group.about : undefined, }, geometry: { type: 'Point', @@ -433,7 +433,7 @@ export default { id: post.id, slug: post.slug, name: post.title, - about: post.contentExcerpt, + description: post.contentExcerpt, }, geometry: { type: 'Point', From a4bb523cb4d1e50abc1f3c528dc01460fabf3a7d Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 11 Jul 2023 12:57:37 +0200 Subject: [PATCH 21/39] unit test for error when creating room with self --- backend/src/schema/resolvers/rooms.spec.ts | 15 +++++++++++++++ backend/src/schema/resolvers/rooms.ts | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/backend/src/schema/resolvers/rooms.spec.ts b/backend/src/schema/resolvers/rooms.spec.ts index d27c64e57..03c3d4456 100644 --- a/backend/src/schema/resolvers/rooms.spec.ts +++ b/backend/src/schema/resolvers/rooms.spec.ts @@ -92,6 +92,21 @@ describe('Room', () => { }) }) + describe('user id is self', () => { + it('throws error', async () => { + await expect( + mutate({ + mutation: createRoomMutation(), + variables: { + userId: 'chatting-user', + }, + }), + ).resolves.toMatchObject({ + errors: [{ message: 'Cannot create a room with self' }], + }) + }) + }) + describe('user id exists', () => { it('returns the id of the room', async () => { const result = await mutate({ diff --git a/backend/src/schema/resolvers/rooms.ts b/backend/src/schema/resolvers/rooms.ts index 293cd6e91..d5015a03b 100644 --- a/backend/src/schema/resolvers/rooms.ts +++ b/backend/src/schema/resolvers/rooms.ts @@ -33,7 +33,7 @@ export default { user: { id: currentUserId }, } = context if (userId === currentUserId) { - throw new Error('Cannot create a room with yourself') + throw new Error('Cannot create a room with self') } const session = context.driver.session() const writeTxResultPromise = session.writeTransaction(async (transaction) => { From 40dea1736011662c1251c6f80c8b56e266771cd8 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 11 Jul 2023 13:05:01 +0200 Subject: [PATCH 22/39] update TODO-next-update.md for 2.7.0-470 --- deployment/TODO-next-update.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployment/TODO-next-update.md b/deployment/TODO-next-update.md index 8630275b7..8e30d1f47 100644 --- a/deployment/TODO-next-update.md +++ b/deployment/TODO-next-update.md @@ -2,6 +2,10 @@ When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings: +## Version >= 2.7.0 with 'ocelotDockerVersionTag' 2.7.0-470 + +- You have to rename all `.js` files to `.ts` in `branding/constants` + ## Version >= 2.4.0 with 'ocelotDockerVersionTag' 2.4.0-298 - You have to set `SHOW_CONTENT_FILTER_HEADER_MENU` and `SHOW_CONTENT_FILTER_MASONRY_GRID` in `branding/constants/filter.js` originally in main code file `webapp/constants/filter.js` to your preferred value. From a427b21948a68a25d43044b4bfc5ab1911d464dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 11 Jul 2023 13:19:35 +0200 Subject: [PATCH 23/39] Renew submodule 'stage.ocelot.social' --- deployment/configurations/stage.ocelot.social | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/configurations/stage.ocelot.social b/deployment/configurations/stage.ocelot.social index 350237c62..fdc2e52fa 160000 --- a/deployment/configurations/stage.ocelot.social +++ b/deployment/configurations/stage.ocelot.social @@ -1 +1 @@ -Subproject commit 350237c62dcff1a5c34f1e8d718f89b05ce3d33f +Subproject commit fdc2e52fa444b300e1c4736600bc0e9ae3314222 From 737a8f4380c92cf089efc0dc943d05640dd513d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 11 Jul 2023 13:20:38 +0200 Subject: [PATCH 24/39] Revert "Try to filter only for events with location" This reverts commit f247e6bd7b7554442493b799780186b916890043. --- backend/src/schema/resolvers/posts.ts | 9 ++------- backend/src/schema/types/type/Location.gql | 8 +------- backend/src/schema/types/type/Post.gql | 6 ++---- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/backend/src/schema/resolvers/posts.ts b/backend/src/schema/resolvers/posts.ts index c4d695e88..0bd4507b5 100644 --- a/backend/src/schema/resolvers/posts.ts +++ b/backend/src/schema/resolvers/posts.ts @@ -1,6 +1,6 @@ import { v4 as uuid } from 'uuid' import { neo4jgraphql } from 'neo4j-graphql-js' -import { isEmpty, cloneDeep } from 'lodash' +import { isEmpty } from 'lodash' import { UserInputError } from 'apollo-server' import { mergeImage, deleteImage } from './images/images' import Resolver from './helpers/Resolver' @@ -12,15 +12,12 @@ import { createOrUpdateLocations } from './users/location' import CONFIG from '../../config' const maintainPinnedPosts = (params) => { - const filter = cloneDeep(params.filter) const pinnedPostFilter = { pinned: true } if (isEmpty(params.filter)) { params.filter = { OR: [pinnedPostFilter, {}] } } else { - console.log('maintainPinnedPosts before: ', {...filter}) - params.filter = { OR: [pinnedPostFilter, { ...filter }] } + params.filter = { OR: [pinnedPostFilter, { ...params.filter }] } } - console.log('maintainPinnedPosts after: ', {...filter}) return params } @@ -41,8 +38,6 @@ export default { params = await filterForMutedUsers(params, context) params = filterEventDates(params) params = await maintainPinnedPosts(params) - console.log('maintainPinnedPosts filter.OR[1].eventLocation: ', params.filter.OR[1].eventLocation) - console.log('maintainPinnedPosts filter: ', params.filter) return neo4jgraphql(object, params, context, resolveInfo) }, profilePagePosts: async (object, params, context, resolveInfo) => { diff --git a/backend/src/schema/types/type/Location.gql b/backend/src/schema/types/type/Location.gql index 96e2479d2..fad24cc26 100644 --- a/backend/src/schema/types/type/Location.gql +++ b/backend/src/schema/types/type/Location.gql @@ -1,10 +1,3 @@ -input _LocationFilter { - NOT: _LocationFilter - id: ID - id_not: ID - name: String -} - type Location { id: ID! name: String! @@ -32,3 +25,4 @@ type LocationMapBox { type Query { queryLocations(place: String!, lang: String!): [LocationMapBox]! } + diff --git a/backend/src/schema/types/type/Post.gql b/backend/src/schema/types/type/Post.gql index 41525f47e..0a7277515 100644 --- a/backend/src/schema/types/type/Post.gql +++ b/backend/src/schema/types/type/Post.gql @@ -84,10 +84,8 @@ input _PostFilter { group: _GroupFilter postsInMyGroups: Boolean postType_in: [PostType] - eventLocation_not: _LocationFilter - eventLocation: _LocationFilter - eventStart_gte: String - eventEnd_gte: String + eventStart_gte: String + eventEnd_gte: String } enum _PostOrdering { From 1a3f11ac1fbc8bac33043a18e64884f62a49e8f6 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 11 Jul 2023 13:23:32 +0200 Subject: [PATCH 25/39] lint locales --- webapp/locales/de.json | 20 ++++++++++---------- webapp/locales/en.json | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/webapp/locales/de.json b/webapp/locales/de.json index c482cfff9..09a03a84c 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -77,19 +77,19 @@ } } }, - "chat": { - "roomsEmpty" : "Keine Räume", - "roomEmpty" : "Keinen Raum selektiert", - "newMessages" : "Neue Nachrichten", + "chat": { + "cancelSelectMessage": "Abbrechen", + "conversationStarted": "Unterhaltung startete am:", + "isOnline": "online", + "isTyping": "tippt...", + "lastSeen": "zuletzt gesehen ", "messageDeleted": "Diese Nachricht wuerde gelöscht", "messagesEmpty": "Keine Nachrichten", - "conversationStarted": "Unterhaltung startete am:", - "typeMessage": "Nachricht schreiben", + "newMessages": "Neue Nachrichten", + "roomEmpty": "Keinen Raum selektiert", + "roomsEmpty": "Keine Räume", "search": "Suche", - "isOnline": "online", - "lastSeen": "zuletzt gesehen ", - "isTyping": "tippt...", - "cancelSelectMessage": "Abbrechen" + "typeMessage": "Nachricht schreiben" }, "client-only": { "loading": "Lade …" diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 0e71a2f4f..1c1136faf 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -77,19 +77,19 @@ } } }, - "chat": { - "roomsEmpty" : "No rooms", - "roomEmpty" : "No room selected", - "newMessages" : "New Messages", + "chat": { + "cancelSelectMessage": "Cancel", + "conversationStarted": "Conversation started on:", + "isOnline": "is online", + "isTyping": "is writing...", + "lastSeen": "last seen ", "messageDeleted": "This message was deleted", "messagesEmpty": "No messages", - "conversationStarted": "Conversation started on:", - "typeMessage": "Type message", + "newMessages": "New Messages", + "roomEmpty": "No room selected", + "roomsEmpty": "No rooms", "search": "Search", - "isOnline": "is online", - "lastSeen": "last seen ", - "isTyping": "is writing...", - "cancelSelectMessage": "Cancel" + "typeMessage": "Type message" }, "client-only": { "loading": "Loading …" From c3912304f480efbb7ccac64044de5db008ca69ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 11 Jul 2023 13:24:55 +0200 Subject: [PATCH 26/39] Fix formating --- backend/src/schema/types/type/Location.gql | 1 - backend/src/schema/types/type/Post.gql | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/src/schema/types/type/Location.gql b/backend/src/schema/types/type/Location.gql index fad24cc26..9cb5c970a 100644 --- a/backend/src/schema/types/type/Location.gql +++ b/backend/src/schema/types/type/Location.gql @@ -25,4 +25,3 @@ type LocationMapBox { type Query { queryLocations(place: String!, lang: String!): [LocationMapBox]! } - diff --git a/backend/src/schema/types/type/Post.gql b/backend/src/schema/types/type/Post.gql index 0a7277515..7e6d1d0e7 100644 --- a/backend/src/schema/types/type/Post.gql +++ b/backend/src/schema/types/type/Post.gql @@ -84,8 +84,8 @@ input _PostFilter { group: _GroupFilter postsInMyGroups: Boolean postType_in: [PostType] - eventStart_gte: String - eventEnd_gte: String + eventStart_gte: String + eventEnd_gte: String } enum _PostOrdering { From 86bd4bad5b6921e55bb3cb1dd13029719d2ae10e Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 12 Jul 2023 09:38:31 +0200 Subject: [PATCH 27/39] fixed intends for token style file --- webapp/assets/_new/styles/tokens.scss | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/webapp/assets/_new/styles/tokens.scss b/webapp/assets/_new/styles/tokens.scss index 28ebb2abd..d84b92ac9 100644 --- a/webapp/assets/_new/styles/tokens.scss +++ b/webapp/assets/_new/styles/tokens.scss @@ -410,24 +410,24 @@ $color-ribbon-article-active: $background-color-secondary-active; :export { - colorPrimary: $color-primary; - colorPrimaryActive: $color-primary-active; - colorPrimaryLight: $color-primary-light; + colorPrimary: $color-primary; + colorPrimaryActive: $color-primary-active; + colorPrimaryLight: $color-primary-light; - borderColorSoft: $border-color-soft; + borderColorSoft: $border-color-soft; - borderRadiusBase: $border-radius-base; + borderRadiusBase: $border-radius-base; - textColorBase: $text-color-base; - textColorSoft: $text-color-soft; - textColorInverse: $text-color-inverse; + textColorBase: $text-color-base; + textColorSoft: $text-color-soft; + textColorInverse: $text-color-inverse; - boxShadowBase: $box-shadow-base; + boxShadowBase: $box-shadow-base; - backgroundColorBase: $background-color-base; - backgroundColorSoft: $background-color-soft; - backgroundColorSoftest: $background-color-softest; - backgroundColorPrimary: $background-color-primary; + backgroundColorBase: $background-color-base; + backgroundColorSoft: $background-color-soft; + backgroundColorSoftest: $background-color-softest; + backgroundColorPrimary: $background-color-primary; - colorNeutral30: $color-neutral-30; + colorNeutral30: $color-neutral-30; } \ No newline at end of file From c51f7afd9a7f612ba72c7f3cfca2346316c412d1 Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 12 Jul 2023 10:15:25 +0200 Subject: [PATCH 28/39] fixed syntax error in default layout --- webapp/layouts/default.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index ab8abcbee..bd518b976 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -39,9 +39,9 @@ export default { mixins: [seo, mobile()], methods: { closeSingleRoom() { - this.$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: 'u0' }) + this.$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: null }) }, - } + }, beforeCreate() { this.$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: null }) }, From a5cb81ceacf1ff4974a26fabf93fa1631ff44efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 12 Jul 2023 11:24:12 +0200 Subject: [PATCH 29/39] Change group marker from blue to red on map --- webapp/pages/map.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/pages/map.vue b/webapp/pages/map.vue index 1db2b189a..2bf1817f7 100644 --- a/webapp/pages/map.vue +++ b/webapp/pages/map.vue @@ -117,9 +117,9 @@ export default { { id: 'group', icon: { - id: 'marker-blue', - legendName: 'mapbox-marker-icon-blue.svg', - mapName: 'mapbox-marker-icon-20px-blue.png', + id: 'marker-red', + legendName: 'mapbox-marker-icon-red.svg', + mapName: 'mapbox-marker-icon-20px-red.png', }, }, { @@ -407,7 +407,7 @@ export default { type: 'Feature', properties: { type: 'group', - iconName: 'marker-blue', + iconName: 'marker-red', iconRotate: 0.0, id: group.id, slug: group.slug, From b2976f06eb41568844ed0cc1cac04d559621a5b0 Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 12 Jul 2023 12:34:12 +0200 Subject: [PATCH 30/39] updated style for chat component --- webapp/assets/_new/styles/tokens.scss | 16 ++++++++++++++++ webapp/constants/chat.js | 8 ++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/webapp/assets/_new/styles/tokens.scss b/webapp/assets/_new/styles/tokens.scss index d84b92ac9..372dab0c8 100644 --- a/webapp/assets/_new/styles/tokens.scss +++ b/webapp/assets/_new/styles/tokens.scss @@ -408,6 +408,15 @@ $color-ribbon-event-active: $background-color-third-active; $color-ribbon-article: $background-color-secondary; $color-ribbon-article-active: $background-color-secondary-active; +/** + * @tokens Chat Color + */ + +$chat-message-bg-me: $color-primary-light; +$chat-message-color: $text-color-base; +$chat-message-bg-others: $color-neutral-80; +$chat-sidemenu-bg: $color-secondary-active; +$chat-new-message-color: $color-secondary-active; :export { colorPrimary: $color-primary; @@ -430,4 +439,11 @@ $color-ribbon-article-active: $background-color-secondary-active; backgroundColorPrimary: $background-color-primary; colorNeutral30: $color-neutral-30; + + chatMessageColor: $chat-message-color; + + chatMessageBgMe: $chat-message-bg-me; + chatMessageBgOthers: $chat-message-bg-others; + + chatNewMessageColor: $chat-new-message-color; } \ No newline at end of file diff --git a/webapp/constants/chat.js b/webapp/constants/chat.js index 79d8f0cd7..a183a3922 100644 --- a/webapp/constants/chat.js +++ b/webapp/constants/chat.js @@ -57,9 +57,9 @@ const STYLE = { }, message: { - background: styleData.backgroundColorBase, - backgroundMe: styleData.colorPrimaryLight, - color: styleData.textColorBase, + background: styleData.chatMessageBgOthers, + backgroundMe: styleData.chatMessageBgMe, + color: styleData.chatMessageColor, colorStarted: '#9ca6af', backgroundDeleted: '#dadfe2', backgroundSelected: '#c2dcf2', @@ -76,7 +76,7 @@ const STYLE = { colorReply: '#6e6e6e', colorTag: '#0d579c', backgroundImage: '#ddd', - colorNewMessages: '#1976d2', + colorNewMessages: styleData.chatNewMessageColor, backgroundScrollCounter: '#0696c7', colorScrollCounter: '#fff', backgroundReaction: '#eee', From 181207a90b924f237fe620289761492417f9c25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 12 Jul 2023 14:28:04 +0200 Subject: [PATCH 31/39] Move chat notification button in header to position between language and system notification - Add this button to mobile as well. --- webapp/components/HeaderMenu/HeaderMenu.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/webapp/components/HeaderMenu/HeaderMenu.vue b/webapp/components/HeaderMenu/HeaderMenu.vue index bef73186b..a08bec882 100644 --- a/webapp/components/HeaderMenu/HeaderMenu.vue +++ b/webapp/components/HeaderMenu/HeaderMenu.vue @@ -74,6 +74,10 @@