mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-24 17:11:43 +00:00
bug fixed. need to work on server notifi server si
This commit is contained in:
parent
0fe79d64bd
commit
7365685802
6 changed files with 24 additions and 8 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="information">
|
<div class="information">
|
||||||
<div :class="{name: true, clickable: !!uniqueID }" @click="openUserInfoPanel">{{name}}</div>
|
<div :class="{name: true, clickable: !!uniqueID }" @click="openUserInfoPanel">{{name}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="show-members-button" @click="toggleMembersPanel">
|
<div v-if="type === 2" class="show-members-button" @click="toggleMembersPanel">
|
||||||
<i class="material-icons">view_list</i>
|
<i class="material-icons">view_list</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<friends-list
|
<friends-list
|
||||||
class="left-panel"
|
class="left-panel"
|
||||||
v-click-outside="hideLeftPanel"
|
v-click-outside="hideLeftPanel"
|
||||||
v-show="$mq === 'mobile' && showLeftPanel || $mq === 'desktop'"
|
v-show="$mq === 'mobile' && showLeftPanel || ($mq !== 'mobile')"
|
||||||
/>
|
/>
|
||||||
</transition>
|
</transition>
|
||||||
<message-panel/>
|
<message-panel/>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,9 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
notifications () {
|
notifications () {
|
||||||
const channelID = this.$props.channelID;
|
const channelID = this.$props.channelID;
|
||||||
|
const channels = this.$store.getters.channels;
|
||||||
const notifications = this.$store.getters.notifications.find(function(e) {
|
const notifications = this.$store.getters.notifications.find(function(e) {
|
||||||
|
if (channels[e.channelID] && channels[e.channelID].server_id) return;
|
||||||
return e.channelID == channelID
|
return e.channelID == channelID
|
||||||
})
|
})
|
||||||
if (!notifications || (this.$props.channelID === this.$store.getters.selectedChannelID && document.hasFocus())) return;
|
if (!notifications || (this.$props.channelID === this.$store.getters.selectedChannelID && document.hasFocus())) return;
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,14 @@ export default {
|
||||||
friends() {
|
friends() {
|
||||||
const allFriend = this.$store.getters.user.friends;
|
const allFriend = this.$store.getters.user.friends;
|
||||||
const notifications = this.$store.getters.notifications;
|
const notifications = this.$store.getters.notifications;
|
||||||
|
const channels = this.$store.getters.channels;
|
||||||
const result = Object.keys(allFriend).map(function(key) {
|
const result = Object.keys(allFriend).map(function(key) {
|
||||||
const friend = allFriend[key];
|
const friend = allFriend[key];
|
||||||
const findNotification = notifications.find( e => e.sender.uniqueID === friend.recipient.uniqueID )
|
const findNotification = notifications.find( e => {
|
||||||
|
|
||||||
|
return e.sender.uniqueID === friend.recipient.uniqueID && !channels[e.channelID].server_id
|
||||||
|
|
||||||
|
})
|
||||||
if ( findNotification ){
|
if ( findNotification ){
|
||||||
friend.channelID = findNotification.channelID;
|
friend.channelID = findNotification.channelID;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,13 @@ const newFriendAudio = new Audio(newFriendSound);
|
||||||
export default {
|
export default {
|
||||||
notification: () => {
|
notification: () => {
|
||||||
if (isBusy()) return;
|
if (isBusy()) return;
|
||||||
notificationAudio.play();
|
const audio = new Audio(notificationSound);
|
||||||
|
audio.play();
|
||||||
},
|
},
|
||||||
newFriend: () => {
|
newFriend: () => {
|
||||||
if (isBusy()) return;
|
if (isBusy()) return;
|
||||||
newFriendAudio.play();
|
const audio = new Audio(newFriendSound);
|
||||||
|
audio.play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,12 @@
|
||||||
Changelog
|
Changelog
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="{tab: true, selected: currentTab === 0, notifyAnimation: DMNotification}" @click="switchTab(1)">
|
<div :class="{tab: true, selected: currentTab === 1, notifyAnimation: DMNotification}" @click="switchTab(1)">
|
||||||
<i class="material-icons">chat</i>
|
<i class="material-icons">chat</i>
|
||||||
Direct Message
|
Direct Message
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="{tab: true, selected: currentTab === 0, notifyAnimation: serverNotification}" @click="switchTab(2)">
|
<div :class="{tab: true, selected: currentTab === 2, notifyAnimation: serverNotification}" @click="switchTab(2)">
|
||||||
<i class="material-icons">forum</i>
|
<i class="material-icons">forum</i>
|
||||||
Servers
|
Servers
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -83,7 +83,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentTab: localStorage.getItem("currentTab") || 0,
|
currentTab: 0,
|
||||||
title: "Nertivia",
|
title: "Nertivia",
|
||||||
isElectron: window && window.process && window.process.type
|
isElectron: window && window.process && window.process.type
|
||||||
};
|
};
|
||||||
|
|
@ -114,6 +114,13 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
|
const currentTab = localStorage.getItem("currentTab");
|
||||||
|
if(currentTab) {
|
||||||
|
this.currentTab = parseInt(currentTab);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// check if changelog is updated
|
// check if changelog is updated
|
||||||
const seenVersion = localStorage.getItem("changelog-version-seen");
|
const seenVersion = localStorage.getItem("changelog-version-seen");
|
||||||
if (!seenVersion || seenVersion < changelog[0].version) {
|
if (!seenVersion || seenVersion < changelog[0].version) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue