Skip to content

Commit

Permalink
Changed max width for edit object window: #2814
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Nov 22, 2024
1 parent 03adeec commit 80acce4
Show file tree
Hide file tree
Showing 3 changed files with 265 additions and 257 deletions.
2 changes: 1 addition & 1 deletion packages/admin/src-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"homepage": ".",
"scripts": {
"start": "set DANGEROUSLY_DISABLE_HOST_CHECK=true && craco start",
"start": "set DANGEROUSLY_DISABLE_HOST_CHECK=true && npm run patch-webpack && craco start",
"lint": "eslint -c eslint.config.mjs src",
"patch-webpack": "node ../tasks --patch-webpack",
"build": "npm run patch-webpack && craco build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1542,11 +1542,16 @@ class ObjectBrowserEditObject extends Component<ObjectBrowserEditObjectProps, Ob
const withAlias = obj._id.startsWith('alias.0') && obj.type === 'state';
const fullWidth = obj.type !== 'state' || (obj.common.type !== 'number' && obj.common.type !== 'boolean');

let dialogStyle = styles.dialog;
if (window.innerWidth > 1920) {
dialogStyle = { ...dialogStyle, maxWidth: 'calc(100% - 150px)' };
}

return (
<Dialog
sx={{ '& .MuiPaper-root': styles.dialog }}
sx={{ '& .MuiPaper-root': dialogStyle }}
open={!0}
maxWidth="lg"
maxWidth="xl"
fullWidth={fullWidth}
fullScreen={false}
onClose={() => this.props.onClose()}
Expand Down
Loading

0 comments on commit 80acce4

Please sign in to comment.