Skip to content

Commit

Permalink
Make max-width setting for Hub.alert() more selective
Browse files Browse the repository at this point in the history
Now applying this only to error alerts. Otherwise, it can easily break some
other dialogs, including at least the "About" dialog.
  • Loading branch information
skieffer committed Jun 2, 2024
1 parent 8f562e2 commit 59126d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/src/Hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,14 @@ var Hub = declare(null, {
alert: function({title, content}) {
title = title || 'Info';
content = content || '(nothing here)';
content = `<div class="padded20 mw48">${content}</div>`;

let classes = "padded20";
// Set a max width, for error alerts:
if (title === "Error") {
classes += " mw48";
}

content = `<div class="${classes}">${content}</div>`;
const dlg = new Dialog({
title: title,
content: content,
Expand Down

0 comments on commit 59126d3

Please sign in to comment.