mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-24 17:11:43 +00:00
add saved notes button
This commit is contained in:
parent
2c9fd82dce
commit
e7c4672d8f
1 changed files with 44 additions and 1 deletions
|
|
@ -29,6 +29,14 @@
|
||||||
<div v-else class="list">
|
<div v-else class="list">
|
||||||
<recent-friends />
|
<recent-friends />
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
class="button"
|
||||||
|
:class="{ selected: uniqueIDSelected }"
|
||||||
|
@click="saveNotesBtn"
|
||||||
|
>
|
||||||
|
<div class="material-icons">notes</div>
|
||||||
|
<div class="name">Saved Notes</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -60,6 +68,14 @@ export default {
|
||||||
localStorage.setItem("friendsListTab", tab);
|
localStorage.setItem("friendsListTab", tab);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
saveNotesBtn() {
|
||||||
|
this.$store.dispatch("openChat", {
|
||||||
|
uniqueID: this.user.uniqueID,
|
||||||
|
channelName: "Saved Notes"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const tab = localStorage.getItem("friendsListTab");
|
const tab = localStorage.getItem("friendsListTab");
|
||||||
if (tab) {
|
if (tab) {
|
||||||
|
|
@ -67,6 +83,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
user() {
|
||||||
|
return this.$store.getters.user;
|
||||||
|
},
|
||||||
|
uniqueIDSelected() {
|
||||||
|
return this.$store.getters.selectedUserUniqueID === this.user.uniqueID;
|
||||||
|
},
|
||||||
DMNotification() {
|
DMNotification() {
|
||||||
const notifications = this.$store.getters.notifications;
|
const notifications = this.$store.getters.notifications;
|
||||||
const channels = this.$store.getters.channels;
|
const channels = this.$store.getters.channels;
|
||||||
|
|
@ -96,7 +118,7 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
.left-panel {
|
.left-panel {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 340px;
|
width: 340px;
|
||||||
|
|
@ -174,6 +196,27 @@ export default {
|
||||||
background: rgb(255, 255, 255);
|
background: rgb(255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
color: white;
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 5px;
|
||||||
|
justify-content: center;
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.2s;
|
||||||
|
.material-icons {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
&.selected {
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ------- SCROLL BAR -------*/
|
/* ------- SCROLL BAR -------*/
|
||||||
/* width */
|
/* width */
|
||||||
.list::-webkit-scrollbar {
|
.list::-webkit-scrollbar {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue