Skip to content

Commit

Permalink
Adjustments to PR #2137
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech committed Feb 25, 2025
1 parent fba3fef commit 8001a21
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
5 changes: 2 additions & 3 deletions client/src/components/Modals/ActionProjectCopy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ export default function CopyProjectModal({
<div style={theme.typography.heading3}>{`${selectedProjectName}`}.</div>
<div style={{ margin: "1.5rem 2.5rem 1.5rem 0.75rem" }}>
<input
placeholder="Name of Duplicated Project"
placeholder="Name of the duplicated project"
type="text"
id="duplicateName"
name="duplicateName"
value={duplicateProjectName}
onChange={e => setDuplicateProjectName(e.target.value)}
// autoFocus
// onFocus={e => e.currentTarget.select()}
/>
</div>
<div className={classes.buttonFlexBox}>
Expand All @@ -63,6 +61,7 @@ export default function CopyProjectModal({
onClick={() => onClose("ok", duplicateProjectName)}
variant="contained"
color={"colorPrimary"}
disabled={!duplicateProjectName}
>
Create a Copy
</Button>
Expand Down
16 changes: 5 additions & 11 deletions client/src/components/Modals/ActionProjectSnapshot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export default function SnapshotProjectModal({
}) {
const theme = useTheme();
const classes = useStyles({ theme });
const [snapshotProjectName, setSnapshotProjectName] = useState(
`${selectedProjectName}`
);
const [snapshotProjectName, setSnapshotProjectName] = useState("");

return (
<ModalDialog
Expand All @@ -49,7 +47,7 @@ export default function SnapshotProjectModal({
</div>
<div style={{ margin: "1.5rem 2.5rem 1.5rem 0.75rem" }}>
<input
placeholder="Name of Duplicated Project"
placeholder="Name of the Snapshot"
type="text"
id="duplicateName"
name="duplicateName"
Expand All @@ -58,17 +56,13 @@ export default function SnapshotProjectModal({
/>
</div>
<div className={classes.buttonFlexBox}>
<Button
className={classes.buttonColor}
onClick={onClose}
variant="contained"
>
<Button onClick={onClose} variant="secondary">
Cancel
</Button>
<Button
className={classes.buttonColor}
onClick={() => onClose("ok", snapshotProjectName)}
variant="contained"
variant="primary"
disabled={!snapshotProjectName}
>
Done
</Button>
Expand Down
9 changes: 4 additions & 5 deletions client/src/components/Modals/ActionSnapshotRename.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export default function RenameSnapshotModal({
}) {
const theme = useTheme();
const classes = useStyles({ theme });
const [snapshotProjectName, setSnapshotProjectName] = useState(
`${selectedProjectName}`
);
const [snapshotProjectName, setSnapshotProjectName] = useState("");

return (
<ModalDialog
Expand All @@ -32,14 +30,14 @@ export default function RenameSnapshotModal({
initialFocus="#duplicateName"
>
<div className={classes.heading1} style={{ marginBottom: "1.5rem" }}>
Rename Snapshot?
Rename Snapshot &quot;{selectedProjectName}&quot;
</div>
<div style={theme.typography.subHeading}>
What would you like to rename your snapshot to?
</div>
<div style={{ margin: "1.5rem 2.5rem 1.5rem 0.75rem" }}>
<input
placeholder="Name of Duplicated Project"
placeholder="New project name for snapshot"
type="text"
id="duplicateName"
name="duplicateName"
Expand All @@ -60,6 +58,7 @@ export default function RenameSnapshotModal({
onClick={() => onClose("ok", snapshotProjectName)}
variant="contained"
color={"colorPrimary"}
disabled={!snapshotProjectName}
>
Done
</Button>
Expand Down

0 comments on commit 8001a21

Please sign in to comment.