Skip to content

Commit 0e00ca7

Browse files
committed
fix: push create workspace UX to templates page
1 parent 4b82509 commit 0e00ca7

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspacePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const CreateWorkspacePage: FC = () => {
3535
selectedTemplate={createWorkspaceState.context.selectedTemplate}
3636
templateSchema={createWorkspaceState.context.templateSchema}
3737
onCancel={() => {
38-
navigate(preSelectedTemplateName ? "/templates" : "/workspaces")
38+
navigate("/templates")
3939
}}
4040
onSubmit={(request) => {
4141
send({

site/src/pages/WorkspacesPage/WorkspacesPageView.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ import { Stack } from "../../components/Stack/Stack"
3737
import { TableLoader } from "../../components/TableLoader/TableLoader"
3838
import { getFormHelpers, onChangeTrimmed } from "../../util/formUtils"
3939
import { getDisplayStatus, workspaceFilterQuery } from "../../util/workspace"
40+
import ReplyIcon from '@material-ui/icons/Reply';
4041

4142
dayjs.extend(relativeTime)
4243

4344
export const Language = {
44-
createWorkspaceButton: "Create workspace",
45+
createFromTemplateButton: "Create from template",
4546
emptyCreateWorkspaceMessage: "Create your first workspace",
4647
emptyCreateWorkspaceDescription: "Start editing your source code and building your software",
4748
emptyResultsMessage: "No results matched your search",
@@ -132,9 +133,9 @@ export const WorkspacesPageView: FC<WorkspacesPageViewProps> = ({ loading, works
132133
<Margins>
133134
<PageHeader
134135
actions={
135-
<Link underline="none" component={RouterLink} to="/workspaces/new">
136-
<Button startIcon={<AddCircleOutline />} style={{ height: "44px" }}>
137-
{Language.createWorkspaceButton}
136+
<Link underline="none" component={RouterLink} to="/templates">
137+
<Button startIcon={<ReplyIcon style={{ transform: "scaleX(-1)" }}/>} style={{ height: "44px" }}>
138+
{Language.createFromTemplateButton}
138139
</Button>
139140
</Link>
140141
}
@@ -213,7 +214,7 @@ export const WorkspacesPageView: FC<WorkspacesPageViewProps> = ({ loading, works
213214
description={Language.emptyCreateWorkspaceDescription}
214215
cta={
215216
<Link underline="none" component={RouterLink} to="/workspaces/new">
216-
<Button startIcon={<AddCircleOutline />}>{Language.createWorkspaceButton}</Button>
217+
<Button startIcon={<AddCircleOutline />}>{Language.createFromTemplateButton}</Button>
217218
</Link>
218219
}
219220
/>

0 commit comments

Comments
 (0)