diff --git a/frontend/src/components/BaseLayout.vue b/frontend/src/components/BaseLayout.vue
index f47d32c..6413f2d 100644
--- a/frontend/src/components/BaseLayout.vue
+++ b/frontend/src/components/BaseLayout.vue
@@ -48,88 +48,7 @@
- -
-
-
-
-
-
-
-
+
-
@@ -198,22 +117,21 @@
import {mapGetters, mapMutations, mapState} from 'vuex';
import * as BIcons from "bootstrap-icons-vue";
import Notifications from "@/components/Notifications.vue";
+import Messages from "@/components/Messages.vue";
export default {
name: 'BaseLayout',
components: {
+ Messages,
Notifications,
...BIcons
},
computed: {
- //...mapState(['notifications']),
+ ...mapState(['messages']),
...mapGetters(['notifications']),
username() {
return this.$route.params.username
},
- top_notifications() {
- return this.notifications.slice(0, 5)
- },
},
methods: {
...mapMutations(['logout'])
diff --git a/frontend/src/components/Messages.vue b/frontend/src/components/Messages.vue
new file mode 100644
index 0000000..99e880b
--- /dev/null
+++ b/frontend/src/components/Messages.vue
@@ -0,0 +1,111 @@
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/components/Notifications.vue b/frontend/src/components/Notifications.vue
index 1c8daab..329f2c5 100644
--- a/frontend/src/components/Notifications.vue
+++ b/frontend/src/components/Notifications.vue
@@ -54,7 +54,12 @@ export default {
components: {
...BIcons
},
- props: ['notifications'],
+ props: {
+ notifications: {
+ type: Array,
+ default: () => []
+ }
+ },
computed: {
top_notifications() {
return this.notifications.sort((a, b) => {
diff --git a/frontend/src/store.js b/frontend/src/store.js
index 7e51f9e..871da94 100644
--- a/frontend/src/store.js
+++ b/frontend/src/store.js
@@ -13,6 +13,7 @@ export default createStore({
friends: [],
item_map: {},
//notifications: [],
+ messages: [],
resolver: new FallBackResolver(),
unreachable_neighbors: new NeighborsCache(),
},