Skip to content

Commit 43dece2

Browse files
committed
Merge remote-tracking branch 'origin/main' into stevenmasley/suspended_users
2 parents 8a2b6c2 + 655f348 commit 43dece2

File tree

6 files changed

+21
-4
lines changed

6 files changed

+21
-4
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=soc
1010

1111
Coder creates remote development machines so you can develop your code from anywhere.
1212

13-
**Coder is in an alpha state.** But, any serious bugs are P1 for us so please report them.
13+
> **Note**:
14+
> Coder is in an alpha state. But, any serious bugs are P1 for us so please report them.
1415
1516
<p align="center">
1617
<img src="./docs/images/hero-image.png">

site/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"cronstrue": "2.5.0",
3939
"dayjs": "1.11.2",
4040
"formik": "2.2.9",
41+
"front-matter": "4.0.2",
4142
"history": "5.3.0",
4243
"react": "17.0.2",
4344
"react-dom": "17.0.2",

site/src/api/api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export const updateProfile = async (
219219
}
220220

221221
export const suspendUser = async (userId: TypesGen.User["id"]): Promise<TypesGen.User> => {
222-
const response = await axios.put<TypesGen.User>(`/api/v2/users/${userId}/suspend`)
222+
const response = await axios.put<TypesGen.User>(`/api/v2/users/${userId}/status/suspend`)
223223
return response.data
224224
}
225225

site/src/pages/TemplatePage/TemplatePageView.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Link from "@material-ui/core/Link"
33
import { makeStyles } from "@material-ui/core/styles"
44
import Typography from "@material-ui/core/Typography"
55
import AddCircleOutline from "@material-ui/icons/AddCircleOutline"
6+
import frontMatter from "front-matter"
67
import React from "react"
78
import ReactMarkdown from "react-markdown"
89
import { Link as RouterLink } from "react-router-dom"
@@ -33,6 +34,7 @@ export const TemplatePageView: React.FC<TemplatePageViewProps> = ({
3334
templateResources,
3435
}) => {
3536
const styles = useStyles()
37+
const readme = frontMatter(activeTemplateVersion.readme)
3638

3739
const getStartedResources = (resources: WorkspaceResource[]) => {
3840
return resources.filter((resource) => resource.workspace_transition === "start")
@@ -74,7 +76,7 @@ export const TemplatePageView: React.FC<TemplatePageViewProps> = ({
7476
),
7577
}}
7678
>
77-
{activeTemplateVersion.readme}
79+
{readme.body}
7880
</ReactMarkdown>
7981
</div>
8082
</WorkspaceSection>

site/src/testHelpers/entities.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ export const MockTemplateVersion: TypesGen.TemplateVersion = {
8888
updated_at: "",
8989
job: MockProvisionerJob,
9090
name: "test-version",
91-
readme: "## Instructions\nYou can add instructions here\n\n[Some link info](https://coder.com)",
91+
readme: `---
92+
name:Template test
93+
---
94+
## Instructions
95+
You can add instructions here
96+
97+
[Some link info](https://coder.com)`,
9298
}
9399

94100
export const MockTemplate: TypesGen.Template = {

site/yarn.lock

+7
Original file line numberDiff line numberDiff line change
@@ -6969,6 +6969,13 @@ from2@^2.1.0:
69696969
inherits "^2.0.1"
69706970
readable-stream "^2.0.0"
69716971

6972+
front-matter@4.0.2:
6973+
version "4.0.2"
6974+
resolved "https://registry.yarnpkg.com/front-matter/-/front-matter-4.0.2.tgz#b14e54dc745cfd7293484f3210d15ea4edd7f4d5"
6975+
integrity sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==
6976+
dependencies:
6977+
js-yaml "^3.13.1"
6978+
69726979
fs-extra@^0.30.0:
69736980
version "0.30.0"
69746981
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0"

0 commit comments

Comments
 (0)