2023-01-31 13:53:20 +01:00
|
|
|
import React from "react";
|
2023-12-12 07:02:51 +01:00
|
|
|
import { PlusPromoIcon } from "../../packages/excalidraw/components/icons";
|
|
|
|
import { MainMenu } from "../../packages/excalidraw/index";
|
2023-01-31 13:53:20 +01:00
|
|
|
import { LanguageList } from "./LanguageList";
|
|
|
|
|
|
|
|
export const AppMainMenu: React.FC<{
|
2024-02-03 15:04:23 +01:00
|
|
|
onCollabDialogOpen: () => any;
|
2023-01-31 13:53:20 +01:00
|
|
|
isCollaborating: boolean;
|
2023-06-12 17:44:31 +02:00
|
|
|
isCollabEnabled: boolean;
|
2023-01-31 13:53:20 +01:00
|
|
|
}> = React.memo((props) => {
|
|
|
|
return (
|
|
|
|
<MainMenu>
|
|
|
|
<MainMenu.DefaultItems.LoadScene />
|
|
|
|
<MainMenu.DefaultItems.SaveToActiveFile />
|
|
|
|
<MainMenu.DefaultItems.Export />
|
|
|
|
<MainMenu.DefaultItems.SaveAsImage />
|
2023-06-12 17:44:31 +02:00
|
|
|
{props.isCollabEnabled && (
|
|
|
|
<MainMenu.DefaultItems.LiveCollaborationTrigger
|
|
|
|
isCollaborating={props.isCollaborating}
|
2024-02-03 15:04:23 +01:00
|
|
|
onSelect={() => props.onCollabDialogOpen()}
|
2023-06-12 17:44:31 +02:00
|
|
|
/>
|
|
|
|
)}
|
2024-03-28 17:16:32 +01:00
|
|
|
<MainMenu.DefaultItems.CommandPalette />
|
2023-01-31 13:53:20 +01:00
|
|
|
<MainMenu.DefaultItems.Help />
|
|
|
|
<MainMenu.DefaultItems.ClearCanvas />
|
|
|
|
<MainMenu.Separator />
|
|
|
|
<MainMenu.ItemLink
|
|
|
|
icon={PlusPromoIcon}
|
2023-09-11 23:13:16 +02:00
|
|
|
href={`${
|
|
|
|
import.meta.env.VITE_APP_PLUS_LP
|
|
|
|
}/plus?utm_source=excalidraw&utm_medium=app&utm_content=hamburger`}
|
2023-01-31 13:53:20 +01:00
|
|
|
className="ExcalidrawPlus"
|
|
|
|
>
|
|
|
|
Excalidraw+
|
|
|
|
</MainMenu.ItemLink>
|
|
|
|
<MainMenu.DefaultItems.Socials />
|
|
|
|
<MainMenu.Separator />
|
|
|
|
<MainMenu.DefaultItems.ToggleTheme />
|
|
|
|
<MainMenu.ItemCustom>
|
|
|
|
<LanguageList style={{ width: "100%" }} />
|
|
|
|
</MainMenu.ItemCustom>
|
|
|
|
<MainMenu.DefaultItems.ChangeCanvasBackground />
|
|
|
|
</MainMenu>
|
|
|
|
);
|
|
|
|
});
|