diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue new file mode 100644 index 000000000..c2b02c0af --- /dev/null +++ b/webapp/components/Chat/Chat.vue @@ -0,0 +1,241 @@ + + + + diff --git a/webapp/components/ChatNotificationMenu/ChatNotificationMenu.vue b/webapp/components/ChatNotificationMenu/ChatNotificationMenu.vue new file mode 100644 index 000000000..537affd38 --- /dev/null +++ b/webapp/components/ChatNotificationMenu/ChatNotificationMenu.vue @@ -0,0 +1,140 @@ + + + + diff --git a/webapp/components/HeaderMenu/HeaderMenu.vue b/webapp/components/HeaderMenu/HeaderMenu.vue index b5622d7ed..bef73186b 100644 --- a/webapp/components/HeaderMenu/HeaderMenu.vue +++ b/webapp/components/HeaderMenu/HeaderMenu.vue @@ -92,6 +92,10 @@ + + + + @@ -265,6 +269,7 @@ import SearchField from '~/components/features/SearchField/SearchField.vue' import NotificationMenu from '~/components/NotificationMenu/NotificationMenu' import links from '~/constants/links.js' import PageParamsLink from '~/components/_new/features/PageParamsLink/PageParamsLink.vue' +import ChatNotificationMenu from '~/components/ChatNotificationMenu/ChatNotificationMenu' export default { components: { @@ -278,6 +283,7 @@ export default { NotificationMenu, PageParamsLink, SearchField, + ChatNotificationMenu, }, props: { showMobileMenu: { type: Boolean, default: false }, diff --git a/webapp/graphql/Messages.js b/webapp/graphql/Messages.js new file mode 100644 index 000000000..099a7265e --- /dev/null +++ b/webapp/graphql/Messages.js @@ -0,0 +1,15 @@ +import gql from 'graphql-tag' + +export const messageQuery = () => { + return gql` + query ($roomId: ID!) { + Message(roomId: $roomId) { + id + content + author { + id + } + } + } + ` +} diff --git a/webapp/graphql/Rooms.js b/webapp/graphql/Rooms.js new file mode 100644 index 000000000..e8f1d9f6f --- /dev/null +++ b/webapp/graphql/Rooms.js @@ -0,0 +1,12 @@ +import gql from 'graphql-tag' + +export const roomQuery = () => gql` + query { + Room { + id + users { + id + } + } + } +` diff --git a/webapp/layouts/default.spec.js b/webapp/layouts/default.spec.js index bf54d3581..1b83491d7 100644 --- a/webapp/layouts/default.spec.js +++ b/webapp/layouts/default.spec.js @@ -36,6 +36,9 @@ describe('default.vue', () => { store = new Vuex.Store({ getters: { 'auth/isLoggedIn': () => true, + 'chat/showChat': () => { + return { showChat: false, roomID: 'u0' } + }, }, }) }) diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index 524a530d1..ae6c10b73 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -13,21 +13,32 @@ +
+ + RoomID: {{ $store.getters['chat/showChat'].roomID }} + + x + + + +
+ > - diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index 06e95abb4..62d2f1be7 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -79,6 +79,15 @@ @optimistic="optimisticFollow" @update="updateFollow" /> + + +