mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Bugfix: Notification enum conflicts with window.Notification
This commit is contained in:
parent
b5ab175953
commit
8d52b0afdf
13 changed files with 47 additions and 46 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import ko from 'ko';
|
||||
import { Notification, UploadErrorCode } from 'Common/Enums';
|
||||
import { Notifications, UploadErrorCode } from 'Common/Enums';
|
||||
import { langLink } from 'Common/Links';
|
||||
import { doc, createElement } from 'Common/Globals';
|
||||
import { getKeyByValue, forEachObjectEntry } from 'Common/Utils';
|
||||
|
|
@ -20,7 +20,7 @@ const
|
|||
i18nKey = key => key.replace(/([a-z])([A-Z])/g, '$1_$2').toUpperCase(),
|
||||
|
||||
getNotificationMessage = code => {
|
||||
let key = getKeyByValue(Notification, code);
|
||||
let key = getKeyByValue(Notifications, code);
|
||||
return key ? I18N_DATA.NOTIFICATIONS[i18nKey(key).replace('_NOTIFICATION', '_ERROR')] : '';
|
||||
},
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ export const
|
|||
*/
|
||||
getNotification = (code, message = '', defCode = 0) => {
|
||||
code = pInt(code);
|
||||
if (Notification.ClientViewError === code && message) {
|
||||
if (Notifications.ClientViewError === code && message) {
|
||||
return message;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue