|
|
|
|
@ -7,7 +7,7 @@ import { t } from "../i18n";
@@ -7,7 +7,7 @@ import { t } from "../i18n";
|
|
|
|
|
import { calculateScrollCenter } from "../scene"; |
|
|
|
|
import { SCROLLBAR_WIDTH, SCROLLBAR_MARGIN } from "../scene/scrollbars"; |
|
|
|
|
|
|
|
|
|
import { MobileShapeActions } from "./Actions"; |
|
|
|
|
import { ExitViewModeButton, MobileShapeActions } from "./Actions"; |
|
|
|
|
import { MobileToolBar } from "./MobileToolBar"; |
|
|
|
|
import { FixedSideContainer } from "./FixedSideContainer"; |
|
|
|
|
|
|
|
|
|
@ -65,8 +65,18 @@ export const MobileMenu = ({
@@ -65,8 +65,18 @@ export const MobileMenu = ({
|
|
|
|
|
DefaultSidebarTriggerTunnel, |
|
|
|
|
} = useTunnels(); |
|
|
|
|
const renderAppTopBar = () => { |
|
|
|
|
const topRightUI = renderTopRightUI?.(true, appState) ?? ( |
|
|
|
|
<DefaultSidebarTriggerTunnel.Out /> |
|
|
|
|
if (appState.openDialog?.name === "elementLinkSelector") { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const topRightUI = ( |
|
|
|
|
<div className="excalidraw-ui-top-right"> |
|
|
|
|
{renderTopRightUI?.(true, appState) ?? |
|
|
|
|
(!appState.viewModeEnabled && <DefaultSidebarTriggerTunnel.Out />)} |
|
|
|
|
{appState.viewModeEnabled && ( |
|
|
|
|
<ExitViewModeButton actionManager={actionManager} /> |
|
|
|
|
)} |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
const topLeftUI = ( |
|
|
|
|
@ -76,13 +86,6 @@ export const MobileMenu = ({
@@ -76,13 +86,6 @@ export const MobileMenu = ({
|
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
appState.viewModeEnabled || |
|
|
|
|
appState.openDialog?.name === "elementLinkSelector" |
|
|
|
|
) { |
|
|
|
|
return <div className="App-toolbar-content">{topLeftUI}</div>; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div |
|
|
|
|
className="App-toolbar-content" |
|
|
|
|
@ -117,6 +120,7 @@ export const MobileMenu = ({
@@ -117,6 +120,7 @@ export const MobileMenu = ({
|
|
|
|
|
{renderWelcomeScreen && <WelcomeScreenCenterTunnel.Out />} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{!appState.viewModeEnabled && ( |
|
|
|
|
<div |
|
|
|
|
className="App-bottom-bar" |
|
|
|
|
style={{ |
|
|
|
|
@ -152,6 +156,7 @@ export const MobileMenu = ({
@@ -152,6 +156,7 @@ export const MobileMenu = ({
|
|
|
|
|
)} |
|
|
|
|
</Island> |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
<FixedSideContainer side="top" className="App-top-bar"> |
|
|
|
|
{renderAppTopBar()} |
|
|
|
|
|