mirror of https://github.com/vector-im/riot-web
Add "Export E2E keys" option to logout dialog
Fixes https://github.com/vector-im/riot-web/issues/3184pull/21833/head
parent
648ad8d66c
commit
b21f016d37
|
@ -268,6 +268,12 @@ module.exports = React.createClass({
|
||||||
but for now be warned.
|
but for now be warned.
|
||||||
</div>,
|
</div>,
|
||||||
button: "Sign out",
|
button: "Sign out",
|
||||||
|
extraButtons: [
|
||||||
|
<button className="mx_Dialog_primary"
|
||||||
|
onClick={this._onExportE2eKeysClicked}>
|
||||||
|
Export E2E room keys
|
||||||
|
</button>
|
||||||
|
],
|
||||||
onFinished: (confirmed) => {
|
onFinished: (confirmed) => {
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
dis.dispatch({action: 'logout'});
|
dis.dispatch({action: 'logout'});
|
||||||
|
|
|
@ -21,10 +21,8 @@ export default React.createClass({
|
||||||
displayName: 'QuestionDialog',
|
displayName: 'QuestionDialog',
|
||||||
propTypes: {
|
propTypes: {
|
||||||
title: React.PropTypes.string,
|
title: React.PropTypes.string,
|
||||||
description: React.PropTypes.oneOfType([
|
description: React.PropTypes.node,
|
||||||
React.PropTypes.element,
|
extraButtons: React.PropTypes.node,
|
||||||
React.PropTypes.string,
|
|
||||||
]),
|
|
||||||
button: React.PropTypes.string,
|
button: React.PropTypes.string,
|
||||||
focus: React.PropTypes.bool,
|
focus: React.PropTypes.bool,
|
||||||
onFinished: React.PropTypes.func.isRequired,
|
onFinished: React.PropTypes.func.isRequired,
|
||||||
|
@ -34,6 +32,7 @@ export default React.createClass({
|
||||||
return {
|
return {
|
||||||
title: "",
|
title: "",
|
||||||
description: "",
|
description: "",
|
||||||
|
extraButtons: null,
|
||||||
button: "OK",
|
button: "OK",
|
||||||
focus: true,
|
focus: true,
|
||||||
hasCancelButton: true,
|
hasCancelButton: true,
|
||||||
|
@ -67,6 +66,7 @@ export default React.createClass({
|
||||||
<button className="mx_Dialog_primary" onClick={this.onOk} autoFocus={this.props.focus}>
|
<button className="mx_Dialog_primary" onClick={this.onOk} autoFocus={this.props.focus}>
|
||||||
{this.props.button}
|
{this.props.button}
|
||||||
</button>
|
</button>
|
||||||
|
{this.props.extraButtons}
|
||||||
{cancelButton}
|
{cancelButton}
|
||||||
</div>
|
</div>
|
||||||
</BaseDialog>
|
</BaseDialog>
|
||||||
|
|
Loading…
Reference in New Issue