You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Add modal dialog on new room button
https://github.com/vector-im/vector-web/issues/2178
This commit is contained in:
@ -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: "Name your new room, or leave it nameless",
|
||||||
|
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);
|
||||||
|
Reference in New Issue
Block a user