1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Add configurable toast position for notifications

This commit is contained in:
Daniel Neto 2025-06-27 10:25:46 -03:00
parent 7502151965
commit 51b28cebdb

View file

@ -1342,6 +1342,7 @@ function avideoAlertOnceForceConfirm(title, msg, type) {
});
}
var toastPosition = null;
function _avideoToast(msg, icon, displayTime = 0) {
if (empty(msg)) {
msg = '';
@ -1358,6 +1359,9 @@ function _avideoToast(msg, icon, displayTime = 0) {
}
var options = { text: msg, hideAfter: displayTime};
if(toastPosition && toastPosition !== 'undefined') {
options.position = toastPosition;
}
if (icon) {
options.icon = icon;
}