This commit is contained in:
Mirco Wittrien 2021-01-24 14:05:34 +01:00
parent 2060db786f
commit 493c5965af
2 changed files with 11 additions and 11 deletions

View File

@ -358,7 +358,7 @@
"icon": "<svg name='Checkmark' width='%%width' height='%%height' viewBox='0 0 18 18'><g fill='none' fill-rule='evenodd'><polyline stroke='%%color' stroke-width='2' points='3.5 9.5 7 13 15 5'></polyline></g></svg>"
},
"CHECKMARK_CIRCLE": {
"icon": "<svg name='CheckmarkCircle' width='%%width' height='%%height' viewBox='0 0 24 24'><path fill='%%color' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/></svg>"
"icon": "<svg name='CheckmarkCircle' width='%%width' height='%%height' viewBox='0 0 24 24'><path fill='%%color' d='M 12,1e-7 C 5.376,1e-7 0,5.376 0,12 0,18.624 5.376,24 12,24 18.624,24 24,18.624 24,12 24,5.376 18.624,1e-7 12,1e-7 Z M 9.6,18 l -6,-6 1.692,-1.692 4.308,4.296 9.11,-9.11 1.692,1.704 z'/></svg>"
},
"CLOSE": {
"defaultProps": {
@ -408,7 +408,7 @@
"icon": "<svg name='Gradient' width='%%width' height='%%height' viewBox='0 0 36 36'><path fill='%%color' d='M 5,0 C 0,0 0,5 0,5 V 31 c 0,5 5,5 5,5 h 26 c 5,0 5,-5 5,-5 V 5 C 36,0 31,0 31,0 Z M 4,4 h 8 v 4 h 4 v -4 h 4 v 4 h 4 V 12 h -4 v 4 h 4 v 4 h -4 v 4 h 4 v 4 h -4 v 4 h -4 v -4 h -4 v 4 H 4 Z M 16,28 h 4 v -4 h -4 z m 0,-4 v -4 h -4 v 4 z m 0,-4 h 4 v -4 h -4 z m 0,-4 v -4 h -4 v 4 z m 0,-4 h 4 V 8 h -4 z'/></svg>"
},
"INFO": {
"icon": "<svg name='Info' width='%%width' height='%%height' viewBox='0 0 24 24'><path fill='%%color' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/></svg>"
"icon": "<svg name='Info' width='%%width' height='%%height' viewBox='0 0 24 24'><path fill='%%color' d='M 12,0 C 5.376,0 0,5.376 0,12 0,18.624 5.376,24 12,24 18.624,24 24,18.624 24,12 24,5.376 18.624,0 12,0 Z m 1.2,18 h -2.4 v -7.2 h 2.4 z m 0,-9.6 h -2.4 v -2.4 h 2.4 z'/></svg>"
},
"LEFT_CARET": {
"icon": "<svg name='LeftCaret' width='%%width' height='%%height' viewBox='0 0 24 24'><g fill='none' fill-rule='evenodd'><polygon fill='%%color' fill-rule='nonzero' points='18.35 4.35 16 2 6 12 16 22 18.35 19.65 10.717 12'></polygon><polygon points='0 0 24 0 24 24 0 24'></polygon></g></svg>"
@ -490,7 +490,7 @@
"icon": "<svg name='Trash' width='%%width' height='%%height' viewBox='0 0 24 24'><path fill='none' d='M0 0h24v24H0V0z'/><path fill='%%color' d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z'/></svg>"
},
"WARNING": {
"icon": "<svg name='Warning' width='%%width' height='%%height' viewBox='0 0 24 24'><path fill='%%color' d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/></svg>"
"icon": "<svg name='Warning' width='%%width' height='%%height' viewBox='0 0 24 24'><path fill='%%color' d='M 0,22.35 H 24 L 12,1.6227273 Z m 13.090909,-3.272727 h -2.181818 v -2.181818 h 2.181818 z m 0,-4.363637 H 10.909091 V 10.35 h 2.181818 z'/></svg>"
}
},
"CustomClassModules": {

View File

@ -775,22 +775,22 @@ module.exports = (_ => {
if (observedUsers[id][status.name] == notificationTypes.DESKTOP.value) {
let desktopString = string.replace(/\$user/g, `${name}${settings.showDiscriminator ? ("#" + user.discriminator) : ""}`).replace(/\$status/g, statusName);
if (status.activity) desktopString = desktopString.replace(/\$song|\$game/g, status.activity.name || status.activity.details || "").replace(/\$artist|\$custom/g, [status.activity.emoji && status.activity.emoji.name, status.activity.state].filter(n => n).join(" ") || "");
let notificationsound = notificationSounds["desktop" + status.name] || {};
BDFDB.NotificationUtils.desktop(desktopString, {icon: avatar, timeout: desktopTime, click: openChannel, silent: notificationsound.mute, sound: notificationsound.song});
let notificationSound = notificationSounds["desktop" + status.name] || {};
BDFDB.NotificationUtils.desktop(desktopString, {icon: avatar, timeout: desktopTime, click: openChannel, silent: notificationSound.mute, sound: notificationSound.song});
}
else if (!document.querySelector(`.friendnotifications-${id}-toast`)) {
let toast = BDFDB.NotificationUtils.toast(`<div class="${BDFDB.disCN.toastinner}"><div class="${BDFDB.disCN.toastavatar}" style="background-image: url(${avatar});"></div><div>${toastString}</div></div>`, {
BDFDB.NotificationUtils.toast(toastString, {
className: `friendnotifications-${status.name}-toast friendnotifications-${id}-toast`,
html: true,
timeout: toastTime,
avatar: avatar,
color: BDFDB.UserUtils.getStatusColor(status.name),
icon: false
onClick: openChannel
});
toast.addEventListener("click", openChannel);
let notificationsound = notificationSounds["toast" + status.name] || {};
if (!notificationsound.mute && notificationsound.song) {
let notificationSound = notificationSounds["toast" + status.name] || {};
if (!notificationSound.mute && notificationSound.song) {
let audio = new Audio();
audio.src = notificationsound.song;
audio.src = notificationSound.song;
audio.play();
}
}