[notify] fixed warning and info popups

This commit is contained in:
Luca Haid
2024-04-02 16:43:56 +02:00
parent 9994c7c7d2
commit 773651da21

View File

@@ -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;