Make modal buttons wrap correctly on mobile

This commit is contained in:
DianaXWiki 2026-05-06 23:43:38 +02:00
parent 6175d6665a
commit ff364ce108
2 changed files with 26 additions and 19 deletions

View File

@ -371,6 +371,15 @@
vertical-align: middle;
}
}
@media screen and (max-width: @browser_media-medium-screen) {
.cp-crowdfunding-modal nav {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 0.5rem;
}
}
}
}

View File

@ -3403,8 +3403,15 @@ define([
};
var content = Messages.crowdfunding_popup_text;
var buttons = [
{
var buttons = [{
name: Messages.dontShowAgain,
className: 'cancel left',
iconClass: 'close',
onClick: function () {
recordShown();
dontShowAgain();
}
}, {
name: Messages.crowdfunding_popup_no,
className: 'cancel',
iconClass: 'crowdfunding-snooze',
@ -3412,8 +3419,7 @@ define([
recordShown();
Feedback.send('CROWDFUNDING_NO');
}
}
];
}];
if (!Config.removeDonateButton) {
buttons.push({
name: Messages.crowdfunding_button2,
@ -3439,20 +3445,12 @@ define([
}
});
}
buttons.push({
name: Messages.dontShowAgain,
className: 'cancel left',
iconClass: 'close',
onClick: function () {
recordShown();
dontShowAgain();
}
});
var modal = UI.dialog.customModal(content, {
force: true,
scrollable: true,
buttons: buttons
});
$(modal).addClass('cp-crowdfunding-modal');
UI.openCustomModal(modal, { wide: true });
};