Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 2d5fd53

Browse files
authored
Merge pull request #719 from OpenBazaar/scrollableUpdateDialog
Scrollable update dialog
2 parents 270c936 + 1df6a66 commit 2d5fd53

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

js/templates/modals/dialog.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<h1><%= ob.title %></h1>
44
</div>
55
<div class="<%= ob.messageClass %>">
6-
<p><%= ob.message %></p>
6+
<div class="rowMd innerMessage">
7+
<%= ob.message %>
8+
</div>
79
<% if (ob.buttons.length) { %>
810
<div class="buttonWrap">
911
<% ob.buttons.forEach((btn, i) => { %>
@@ -16,4 +18,4 @@ <h1><%= ob.title %></h1>
1618
</div>
1719
<% } %>
1820
</div>
19-
</div>
21+
</div>

js/utils/autoUpdate.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ export function updateReady(opts = {}) {
3939

4040
let displayData = '';
4141
$.each(opts, (key, val) => {
42-
displayData += `<b>${key}:</b> <br>${val}<br>`;
42+
displayData += `<b>${key}:</b> <pre style="white-space: pre-wrap">${val}</pre>`;
4343
});
4444

4545
updateReadyDialog = new Dialog({
4646
title: app.polyglot.t('update.ready.title'),
4747
message: `${app.polyglot.t('update.ready.msg')}<br><br>${displayData}`,
48+
messageClass: 'dialogScrollMsg',
4849
buttons: [{
4950
text: app.polyglot.t('update.install'),
5051
fragment: 'installUpdate',

styles/modules/modals/_message.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,22 @@
66
.modalContent {
77
width: 600px;
88
}
9-
9+
1010
.msgWrap {
1111
font-size: 1.4rem;
1212
}
1313

1414
&.dialog {
1515
// specific to dialog styling
1616

17+
.dialogScrollMsg {
18+
.innerMessage {
19+
max-height: 425px;
20+
overflow: auto;
21+
margin-right: -15px;
22+
}
23+
}
24+
1725
.buttonWrap {
1826
text-align: center;
1927
}

0 commit comments

Comments
 (0)