Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 5e5b7f8

Browse files
committed
support scrollable content for UnknownDeviceDialog
1 parent c09d173 commit 5e5b7f8

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/Modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class ModalManager {
177177

178178
var modal = this._modals[0];
179179
var dialog = (
180-
<div className={"mx_Dialog_wrapper " + modal.className}>
180+
<div className={"mx_Dialog_wrapper " + (modal.className ? modal.className : '') }>
181181
<div className="mx_Dialog">
182182
{modal.elem}
183183
</div>

src/Resend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = {
3333
var UnknownDeviceDialog = sdk.getComponent("dialogs.UnknownDeviceDialog");
3434
Modal.createDialog(UnknownDeviceDialog, {
3535
devices: err.devices
36-
});
36+
}, "mx_Dialog_unknownDevice");
3737
}
3838

3939
dis.dispatch({

src/components/views/dialogs/UnknownDeviceDialog.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
import React from 'react';
1818
import sdk from '../../../index';
1919
import MatrixClientPeg from '../../../MatrixClientPeg';
20+
import GeminiScrollbar from 'react-gemini-scrollbar';
2021

2122
function UserUnknownDeviceList(props) {
2223
const {userDevices} = props;
@@ -81,20 +82,20 @@ export default React.createClass({
8182
onFinished={this.props.onFinished}
8283
title='Room contains unknown devices'
8384
>
84-
<div className="mx_Dialog_content">
85+
<GeminiScrollbar autoshow={true} className="mx_Dialog_content">
8586
<h4>This room contains devices which have not been
8687
verified.</h4>
8788
<p>
8889
This means there is no guarantee that the devices belong
89-
to a valid user of the room.
90+
to a rightful user of the room.
9091
</p><p>
9192
We recommend you go through the verification process
9293
for each device before continuing, but you can resend
9394
the message without verifying if you prefer.
9495
</p>
9596
<p>Unknown devices:</p>
9697
<UnknownDeviceList devices={this.props.devices} />
97-
</div>
98+
</GeminiScrollbar>
9899
<div className="mx_Dialog_buttons">
99100
<button className="mx_Dialog_primary" autoFocus={ true }
100101
onClick={ this.props.onFinished } >

src/components/views/rooms/MessageComposerInputOld.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function onSendMessageFailed(err) {
3434
const UnknownDeviceDialog = sdk.getComponent("dialogs.UnknownDeviceDialog");
3535
Modal.createDialog(UnknownDeviceDialog, {
3636
devices: err.devices,
37-
});
37+
}, "mx_Dialog_unknownDevice");
3838
}
3939
dis.dispatch({
4040
action: 'message_send_failed',

0 commit comments

Comments
 (0)