mirror of https://github.com/vector-im/riot-web
Merge pull request #468 from matrix-org/dbkr/create_room_modal
Add modal dialog on new room buttonpull/21833/head
commit
283e1ccf4c
|
@ -364,7 +364,19 @@ module.exports = React.createClass({
|
||||||
//this._setPage(this.PageTypes.CreateRoom);
|
//this._setPage(this.PageTypes.CreateRoom);
|
||||||
//this.notifyNewScreen('new');
|
//this.notifyNewScreen('new');
|
||||||
|
|
||||||
createRoom().done();
|
var TextInputDialog = sdk.getComponent("dialogs.TextInputDialog");
|
||||||
|
Modal.createDialog(TextInputDialog, {
|
||||||
|
title: "Create Room",
|
||||||
|
description: "Room name (optional)",
|
||||||
|
button: "Create Room",
|
||||||
|
onFinished: (should_create, name) => {
|
||||||
|
if (should_create) {
|
||||||
|
const createOpts = {};
|
||||||
|
if (name) createOpts.name = name;
|
||||||
|
createRoom({createOpts}).done();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'view_room_directory':
|
case 'view_room_directory':
|
||||||
this._setPage(this.PageTypes.RoomDirectory);
|
this._setPage(this.PageTypes.RoomDirectory);
|
||||||
|
|
Loading…
Reference in New Issue