diff --git a/assets/sounds/new-mail.mp3 b/assets/sounds/new-mail.mp3 index f2ac755b4..bc8b603c5 100644 Binary files a/assets/sounds/new-mail.mp3 and b/assets/sounds/new-mail.mp3 differ diff --git a/assets/sounds/new-mail.ogg b/assets/sounds/new-mail.ogg index 7eb43ce13..fd5c1abba 100644 Binary files a/assets/sounds/new-mail.ogg and b/assets/sounds/new-mail.ogg differ diff --git a/dev/Common/Audio.js b/dev/Common/Audio.js index b541a4e5b..d6d9f5aeb 100644 --- a/dev/Common/Audio.js +++ b/dev/Common/Audio.js @@ -108,7 +108,7 @@ export const SMAudio = new class { if ('running' == audioCtx.state && (this.supportedMp3 || this.supportedOgg)) { if (!notificator) { notificator = createNewObject(); - notificator.src = Links.sound('new-mail.'+ (this.supportedMp3 ? 'mp3' : 'ogg')); + notificator.src = Links.staticLink('sounds/new-mail.'+ (this.supportedMp3 ? 'mp3' : 'ogg')); } if (notificator) { notificator.volume = silent ? 0.01 : 1; diff --git a/dev/Common/Links.js b/dev/Common/Links.js index 7ae30d4f6..47928e239 100644 --- a/dev/Common/Links.js +++ b/dev/Common/Links.js @@ -93,37 +93,22 @@ export function langLink(lang, isAdmin) { * @param {string} path * @returns {string} */ -export function staticPrefix(path) { +export function staticLink(path) { return VERSION_PREFIX + 'static/' + path; } -/** - * @param {string} fileName - * @returns {string} - */ -export function sound(fileName) { - return staticPrefix('sounds/' + fileName); -} - -/** - * @returns {string} - */ -export function notificationMailIcon() { - return staticPrefix('css/images/icon-message-notification.png'); -} - /** * @returns {string} */ export function openPgpJs() { - return staticPrefix('js/min/openpgp.min.js'); + return staticLink('js/min/openpgp.min.js'); } /** * @returns {string} */ export function openPgpWorkerJs() { - return staticPrefix('js/min/openpgp.worker.min.js'); + return staticLink('js/min/openpgp.worker.min.js'); } /** diff --git a/dev/Stores/User/Notification.js b/dev/Stores/User/Notification.js index a5b72e482..23322ceeb 100644 --- a/dev/Stores/User/Notification.js +++ b/dev/Stores/User/Notification.js @@ -69,7 +69,7 @@ export const NotificationUserStore = new class { if (DesktopNotifications && NotificationsGranted()) { const options = { body: text, - icon: imageSrc || Links.notificationMailIcon(), + icon: imageSrc || Links.staticLink('css/images/icon-message-notification.png'), data: messageData }; if (messageData && messageData.Uid) { @@ -78,7 +78,7 @@ export const NotificationUserStore = new class { if (WorkerNotifications) { // Service-Worker-Allowed HTTP header to allow the scope. WorkerNotifications.register('/serviceworker.js') -// WorkerNotifications.register(Links.staticPrefix('js/serviceworker.js'), {scope:'/'}) +// WorkerNotifications.register(Links.staticLink('js/serviceworker.js'), {scope:'/'}) .then(() => WorkerNotifications.ready.then(registration => /* Show the notification */