mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
merge upstream (#5821)
* fix: hide canvas-modifying UI in view mode (#5815) * fix: hide canvas-modifying UI in view mode * add class for better targeting * fix missing `key` * fix: useOutsideClick not working in view mode * fix: Corrected typo in toggle theme shortcut (#5813) * fix: incorrectly selecting linear elements on creation while tool-locked (#5785) * fix: syncing 1-point lines to remote clients (#5677) * feat: stop deleting whole line when no point select in line editor (#5676) * feat: stop deleting whole line when no point select in line editor * Comments typo Co-authored-by: DanielJGeiger <1852529+DanielJGeiger@users.noreply.github.com> Co-authored-by: David Luzar <luzar.david@gmail.com> Co-authored-by: Paul Yi <paulyiengr@gmail.com> Co-authored-by: DanielJGeiger <1852529+DanielJGeiger@users.noreply.github.com>
This commit is contained in:
parent
49b74cddb9
commit
407ee62a5c
11 changed files with 100 additions and 55 deletions
|
@ -213,7 +213,8 @@ const LayerUI = ({
|
|||
padding={2}
|
||||
style={{ zIndex: 1 }}
|
||||
>
|
||||
{actionManager.renderAction("loadScene")}
|
||||
{!appState.viewModeEnabled &&
|
||||
actionManager.renderAction("loadScene")}
|
||||
{/* // TODO barnabasmolnar/editor-redesign */}
|
||||
{/* is this fine here? */}
|
||||
{UIOptions.canvasActions.saveToActiveFile &&
|
||||
|
@ -237,7 +238,8 @@ const LayerUI = ({
|
|||
/>
|
||||
)}
|
||||
{actionManager.renderAction("toggleShortcuts", undefined, true)}
|
||||
{actionManager.renderAction("clearCanvas")}
|
||||
{!appState.viewModeEnabled &&
|
||||
actionManager.renderAction("clearCanvas")}
|
||||
<Separator />
|
||||
<MenuLinks />
|
||||
<Separator />
|
||||
|
@ -252,14 +254,16 @@ const LayerUI = ({
|
|||
<div style={{ padding: "0 0.625rem" }}>
|
||||
<LanguageList style={{ width: "100%" }} />
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: ".75rem", marginBottom: ".5rem" }}>
|
||||
{t("labels.canvasBackground")}
|
||||
{!appState.viewModeEnabled && (
|
||||
<div>
|
||||
<div style={{ fontSize: ".75rem", marginBottom: ".5rem" }}>
|
||||
{t("labels.canvasBackground")}
|
||||
</div>
|
||||
<div style={{ padding: "0 0.625rem" }}>
|
||||
{actionManager.renderAction("changeViewBackgroundColor")}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ padding: "0 0.625rem" }}>
|
||||
{actionManager.renderAction("changeViewBackgroundColor")}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Island>
|
||||
</Section>
|
||||
|
@ -302,12 +306,12 @@ const LayerUI = ({
|
|||
return (
|
||||
<FixedSideContainer side="top">
|
||||
{renderWelcomeScreen && !appState.isLoading && (
|
||||
<WelcomeScreen actionManager={actionManager} />
|
||||
<WelcomeScreen appState={appState} actionManager={actionManager} />
|
||||
)}
|
||||
<div className="App-menu App-menu_top">
|
||||
<Stack.Col
|
||||
gap={6}
|
||||
className={clsx({
|
||||
className={clsx("App-menu_top__left", {
|
||||
"disable-pointerEvents": appState.zenModeEnabled,
|
||||
})}
|
||||
>
|
||||
|
@ -408,7 +412,9 @@ const LayerUI = ({
|
|||
/>
|
||||
)}
|
||||
{renderTopRightUI?.(device.isMobile, appState)}
|
||||
<LibraryButton appState={appState} setAppState={setAppState} />
|
||||
{!appState.viewModeEnabled && (
|
||||
<LibraryButton appState={appState} setAppState={setAppState} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</FixedSideContainer>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue