@@ -1436,6 +1436,7 @@ export default function ControlPanel({
14361436 } ,
14371437 table_width : {
14381438 function : ( ) => setModal ( MODAL . TABLE_WIDTH ) ,
1439+ disabled : layout . readOnly ,
14391440 } ,
14401441 language : {
14411442 function : ( ) => setModal ( MODAL . LANGUAGE ) ,
@@ -1639,7 +1640,7 @@ export default function ControlPanel({
16391640 < Tooltip content = { t ( "undo" ) } position = "bottom" >
16401641 < button
16411642 className = "py-1 px-2 hover-2 rounded-sm flex items-center disabled:opacity-50"
1642- disabled = { undoStack . length === 0 }
1643+ disabled = { undoStack . length === 0 || layout . readOnly }
16431644 onClick = { undo }
16441645 >
16451646 < IconUndo size = "large" />
@@ -1648,7 +1649,7 @@ export default function ControlPanel({
16481649 < Tooltip content = { t ( "redo" ) } position = "bottom" >
16491650 < button
16501651 className = "py-1 px-2 hover-2 rounded-sm flex items-center disabled:opacity-50"
1651- disabled = { redoStack . length === 0 }
1652+ disabled = { redoStack . length === 0 || layout . readOnly }
16521653 onClick = { redo }
16531654 >
16541655 < IconRedo size = "large" />
@@ -1807,7 +1808,9 @@ export default function ControlPanel({
18071808 </ Tag >
18081809 ) }
18091810 </ div >
1810- { ( showEditName || modal === MODAL . RENAME ) && ! layout . readOnly && < IconEdit /> }
1811+ { ( showEditName || modal === MODAL . RENAME ) && ! layout . readOnly && (
1812+ < IconEdit />
1813+ ) }
18111814 </ div >
18121815 < div className = "flex items-center" >
18131816 < div className = "flex justify-start text-md select-none me-2" >
0 commit comments