[notify] fixed warning and info popups
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user