diff --git a/public/plugins/notification/notify.js b/public/plugins/notification/notify.js index 37d92dee0..7fee5da5f 100644 --- a/public/plugins/notification/notify.js +++ b/public/plugins/notification/notify.js @@ -6,9 +6,19 @@ document.addEventListener('DOMContentLoaded', () => { // @formatter:on const notyf = new Notyf({ - duration: 10000 * 1000, position: { + duration: 10000, position: { x: 'right', y: 'bottom', }, ripple: true, dismissible: true, fontSize: '32px', + types: [{ + type: "info", + backgroundColor: "#17a2b8", + icon: {className: "fa fa-info-circle text-white",tagName: "i"} + }, + { + type: 'warning', + backgroundColor: '#ffc107', + icon: {className: 'fa fa-exclamation-triangle text-white',tagName: 'i',}, + }] }); /** @@ -22,13 +32,14 @@ document.addEventListener('DOMContentLoaded', () => { notyf.success(text); break; case 'info': - notyf.info(text); + notyf.open({type: 'info', message: text}); break; case 'warning': - notyf.warning(text); + notyf.open({type: 'warning', message: text}); break; case'warn': - notyf.warning(text); + notyf.open({type: 'warning', message: text}); + break; case 'error': notyf.error(text); break;