From 35244bb107dc1bc3b8dbe3acde0d37bffd1dad11 Mon Sep 17 00:00:00 2001 From: Ari Date: Thu, 28 Jul 2022 23:00:35 -0400 Subject: [PATCH] mobile mode fixed --- .../AutomationManager/Loaded/index.mobile.css | 52 +++++++++++++++++++ .../AutomationManager/Loaded/index.tsx | 5 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 webapp/src/components/AutomationManager/Loaded/index.mobile.css diff --git a/webapp/src/components/AutomationManager/Loaded/index.mobile.css b/webapp/src/components/AutomationManager/Loaded/index.mobile.css new file mode 100644 index 0000000..01950f2 --- /dev/null +++ b/webapp/src/components/AutomationManager/Loaded/index.mobile.css @@ -0,0 +1,52 @@ +.automation-manager.mobile .automation-manager--sidebar.shown { + height: 100vh; + min-height: 100vh; + min-width: 100vw; +} + +.automation-manager.mobile .automation-manager--sidebar .automation-manager--sidebar-box--bottom-buttons .hide-btn { + transform: rotate(-90deg); + left: 0.5em; + background-color: var(--mui-background-paper); + height: 2em; + width: 2em; +} + +.automation-manager.mobile .automation-manager--sidebar.hidden { + height: 0; + min-height: 0; +} + +.automation-manager.mobile .automation-manager--sidebar.hidden .automation-manager--sidebar-box--nav, +.automation-manager.mobile .automation-manager--sidebar.hidden .automation-manager--sidebar-box--list { + display: none; +} + +.automation-manager.mobile .automation-manager--sidebar.hidden .automation-manager--sidebar-box--bottom-buttons { + height: 0; +} + +.automation-manager.mobile .automation-manager--sidebar.hidden .automation-manager--sidebar-box--bottom-buttons .hide-btn { + transform: rotate(90deg); + top: 1em; + z-index: 100; +} + +.automation-manager.mobile .automation-editor--flow-wrapper--toolbar--title { + padding-left: 2.5em; + justify-content: center; + flex-direction: column; +} + +.automation-manager.mobile .automation-editor--flow-wrapper--toolbar--title--text .input-text-view.view span { + max-height: 1.25em; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; + word-wrap: break-word; +} + +.automation-manager.mobile .automation-editor--flow-wrapper--toolbar--title--text .id, +.automation-manager.mobile .automation-editor--flow-wrapper--toolbar--title .input-text-view.description { + display: none; +} \ No newline at end of file diff --git a/webapp/src/components/AutomationManager/Loaded/index.tsx b/webapp/src/components/AutomationManager/Loaded/index.tsx index f502037..0baa80d 100644 --- a/webapp/src/components/AutomationManager/Loaded/index.tsx +++ b/webapp/src/components/AutomationManager/Loaded/index.tsx @@ -1,4 +1,5 @@ import "./index.css"; +import "./index.mobile.css"; import { AutomationEditor } from "components/AutomationEditor"; import { DEFAULT_DIMS } from "components/DAGGraph/elements/constants"; @@ -9,6 +10,7 @@ import { UseAutomationManagerStateArgs, } from "./state"; import Alert from "@mui/material/Alert"; +import useWindowSize from "utils/useWindowSize"; export type AutomationManagerLoadedProps = UseAutomationManagerStateArgs & { onAutomationDelete: (aid: string) => void; @@ -17,9 +19,10 @@ export const AutomationManagerLoaded: FC< PropsWithChildren > = ({ children, onAutomationDelete, ...args }) => { const state = useAutomationManagerState(args); + const { isMobile } = useWindowSize(); return ( -
+
{children}