mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-07-06 11:30:46 +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) {
|
enterEmojiPanel(shortcode) {
|
||||||
const target = this.$refs["input-box"];
|
const target = this.$refs["input-box"];
|
||||||
target.focus();
|
target.focus();
|
||||||
|
const isSuccessful = document.execCommand("insertText", false, `:${shortcode}: `);
|
||||||
|
|
||||||
if (document.queryCommandSupported("insertText")) {
|
if (!isSuccessful) {
|
||||||
document.execCommand("insertText", false, `:${shortcode}: `);
|
this.message = this.message + `:${shortcode}: `;
|
||||||
} else {
|
|
||||||
document.execCommand("paste", false, `:${shortcode}: `);
|
|
||||||
}
|
}
|
||||||
target.blur();
|
target.blur();
|
||||||
this.$store.dispatch("settingsModule/addRecentEmoji", shortcode);
|
this.$store.dispatch("settingsModule/addRecentEmoji", shortcode);
|
||||||
|
|
|
||||||
|
|
@ -106,10 +106,14 @@ export default {
|
||||||
formData.append(
|
formData.append(
|
||||||
"emoji",
|
"emoji",
|
||||||
file,
|
file,
|
||||||
`${fileName}-1${path.extname(file.name)}`
|
`${fileName.substring(0, 28)}-1${path.extname(file.name)}`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
formData.append("emoji", file);
|
formData.append(
|
||||||
|
"emoji",
|
||||||
|
file,
|
||||||
|
`${fileName.substring(0, 30)}${path.extname(file.name)}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
const { ok, error, result } = await customEmoji.post(
|
const { ok, error, result } = await customEmoji.post(
|
||||||
formData,
|
formData,
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,26 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const config = [
|
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,
|
version: 4.6,
|
||||||
title: "Server Members list and bug fixes",
|
title: "Server Members list and bug fixes",
|
||||||
shortTitle: "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)",
|
headColor: "rgba(0, 102, 170, 0.77)",
|
||||||
new: [
|
new: [
|
||||||
"Server members are now shown!",
|
"Server members are now shown!",
|
||||||
|
|
@ -25,6 +40,8 @@ const config = [
|
||||||
],
|
],
|
||||||
fix: [
|
fix: [
|
||||||
"Fixed a vulnerability where after leaving a server, you could still send messages.",
|
"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."]
|
next: ["Online status for server members list."]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
Changelog
|
Changelog
|
||||||
</div>
|
</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>
|
<i class="material-icons">chat</i>
|
||||||
Direct Message
|
Direct Message
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -89,6 +89,16 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
switchChannel(isServer) {
|
||||||
const serverChannelID = this.$store.state.channelModule.serverChannelID;
|
const serverChannelID = this.$store.state.channelModule.serverChannelID;
|
||||||
const DMChannelID = this.$store.state.channelModule.DMChannelID;
|
const DMChannelID = this.$store.state.channelModule.DMChannelID;
|
||||||
|
|
@ -97,11 +107,14 @@ export default {
|
||||||
this.$store.dispatch('selectedChannelID', serverChannelID)
|
this.$store.dispatch('selectedChannelID', serverChannelID)
|
||||||
const channel = this.$store.state.channelModule.channels[serverChannelID];
|
const channel = this.$store.state.channelModule.channels[serverChannelID];
|
||||||
this.$store.dispatch("setChannelName", channel ? channel.name : "")
|
this.$store.dispatch("setChannelName", channel ? channel.name : "")
|
||||||
|
this.dismissNotification(serverChannelID)
|
||||||
} else {
|
} else {
|
||||||
const channel = this.$store.state.channelModule.channels[DMChannelID];
|
const channel = this.$store.state.channelModule.channels[DMChannelID];
|
||||||
this.$store.dispatch("setChannelName", channel ? channel.recipients[0].username : "");
|
this.$store.dispatch("setChannelName", channel ? channel.recipients[0].username : "");
|
||||||
this.$store.dispatch('selectedChannelID', DMChannelID)
|
this.$store.dispatch('selectedChannelID', DMChannelID)
|
||||||
|
this.dismissNotification(DMChannelID)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
switchTab(index) {
|
switchTab(index) {
|
||||||
localStorage.setItem("currentTab", index);
|
localStorage.setItem("currentTab", index);
|
||||||
|
|
@ -150,7 +163,20 @@ export default {
|
||||||
const notification = notifications.find(e => {
|
const notification = notifications.find(e => {
|
||||||
return channels[e.channelID] && !channels[e.channelID].server_id
|
return channels[e.channelID] && !channels[e.channelID].server_id
|
||||||
})
|
})
|
||||||
|
// unopened dm
|
||||||
|
if (!notification) {
|
||||||
|
return notifications.find(e => {
|
||||||
|
return !channels[e.channelID]
|
||||||
|
})
|
||||||
|
}
|
||||||
return notification;
|
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