mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-23 06:26:55 +00:00
fix: alerts being completely broken
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user