From c040dd2a1ddc7b943bbf572daa0fc88931dfab60 Mon Sep 17 00:00:00 2001 From: jjsa Date: Mon, 18 Nov 2024 16:17:26 +0100 Subject: [PATCH] Toastify style moved to galene.css --- static/galene.css | 23 +++++++++++++++++++++++ static/galene.js | 6 ------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/static/galene.css b/static/galene.css index 75434ef..5068d35 100644 --- a/static/galene.css +++ b/static/galene.css @@ -1375,3 +1375,26 @@ header .collapse:hover { #invite-dialog { 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; +} diff --git a/static/galene.js b/static/galene.js index 676b3e0..8e2fba5 100644 --- a/static/galene.js +++ b/static/galene.js @@ -3959,18 +3959,15 @@ document.getElementById('resizer').addEventListener('mousedown', chatResizer, fa function displayError(message, level) { if(!level) level = "error"; - var background = 'linear-gradient(to right, #e20a0a, #df2d2d)'; var position = 'center'; var gravity = 'top'; switch(level) { case "info": - background = 'linear-gradient(to right, #529518, #96c93d)'; position = 'right'; gravity = 'bottom'; break; case "warning": - background = "linear-gradient(to right, #bdc511, #c2cf01)"; break; case "kicked": level = "error"; @@ -3984,9 +3981,6 @@ function displayError(message, level) { close: true, position: position, gravity: gravity, - style: { - background: background, - }, className: level, }).showToast(); }