From b21f016d37badbe94be6689675eaf15f4c64fb9b Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 16 Mar 2017 14:18:18 +0000 Subject: [PATCH] Add "Export E2E keys" option to logout dialog Fixes https://github.com/vector-im/riot-web/issues/3184 --- src/components/structures/UserSettings.js | 6 ++++++ src/components/views/dialogs/QuestionDialog.js | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index febdccd9c3..9e6d454fe9 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -268,6 +268,12 @@ module.exports = React.createClass({ but for now be warned. , button: "Sign out", + extraButtons: [ + + ], onFinished: (confirmed) => { if (confirmed) { dis.dispatch({action: 'logout'}); diff --git a/src/components/views/dialogs/QuestionDialog.js b/src/components/views/dialogs/QuestionDialog.js index 0260fc29e2..6012541b94 100644 --- a/src/components/views/dialogs/QuestionDialog.js +++ b/src/components/views/dialogs/QuestionDialog.js @@ -21,10 +21,8 @@ export default React.createClass({ displayName: 'QuestionDialog', propTypes: { title: React.PropTypes.string, - description: React.PropTypes.oneOfType([ - React.PropTypes.element, - React.PropTypes.string, - ]), + description: React.PropTypes.node, + extraButtons: React.PropTypes.node, button: React.PropTypes.string, focus: React.PropTypes.bool, onFinished: React.PropTypes.func.isRequired, @@ -34,6 +32,7 @@ export default React.createClass({ return { title: "", description: "", + extraButtons: null, button: "OK", focus: true, hasCancelButton: true, @@ -67,6 +66,7 @@ export default React.createClass({ + {this.props.extraButtons} {cancelButton}