Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create content item fields width #2484

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 29 additions & 28 deletions src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import isEmpty from "lodash/isEmpty";
import { createSelector } from "@reduxjs/toolkit";
import { cloneDeep } from "lodash";

import { Divider, Box } from "@mui/material";
import { Divider, Box, Stack } from "@mui/material";

import { WithLoader } from "@zesty-io/core/WithLoader";
import { NotFound } from "../../../../../../shell/components/NotFound";
Expand Down Expand Up @@ -267,19 +267,20 @@ export const ItemCreate = () => {

return (
<WithLoader condition={!loading && item} message="Creating New Item">
<section>
<Box component="section">
<Header
onSave={save}
model={model}
isLoading={saving || isPublishing || isLoadingNewItem}
isDirty={item?.dirty}
/>
<Box
<Stack
component="main"
className={styles.ItemCreate}
sx={{ backgroundColor: "grey.50" }}
bgcolor="grey.50"
alignItems="center"
>
<div className={styles.Editor}>
<Box minWidth={640} width="60%">
<Editor
// @ts-ignore no types
active={active}
Expand All @@ -303,31 +304,31 @@ export const ItemCreate = () => {
setFieldErrors(errors);
}}
/>
</Box>

<div className={styles.Meta}>
<Divider
sx={{
mt: 4,
mb: 2,
}}
<Box className={styles.Meta} minWidth={640} width="60%">
<Divider
sx={{
mt: 4,
mb: 2,
}}
/>
<h2 className={styles.title}>Meta Settings</h2>
{model && model?.type === "dataset" ? (
<DataSettings item={item} dispatch={dispatch} />
) : (
<ItemSettings
// @ts-ignore no types
instance={instance}
modelZUID={modelZUID}
item={item}
content={content}
dispatch={dispatch}
/>
<h2 className={styles.title}>Meta Settings</h2>
{model && model?.type === "dataset" ? (
<DataSettings item={item} dispatch={dispatch} />
) : (
<ItemSettings
// @ts-ignore no types
instance={instance}
modelZUID={modelZUID}
item={item}
content={content}
dispatch={dispatch}
/>
)}
</div>
</div>
</Box>
</section>
)}
</Box>
</Stack>
</Box>
<ScheduleFlyout
isOpen={!isLoadingNewItem && isScheduleDialogOpen}
item={newItemData}
Expand Down
Loading