Skip to content

Commit 2226fea

Browse files
committed
Move Settings
1 parent e8e81ce commit 2226fea

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

site/src/components/Workspace/Workspace.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ Stopping.args = { ...Started.args, workspaceStatus: "stopping" }
3434

3535
export const Error = Template.bind({})
3636
Error.args = { ...Started.args, workspaceStatus: "error" }
37+
38+
export const NoBreadcrumb = Template.bind({})
39+
NoBreadcrumb.args = { ...Started.args, template: undefined }

site/src/components/WorkspaceStatusBar/WorkspaceStatusBar.tsx

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Link } from "react-router-dom"
99
import * as Types from "../../api/types"
1010
import { WorkspaceStatus } from "../../pages/WorkspacePage/WorkspacePage"
1111
import { TitleIconSize } from "../../theme/constants"
12+
import { combineClasses } from "../../util/combineClasses"
1213
import { Stack } from "../Stack/Stack"
1314
import { WorkspaceSection } from "../WorkspaceSection/WorkspaceSection"
1415

@@ -55,20 +56,27 @@ export const WorkspaceStatusBar: React.FC<WorkspaceStatusBarProps> = ({
5556
<WorkspaceSection>
5657
<Stack spacing={1}>
5758

58-
{organization && template &&
59-
<Typography variant="body2" color="textSecondary">
60-
Back to{" "}
61-
<Link className={styles.link} to={templateLink}>
62-
{template.name}
63-
</Link>
64-
</Typography>
65-
}
59+
<div className={combineClasses([styles.horizontal, styles.reverse])}>
60+
<div className={styles.horizontal}>
61+
<Link className={styles.link} to={`workspaces/${workspace.id}/edit`}>
62+
{Language.settings}
63+
</Link>
64+
</div>
65+
66+
{organization && template &&
67+
<Typography variant="body2" color="textSecondary">
68+
Back to{" "}
69+
<Link className={styles.link} to={templateLink}>
70+
{template.name}
71+
</Link>
72+
</Typography>
73+
}
74+
75+
</div>
6676

6777
<div className={styles.horizontal}>
6878
<div className={styles.horizontal}>
69-
<div className={styles.vertical}>
70-
<Typography variant="h4">{workspace.name}</Typography>
71-
</div>
79+
<Typography variant="h4">{workspace.name}</Typography>
7280
<Box className={styles.statusChip}>
7381
{workspaceStatus === "started" && Language.started}
7482
{workspaceStatus === "starting" && Language.starting}
@@ -101,12 +109,6 @@ export const WorkspaceStatusBar: React.FC<WorkspaceStatusBarProps> = ({
101109
</Button>
102110
)}
103111

104-
<Divider orientation="vertical" flexItem />
105-
106-
<Link className={styles.link} to={`workspaces/${workspace.id}/edit`}>
107-
{Language.settings}
108-
</Link>
109-
110112
</div>
111113
</div>
112114
</Stack>
@@ -126,11 +128,13 @@ const useStyles = makeStyles((theme) => {
126128
},
127129
horizontal: {
128130
display: "flex",
129-
flexDirection: "row",
130131
justifyContent: "space-between",
131132
alignItems: "center",
132133
gap: theme.spacing(2),
133134
},
135+
reverse: {
136+
flexDirection: 'row-reverse'
137+
},
134138
statusChip: {
135139
border: `solid 1px ${theme.palette.text.hint}`,
136140
borderRadius: theme.shape.borderRadius,

0 commit comments

Comments
 (0)