From 51b28cebdb6d6dd5686de62641b10c9bdc0c01d5 Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Fri, 27 Jun 2025 10:25:46 -0300 Subject: [PATCH] Add configurable toast position for notifications --- view/js/script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/view/js/script.js b/view/js/script.js index c4a4a4f0b4..35750a8e44 100644 --- a/view/js/script.js +++ b/view/js/script.js @@ -1342,6 +1342,7 @@ function avideoAlertOnceForceConfirm(title, msg, type) { }); } +var toastPosition = null; function _avideoToast(msg, icon, displayTime = 0) { if (empty(msg)) { msg = ''; @@ -1357,7 +1358,10 @@ function _avideoToast(msg, icon, displayTime = 0) { displayTime = Math.max(readingTimeInSeconds * 1000 + 2000, 7000); // Minimum display time of 7000ms } - var options = { text: msg, hideAfter: displayTime }; + var options = { text: msg, hideAfter: displayTime}; + if(toastPosition && toastPosition !== 'undefined') { + options.position = toastPosition; + } if (icon) { options.icon = icon; }