mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-07-05 02:50:46 +00:00
Changed notification sounds
This commit is contained in:
parent
69001851ad
commit
1febb15e6b
6 changed files with 6 additions and 4 deletions
Binary file not shown.
BIN
src/assets/sounds/Mention.mp3
Normal file
BIN
src/assets/sounds/Mention.mp3
Normal file
Binary file not shown.
BIN
src/assets/sounds/Message.mp3
Normal file
BIN
src/assets/sounds/Message.mp3
Normal file
Binary file not shown.
Binary file not shown.
|
|
@ -25,7 +25,7 @@ const actions = {
|
||||||
(currentTab !== 1 && currentTab !== 2) ||
|
(currentTab !== 1 && currentTab !== 2) ||
|
||||||
!document.hasFocus()
|
!document.hasFocus()
|
||||||
) {
|
) {
|
||||||
NotificationSounds.notification();
|
NotificationSounds.notification(mentioned);
|
||||||
}
|
}
|
||||||
let find = context.state.notifications.find(item => {
|
let find = context.state.notifications.find(item => {
|
||||||
return item.channelID === channelID;
|
return item.channelID === channelID;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
import notificationSound from "@/assets/sounds/Notification.mp3";
|
import messageSound from "@/assets/sounds/Message.mp3";
|
||||||
|
import mentionSound from "@/assets/sounds/Mention.mp3";
|
||||||
import newFriendSound from "@/assets/sounds/FriendRequest.mp3";
|
import newFriendSound from "@/assets/sounds/FriendRequest.mp3";
|
||||||
|
|
||||||
import { store } from "@/store/index";
|
import { store } from "@/store/index";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
notification: () => {
|
notification: mentioned => {
|
||||||
if (isBusy() || isNotificationDisabled()) return;
|
if (isBusy() || isNotificationDisabled()) return;
|
||||||
const audio = new Audio(notificationSound);
|
const audio = new Audio(mentioned ? mentionSound : messageSound);
|
||||||
audio.play();
|
audio.play();
|
||||||
},
|
},
|
||||||
newFriend: () => {
|
newFriend: () => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue