1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 15:25:48 +01:00

Toastify style moved to galene.css

This commit is contained in:
jjsa 2024-11-18 16:17:26 +01:00 committed by Juliusz Chroboczek
parent 192e6de6ef
commit c040dd2a1d
2 changed files with 23 additions and 6 deletions

View file

@ -1375,3 +1375,26 @@ header .collapse:hover {
#invite-dialog { #invite-dialog {
background-color: #eee; background-color: #eee;
} }
/* Style for the toastify messages shall be within a css file */
.toastify.error {
background: linear-gradient(to right, #e20a0a, #df2d2d);
color: #fff;
}
.toastify.error .toast-close {
color: #fff;
}
.toastify.warning {
background: linear-gradient(to right, #bdc511, #c2cf01);
color: #000;
}
.toastify.warning .toast-close {
color: #000;
}
.toastify.info {
background: linear-gradient(to right, #529518, #96c93d);
color: #000;
}
.toastify.info .toast-close {
color: #000;
}

View file

@ -3959,18 +3959,15 @@ document.getElementById('resizer').addEventListener('mousedown', chatResizer, fa
function displayError(message, level) { function displayError(message, level) {
if(!level) if(!level)
level = "error"; level = "error";
var background = 'linear-gradient(to right, #e20a0a, #df2d2d)';
var position = 'center'; var position = 'center';
var gravity = 'top'; var gravity = 'top';
switch(level) { switch(level) {
case "info": case "info":
background = 'linear-gradient(to right, #529518, #96c93d)';
position = 'right'; position = 'right';
gravity = 'bottom'; gravity = 'bottom';
break; break;
case "warning": case "warning":
background = "linear-gradient(to right, #bdc511, #c2cf01)";
break; break;
case "kicked": case "kicked":
level = "error"; level = "error";
@ -3984,9 +3981,6 @@ function displayError(message, level) {
close: true, close: true,
position: position, position: position,
gravity: gravity, gravity: gravity,
style: {
background: background,
},
className: level, className: level,
}).showToast(); }).showToast();
} }