diff --git a/src/main/assets/apps/shell/shell.lua b/src/main/assets/apps/shell/shell.lua
index 0cb2bcd..95b97f2 100644
--- a/src/main/assets/apps/shell/shell.lua
+++ b/src/main/assets/apps/shell/shell.lua
@@ -227,14 +227,13 @@ function showToast(message, type)
class = "toast toast-warning"
end
- -- Add toast element
- local toast_html = '
' .. message .. '
'
- container.inner_rml = container.inner_rml .. toast_html
+ -- Clear existing toasts and add new one
+ local toast_html = '' .. message .. '
'
+ container.inner_rml = toast_html
- -- Auto-remove after 3 seconds (would need timer API)
- if mosis and mosis.timer then
- mosis.timer.setTimeout(function()
- -- Remove first toast
+ -- Auto-remove after 3 seconds
+ if setTimeout then
+ setTimeout(function()
container.inner_rml = ""
end, 3000)
end
diff --git a/src/main/assets/apps/shell/shell.rml b/src/main/assets/apps/shell/shell.rml
index 02a44df..9cfb1f6 100644
--- a/src/main/assets/apps/shell/shell.rml
+++ b/src/main/assets/apps/shell/shell.rml
@@ -113,24 +113,27 @@
.toast {
background-color: #323232;
color: #FFFFFF;
- padding: 14px 24px;
- border-radius: 8px;
- font-size: 14px;
+ padding: 14dp 24dp;
+ border-radius: 8dp;
+ font-size: 14dp;
text-align: center;
pointer-events: auto;
- animation: toast-in 0.3s ease-out;
+ width: auto;
}
.toast-success {
background-color: #4CAF50;
+ color: #FFFFFF;
}
.toast-error {
background-color: #F44336;
+ color: #FFFFFF;
}
.toast-warning {
background-color: #FF9800;
+ color: #000000;
}
@keyframes toast-in {