From e7c4672d8f592ab7a75eaef45b0e7464294cae75 Mon Sep 17 00:00:00 2001 From: supertiger1234 Date: Sat, 25 Jan 2020 17:46:13 +0000 Subject: [PATCH] add saved notes button --- src/components/app/FriendsList.vue | 45 +++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/components/app/FriendsList.vue b/src/components/app/FriendsList.vue index 41d1198..a1fc822 100644 --- a/src/components/app/FriendsList.vue +++ b/src/components/app/FriendsList.vue @@ -29,6 +29,14 @@
+
+
notes
+
Saved Notes
+
@@ -60,6 +68,14 @@ export default { localStorage.setItem("friendsListTab", tab); } }, + methods: { + saveNotesBtn() { + this.$store.dispatch("openChat", { + uniqueID: this.user.uniqueID, + channelName: "Saved Notes" + }); + } + }, mounted() { const tab = localStorage.getItem("friendsListTab"); if (tab) { @@ -67,6 +83,12 @@ export default { } }, computed: { + user() { + return this.$store.getters.user; + }, + uniqueIDSelected() { + return this.$store.getters.selectedUserUniqueID === this.user.uniqueID; + }, DMNotification() { const notifications = this.$store.getters.notifications; const channels = this.$store.getters.channels; @@ -96,7 +118,7 @@ export default { } }; -