feat: remove administrate and new room buttons op737 (#55)
parent
472179bfe7
commit
074508d3d7
@ -1,18 +0,0 @@ |
||||
import React from "react"; |
||||
import Button from "react-bootstrap/Button"; |
||||
|
||||
import { useDispatchContext } from "./contexts"; |
||||
|
||||
export default ({ children, targetTab }) => { |
||||
const dispatch = useDispatchContext(); |
||||
|
||||
const onClick = () => { |
||||
dispatch({ tab: targetTab }); |
||||
}; |
||||
|
||||
return ( |
||||
<Button className="AdministrateButton" {...{ onClick }}> |
||||
{children} |
||||
</Button> |
||||
); |
||||
}; |
||||
@ -1,39 +0,0 @@ |
||||
import React, { Component } from "react"; |
||||
import { withTranslation } from "react-i18next"; |
||||
import Modal from "react-bootstrap/Modal"; |
||||
|
||||
import "./css/NewRoomModal.scss"; |
||||
|
||||
class NewRoomModal extends Component { |
||||
componentDidUpdate(prevProps) { |
||||
const { onHide, newRoomLocalEcho } = prevProps; |
||||
window.onstorage = event => { |
||||
if (event.key === "watcha_create_room") { |
||||
const roomProperties = event.newValue; |
||||
if (roomProperties === "null") { |
||||
onHide(); |
||||
} else if (roomProperties) { |
||||
newRoomLocalEcho(JSON.parse(roomProperties)); |
||||
onHide(); |
||||
} |
||||
} |
||||
}; |
||||
} |
||||
|
||||
render() { |
||||
const { show, onHide, t } = this.props; |
||||
return ( |
||||
<Modal centered aria-label={t("button")} {...{ show, onHide }}> |
||||
{show && ( |
||||
<iframe |
||||
className="newRoomIframe" |
||||
title="Nextcloud" |
||||
src="/app/#/new" |
||||
/> |
||||
)} |
||||
</Modal> |
||||
); |
||||
} |
||||
} |
||||
|
||||
export default withTranslation("roomsTab")(NewRoomModal); |
||||
@ -1,5 +0,0 @@ |
||||
.newRoomIframe { |
||||
width: 510px; |
||||
height: 278px; |
||||
border: 0; |
||||
} |
||||
|
Before Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in new issue