mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: hide trash button during collaboration (#5037)
* feat: hide trash button during collaboration * visually hide the trash icon * pointer events none * tweak env docs * fix typo Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
96c87f920a
commit
52d10bb41e
4 changed files with 22 additions and 7 deletions
|
@ -26,3 +26,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.excalidraw-app.is-collaborating {
|
||||
[data-testid="clear-canvas-button"] {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ import { isInitializedImageElement } from "../element/typeChecks";
|
|||
import { loadFilesFromFirebase } from "./data/firebase";
|
||||
import { LocalData } from "./data/LocalData";
|
||||
import { isBrowserStorageStateNewer } from "./data/tabSync";
|
||||
import clsx from "clsx";
|
||||
|
||||
const languageDetector = new LanguageDetector();
|
||||
languageDetector.init({
|
||||
|
@ -634,7 +635,12 @@ const ExcalidrawWrapper = () => {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
style={{ height: "100%" }}
|
||||
className={clsx("excalidraw-app", {
|
||||
"is-collaborating": collabAPI?.isCollaborating(),
|
||||
})}
|
||||
>
|
||||
<Excalidraw
|
||||
ref={excalidrawRefCallback}
|
||||
onChange={onChange}
|
||||
|
@ -686,7 +692,7 @@ const ExcalidrawWrapper = () => {
|
|||
onClose={() => setErrorMessage("")}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue