Refactor all of Devtools and tidy it up (#8097)
This commit is contained in:
parent
64871c057b
commit
306ddd51e4
24 changed files with 1516 additions and 1562 deletions
|
@ -33,6 +33,10 @@ import { Icon as PinUprightIcon } from '../../../../res/img/element-icons/room/p
|
|||
import { Icon as EllipsisIcon } from '../../../../res/img/element-icons/room/ellipsis.svg';
|
||||
import { Icon as MembersIcon } from '../../../../res/img/element-icons/room/members.svg';
|
||||
import { Icon as FavoriteIcon } from '../../../../res/img/element-icons/roomlist/favorite.svg';
|
||||
import SettingsStore from "../../../settings/SettingsStore";
|
||||
import Modal from "../../../Modal";
|
||||
import DevtoolsDialog from "../dialogs/DevtoolsDialog";
|
||||
import RoomViewStore from "../../../stores/RoomViewStore";
|
||||
|
||||
const QuickSettingsButton = ({ isPanelCollapsed = false }) => {
|
||||
const [menuDisplayed, handle, openMenu, closeMenu] = useContextMenu<HTMLDivElement>();
|
||||
|
@ -63,6 +67,20 @@ const QuickSettingsButton = ({ isPanelCollapsed = false }) => {
|
|||
{ _t("All settings") }
|
||||
</AccessibleButton>
|
||||
|
||||
{ SettingsStore.getValue("developerMode") && (
|
||||
<AccessibleButton
|
||||
onClick={() => {
|
||||
closeMenu();
|
||||
Modal.createDialog(DevtoolsDialog, {
|
||||
roomId: RoomViewStore.getRoomId(),
|
||||
}, "mx_DevtoolsDialog_wrapper");
|
||||
}}
|
||||
kind="danger_outline"
|
||||
>
|
||||
{ _t("Developer tools") }
|
||||
</AccessibleButton>
|
||||
) }
|
||||
|
||||
<h4 className="mx_QuickSettingsButton_pinToSidebarHeading">
|
||||
<PinUprightIcon className="mx_QuickSettingsButton_icon" />
|
||||
{ _t("Pin to sidebar") }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue