mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-18 22:11:03 +00:00
bug fixes
This commit is contained in:
parent
d147258333
commit
7fc1b81b13
5 changed files with 1121 additions and 1195 deletions
|
|
@ -298,11 +298,10 @@ export default {
|
|||
enterEmojiPanel(shortcode) {
|
||||
const target = this.$refs["input-box"];
|
||||
target.focus();
|
||||
const isSuccessful = document.execCommand("insertText", false, `:${shortcode}: `);
|
||||
|
||||
if (document.queryCommandSupported("insertText")) {
|
||||
document.execCommand("insertText", false, `:${shortcode}: `);
|
||||
} else {
|
||||
document.execCommand("paste", false, `:${shortcode}: `);
|
||||
if (!isSuccessful) {
|
||||
this.message = this.message + `:${shortcode}: `;
|
||||
}
|
||||
target.blur();
|
||||
this.$store.dispatch("settingsModule/addRecentEmoji", shortcode);
|
||||
|
|
|
|||
|
|
@ -106,10 +106,14 @@ export default {
|
|||
formData.append(
|
||||
"emoji",
|
||||
file,
|
||||
`${fileName}-1${path.extname(file.name)}`
|
||||
`${fileName.substring(0, 28)}-1${path.extname(file.name)}`
|
||||
);
|
||||
} else {
|
||||
formData.append("emoji", file);
|
||||
formData.append(
|
||||
"emoji",
|
||||
file,
|
||||
`${fileName.substring(0, 30)}${path.extname(file.name)}`
|
||||
);
|
||||
}
|
||||
const { ok, error, result } = await customEmoji.post(
|
||||
formData,
|
||||
|
|
|
|||
|
|
@ -13,11 +13,26 @@
|
|||
}
|
||||
|
||||
const config = [
|
||||
{
|
||||
version: 4.7,
|
||||
title: "Bug fixes",
|
||||
shortTitle: "Bug fixes",
|
||||
date: "22/06/2019",
|
||||
headColor: "rgba(3, 70, 115, 0.77)",
|
||||
new: [
|
||||
"Emoji character limit expanded to 30 characters!"
|
||||
],
|
||||
fix: [
|
||||
"Fixed a bug with the notification where it wouldn't dismiss on changing tabs.",
|
||||
"Fixed a bug where unopened dms wouldn't show notifications on the tabs.",
|
||||
],
|
||||
next: ["Online status for server members list."]
|
||||
},
|
||||
{
|
||||
version: 4.6,
|
||||
title: "Server Members list and bug fixes",
|
||||
shortTitle: "Server Members list and bug fixes",
|
||||
date: "20/06/2019",
|
||||
date: "21/06/2019",
|
||||
headColor: "rgba(0, 102, 170, 0.77)",
|
||||
new: [
|
||||
"Server members are now shown!",
|
||||
|
|
@ -25,6 +40,8 @@ const config = [
|
|||
],
|
||||
fix: [
|
||||
"Fixed a vulnerability where after leaving a server, you could still send messages.",
|
||||
"Fixed emoji character limit bypass.",
|
||||
"Emojis can now be inserted in firefox!",
|
||||
],
|
||||
next: ["Online status for server members list."]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
Changelog
|
||||
</div>
|
||||
|
||||
<div :class="{tab: true, selected: currentTab === 1, notifyAnimation: DMNotification}" @click="switchTab(1)">
|
||||
<div :class="{tab: true, selected: currentTab === 1, notifyAnimation: DMNotification || friendRequestExists}" @click="switchTab(1)">
|
||||
<i class="material-icons">chat</i>
|
||||
Direct Message
|
||||
</div>
|
||||
|
|
@ -89,6 +89,16 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
dismissNotification (channelID) {
|
||||
const notifications = this.$store.getters.notifications.find(function(e) {
|
||||
return e.channelID === channelID
|
||||
})
|
||||
|
||||
if (notifications && notifications.count >= 1 && document.hasFocus()) {
|
||||
this.$socket.emit('notification:dismiss', {channelID});
|
||||
}
|
||||
},
|
||||
switchChannel(isServer) {
|
||||
const serverChannelID = this.$store.state.channelModule.serverChannelID;
|
||||
const DMChannelID = this.$store.state.channelModule.DMChannelID;
|
||||
|
|
@ -97,11 +107,14 @@ export default {
|
|||
this.$store.dispatch('selectedChannelID', serverChannelID)
|
||||
const channel = this.$store.state.channelModule.channels[serverChannelID];
|
||||
this.$store.dispatch("setChannelName", channel ? channel.name : "")
|
||||
this.dismissNotification(serverChannelID)
|
||||
} else {
|
||||
const channel = this.$store.state.channelModule.channels[DMChannelID];
|
||||
this.$store.dispatch("setChannelName", channel ? channel.recipients[0].username : "");
|
||||
this.$store.dispatch('selectedChannelID', DMChannelID)
|
||||
this.dismissNotification(DMChannelID)
|
||||
}
|
||||
|
||||
},
|
||||
switchTab(index) {
|
||||
localStorage.setItem("currentTab", index);
|
||||
|
|
@ -150,7 +163,20 @@ export default {
|
|||
const notification = notifications.find(e => {
|
||||
return channels[e.channelID] && !channels[e.channelID].server_id
|
||||
})
|
||||
// unopened dm
|
||||
if (!notification) {
|
||||
return notifications.find(e => {
|
||||
return !channels[e.channelID]
|
||||
})
|
||||
}
|
||||
return notification;
|
||||
},
|
||||
friendRequestExists() {
|
||||
const allFriend = this.$store.getters.user.friends;
|
||||
const result = Object.keys(allFriend).map(function(key) {
|
||||
return allFriend[key];
|
||||
});
|
||||
return result.find(friend => friend.status === 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue