Add fullscreen mode
This commit is contained in:
parent
e37ae6ce84
commit
f71671ea7e
@ -195,33 +195,18 @@ export default function ControlPanel() {
|
|||||||
},
|
},
|
||||||
Fullscreen: {
|
Fullscreen: {
|
||||||
children: [],
|
children: [],
|
||||||
function: () => {},
|
function: () => {
|
||||||
},
|
const element = document.documentElement;
|
||||||
},
|
if (element.requestFullscreen) {
|
||||||
Insert: {
|
element.requestFullscreen();
|
||||||
"New table": {
|
} else if (element.mozRequestFullScreen) {
|
||||||
children: [],
|
element.mozRequestFullScreen();
|
||||||
function: () => {},
|
} else if (element.webkitRequestFullscreen) {
|
||||||
},
|
element.webkitRequestFullscreen();
|
||||||
"New relationship": {
|
} else if (element.msRequestFullscreen) {
|
||||||
children: [],
|
element.msRequestFullscreen();
|
||||||
function: () => {},
|
}
|
||||||
},
|
},
|
||||||
Note: {
|
|
||||||
children: [],
|
|
||||||
function: () => {},
|
|
||||||
},
|
|
||||||
Image: {
|
|
||||||
children: [],
|
|
||||||
function: () => {},
|
|
||||||
},
|
|
||||||
Textbox: {
|
|
||||||
children: [],
|
|
||||||
function: () => {},
|
|
||||||
},
|
|
||||||
Shape: {
|
|
||||||
children: [],
|
|
||||||
function: () => {},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Logs: {
|
Logs: {
|
||||||
@ -334,7 +319,7 @@ export default function ControlPanel() {
|
|||||||
</Dropdown.Menu>
|
</Dropdown.Menu>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="px-3 py-1 hover:bg-gray-100">
|
<div className="px-3 py-1 hover:bg-gray-100 rounded-md">
|
||||||
{category}
|
{category}
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
@ -411,7 +396,7 @@ export default function ControlPanel() {
|
|||||||
}
|
}
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
<div className="py-1 px-2 hover:bg-gray-300">
|
<div className="py-1 px-2 hover:bg-slate-200 rounded-md">
|
||||||
<i className="fa-solid fa-table-list"></i> <IconCaretdown />
|
<i className="fa-solid fa-table-list"></i> <IconCaretdown />
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
@ -450,21 +435,33 @@ export default function ControlPanel() {
|
|||||||
}
|
}
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
<div className="py-1 px-2 hover:bg-gray-300">
|
<div className="py-1 px-2 hover:bg-slate-200 rounded-md">
|
||||||
zoom <IconCaretdown />
|
zoom <IconCaretdown />
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<button className="py-1 px-2 hover:bg-gray-300" title="Zoom in">
|
<button
|
||||||
|
className="py-1 px-2 hover:bg-slate-200 rounded-md"
|
||||||
|
title="Zoom in"
|
||||||
|
>
|
||||||
<i className="fa-solid fa-magnifying-glass-plus"></i>
|
<i className="fa-solid fa-magnifying-glass-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
<button className="py-1 px-2 hover:bg-gray-300" title="Zoom out">
|
<button
|
||||||
|
className="py-1 px-2 hover:bg-slate-200 rounded-md"
|
||||||
|
title="Zoom out"
|
||||||
|
>
|
||||||
<i className="fa-solid fa-magnifying-glass-minus"></i>
|
<i className="fa-solid fa-magnifying-glass-minus"></i>
|
||||||
</button>
|
</button>
|
||||||
<Divider layout="vertical" margin="8px" />
|
<Divider layout="vertical" margin="8px" />
|
||||||
<button className="py-1 px-2 hover:bg-gray-300" title="Undo">
|
<button
|
||||||
|
className="py-1 px-2 hover:bg-slate-200 rounded-md"
|
||||||
|
title="Undo"
|
||||||
|
>
|
||||||
<i className="fa-solid fa-rotate-left "></i>
|
<i className="fa-solid fa-rotate-left "></i>
|
||||||
</button>
|
</button>
|
||||||
<button className="py-1 px-2 hover:bg-gray-300" title="Redo">
|
<button
|
||||||
|
className="py-1 px-2 hover:bg-slate-200 rounded-md"
|
||||||
|
title="Redo"
|
||||||
|
>
|
||||||
<i className="fa-solid fa-rotate-right"></i>
|
<i className="fa-solid fa-rotate-right"></i>
|
||||||
</button>
|
</button>
|
||||||
<Divider layout="vertical" margin="8px" />
|
<Divider layout="vertical" margin="8px" />
|
||||||
@ -481,21 +478,33 @@ export default function ControlPanel() {
|
|||||||
}
|
}
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
<div className="py-1 px-2 hover:bg-gray-300">
|
<div className="py-1 px-2 hover:bg-slate-200 rounded-md">
|
||||||
<i className="fa-solid fa-plus"></i> <IconCaretdown />
|
<i className="fa-solid fa-plus"></i> <IconCaretdown />
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<button className="py-1 px-2 hover:bg-gray-300" title="Edit">
|
<button
|
||||||
|
className="py-1 px-2 hover:bg-slate-200 rounded-md"
|
||||||
|
title="Edit"
|
||||||
|
>
|
||||||
<i className="fa-solid fa-pen-to-square"></i>
|
<i className="fa-solid fa-pen-to-square"></i>
|
||||||
</button>
|
</button>
|
||||||
<button className="py-1 px-2 hover:bg-gray-300" title="Delete">
|
<button
|
||||||
|
className="py-1 px-2 hover:bg-slate-200 rounded-md"
|
||||||
|
title="Delete"
|
||||||
|
>
|
||||||
<i className="fa-solid fa-trash"></i>
|
<i className="fa-solid fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
<Divider layout="vertical" margin="8px" />
|
<Divider layout="vertical" margin="8px" />
|
||||||
<button className="py-1 px-2 hover:bg-gray-300" title="Save">
|
<button
|
||||||
|
className="py-1 px-2 hover:bg-slate-200 rounded-md"
|
||||||
|
title="Save"
|
||||||
|
>
|
||||||
<i className="fa-regular fa-floppy-disk"></i>
|
<i className="fa-regular fa-floppy-disk"></i>
|
||||||
</button>
|
</button>
|
||||||
<button className="py-1 px-2 hover:bg-gray-300" title="Commit">
|
<button
|
||||||
|
className="py-1 px-2 hover:bg-slate-200 rounded-md"
|
||||||
|
title="Commit"
|
||||||
|
>
|
||||||
<i className="fa-solid fa-code-branch"></i>
|
<i className="fa-solid fa-code-branch"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -80,6 +80,7 @@ const EditorPanel = (props) => {
|
|||||||
onChange={(key) => {
|
onChange={(key) => {
|
||||||
setTab(key);
|
setTab(key);
|
||||||
}}
|
}}
|
||||||
|
collapsible
|
||||||
>
|
>
|
||||||
{contentList[parseInt(tab) - 1]}
|
{contentList[parseInt(tab) - 1]}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
Loading…
Reference in New Issue
Block a user