remove toast animations to fix green flash

This commit is contained in:
2026-01-20 13:32:57 +01:00
parent 0d8415ba4e
commit e722680863
2 changed files with 5 additions and 32 deletions

View File

@@ -252,23 +252,15 @@ function showToast(message, type)
type_class = " toast-warning"
end
-- Create toast with visible animation class
local toast_html = '<div id="active-toast" class="toast toast-visible' .. type_class .. '"><span>' .. message .. '</span></div>'
-- Create toast (no animation to avoid flash)
local toast_html = '<div id="active-toast" class="toast' .. type_class .. '"><span>' .. message .. '</span></div>'
container.inner_rml = toast_html
-- Auto-hide after 2.5 seconds (start hide animation, then remove)
-- Auto-hide after 2.5 seconds
if setTimeout then
active_toast_id = setTimeout(function()
local toast = shell_document:GetElementById("active-toast")
if toast then
-- Switch to hiding animation
toast:SetAttribute("class", "toast toast-hiding" .. type_class)
-- Remove after animation completes
setTimeout(function()
container.inner_rml = ""
active_toast_id = nil
end, 300)
end
end, 2500)
end

View File

@@ -127,14 +127,6 @@
pointer-events: auto;
}
.toast-visible {
animation: 0.4s back-out toast-pop-in;
}
.toast-hiding {
animation: 0.2s quadratic-in toast-pop-out;
}
.toast-success {
background-color: #4CAF50;
color: #FFFFFF;
@@ -150,17 +142,6 @@
color: #000000;
}
@keyframes toast-pop-in {
0% { opacity: 0; transform: translateY(50dp) scale(0.8); }
70% { transform: translateY(-5dp) scale(1.02); }
100% { opacity: 1; transform: translateY(0) scale(1.0); }
}
@keyframes toast-pop-out {
from { opacity: 1; transform: translateY(0) scale(1.0); }
to { opacity: 0; transform: translateY(30dp) scale(0.9); }
}
/* Dialog/Modal overlay */
#dialog-overlay {
position: absolute;