📃Custom Notify

To add more types of notifications you just have to add to config.js

    NotificationIcons: {
        success: '<i class="fas fa-check-circle"></i>',
        error: '<i class="fas fa-times-circle"></i>',
        info: '<i class="fas fa-info-circle"></i>',
        warning: '<i class="fas fa-exclamation-triangle"></i>',
        business: '<i class="fas fa-briefcase"></i>',
        mechanic: '<i class="fas fa-wrench"></i>',
        restaurant: '<i class="fas fa-utensils"></i>',
        urban: '<i class="fas fa-city"></i>',
        uwu: '<i class="fas fa-cat"></i>',
        primary: '<i class="fas fa-bell"></i>',
        default: '<i class="fas fa-bell"></i>'
    },

To add sound you have to add in the sounds section

    Sounds: {
        success: new Audio('assets/sounds/tap-notification-180637.mp3'),
        error: new Audio('assets/sounds/tap-notification-180637.mp3'),
        info: new Audio('assets/sounds/tap-notification-180637.mp3'),
        help: new Audio('assets/sounds/drawtext.mp3'),
        uwu: new Audio('assets/sounds/tap-notification-180637.mp3'),
        business: new Audio('assets/sounds/tap-notification-180637.mp3')
    }

To configure the sound you just have to adjust it in the volumes

Config.Sounds.success.volume = 0.1;
Config.Sounds.help.volume = 0.3;
Config.Sounds.error.volume = 0.1;
Config.Sounds.uwu.volume = 0.1;
Config.Sounds.business.volume = 0.1;
Config.Sounds.info.volume = 0.1;

To style the notification type you have to go to html/css/notifications.css

.notification.YOU_TYPE_NAME {
}

Finally configure the notification icon in html/css/icons.css

.notification.YOU_TYPE_NAME i {
    color: #ffffff;
    text-shadow: 0 0 10px #ffffff;
    animation: successPulse 1s ease-in-out infinite;
}

Última actualización