Skip to content

Commit

Permalink
Feat: Make descriptions red when they contain a WARNING
Browse files Browse the repository at this point in the history
  • Loading branch information
hepabolu committed Mar 27, 2024
1 parent af02e34 commit 6d5fba9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/web/presetview.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ class PresetView {
* @param {string} description - the description of the preset
*/
displayDescription(description) {
if (description.includes('WARNING')) {
this.#presetDescription
.addClass('border-danger bg-danger-subtle')
.removeClass('border-primary-subtle bg-primary-subtle');
} else {
this.#presetDescription
.removeClass('border-danger bg-danger-subtle')
.addClass('border-primary-subtle bg-primary-subtle');
}
this.#presetDescription.html(description).show();
}

Expand Down

0 comments on commit 6d5fba9

Please sign in to comment.