From 33a7811e8f17ad642dc41455d82bc8e298945c42 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Wed, 19 Mar 2025 12:37:18 -0400 Subject: [PATCH] fix: alerts being completely broken PR 1175 introduced a bug that wasn't caught where alert messages are not properly assigned. Additionally, the default alert type was "warning" which is a regression. This commit makes "info" the default alert type and ensures options.message is the first candidate for the alert message contents. --- src/gui/src/UI/UIAlert.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/src/UI/UIAlert.js b/src/gui/src/UI/UIAlert.js index ce6539382..370d6321d 100644 --- a/src/gui/src/UI/UIAlert.js +++ b/src/gui/src/UI/UIAlert.js @@ -50,8 +50,8 @@ function UIAlert(options) { }; // Set default values - const alertType = alertTypes[options.type] || alertTypes.warning; - options.message = options.title || alertType.title; + const alertType = alertTypes[options.type] || alertTypes.info; + options.message = options.message || options.title || alertType.title; options.body_icon = options.body_icon ?? window.icons[alertType.icon]; options.color = options.color ?? alertType.color;