Move fileDropTarget to RoomView
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
ff00683f32
commit
0a4c0b69b0
2 changed files with 15 additions and 19 deletions
|
@ -1782,6 +1782,19 @@ export default class RoomView extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let fileDropTarget = null;
|
||||||
|
if (this.state.draggingFile) {
|
||||||
|
fileDropTarget = (
|
||||||
|
<div className="mx_RoomView_fileDropTarget">
|
||||||
|
<img
|
||||||
|
src={require("../../../res/img/upload-big.svg")}
|
||||||
|
className="mx_RoomView_fileDropTarget_image"
|
||||||
|
/>
|
||||||
|
{ _t("Drop file here to upload") }
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// We have successfully loaded this room, and are not previewing.
|
// We have successfully loaded this room, and are not previewing.
|
||||||
// Display the "normal" room view.
|
// Display the "normal" room view.
|
||||||
|
|
||||||
|
@ -1893,7 +1906,6 @@ export default class RoomView extends React.Component<IProps, IState> {
|
||||||
room={this.state.room}
|
room={this.state.room}
|
||||||
fullHeight={false}
|
fullHeight={false}
|
||||||
userId={this.context.credentials.userId}
|
userId={this.context.credentials.userId}
|
||||||
draggingFile={this.state.draggingFile}
|
|
||||||
maxHeight={this.state.auxPanelMaxHeight}
|
maxHeight={this.state.auxPanelMaxHeight}
|
||||||
showApps={this.state.showApps}
|
showApps={this.state.showApps}
|
||||||
onResize={this.onResize}
|
onResize={this.onResize}
|
||||||
|
@ -2059,8 +2071,9 @@ export default class RoomView extends React.Component<IProps, IState> {
|
||||||
/>
|
/>
|
||||||
<MainSplit panel={rightPanel} resizeNotifier={this.props.resizeNotifier}>
|
<MainSplit panel={rightPanel} resizeNotifier={this.props.resizeNotifier}>
|
||||||
<div className="mx_RoomView_body">
|
<div className="mx_RoomView_body">
|
||||||
|
{auxPanel}
|
||||||
<div className={timelineClasses}>
|
<div className={timelineClasses}>
|
||||||
{auxPanel}
|
{fileDropTarget}
|
||||||
{topUnreadMessagesBar}
|
{topUnreadMessagesBar}
|
||||||
{jumpToBottom}
|
{jumpToBottom}
|
||||||
{messagePanel}
|
{messagePanel}
|
||||||
|
|
|
@ -35,9 +35,6 @@ interface IProps {
|
||||||
userId: string,
|
userId: string,
|
||||||
showApps: boolean, // Render apps
|
showApps: boolean, // Render apps
|
||||||
|
|
||||||
// set to true to show the file drop target
|
|
||||||
draggingFile: boolean,
|
|
||||||
|
|
||||||
// maxHeight attribute for the aux panel and the video
|
// maxHeight attribute for the aux panel and the video
|
||||||
// therein
|
// therein
|
||||||
maxHeight: number,
|
maxHeight: number,
|
||||||
|
@ -149,19 +146,6 @@ export default class AuxPanel extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let fileDropTarget = null;
|
|
||||||
if (this.props.draggingFile) {
|
|
||||||
fileDropTarget = (
|
|
||||||
<div className="mx_RoomView_fileDropTarget">
|
|
||||||
<img
|
|
||||||
src={require("../../../../res/img/upload-big.svg")}
|
|
||||||
className="mx_RoomView_fileDropTarget_image"
|
|
||||||
/>
|
|
||||||
{ _t("Drop file here to upload") }
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const callView = (
|
const callView = (
|
||||||
<CallViewForRoom
|
<CallViewForRoom
|
||||||
roomId={this.props.room.roomId}
|
roomId={this.props.room.roomId}
|
||||||
|
@ -244,7 +228,6 @@ export default class AuxPanel extends React.Component<IProps, IState> {
|
||||||
<AutoHideScrollbar className={classes} style={style} >
|
<AutoHideScrollbar className={classes} style={style} >
|
||||||
{ stateViews }
|
{ stateViews }
|
||||||
{ appsDrawer }
|
{ appsDrawer }
|
||||||
{ fileDropTarget }
|
|
||||||
{ callView }
|
{ callView }
|
||||||
{ this.props.children }
|
{ this.props.children }
|
||||||
</AutoHideScrollbar>
|
</AutoHideScrollbar>
|
||||||
|
|
Loading…
Reference in a new issue