@@ -11,6 +11,7 @@ import useTheme from "@material-ui/styles/useTheme"
11
11
import { ChooseOne , Cond } from "components/Conditionals/ChooseOne"
12
12
import { Maybe } from "components/Conditionals/Maybe"
13
13
import { ErrorSummary } from "components/ErrorSummary/ErrorSummary"
14
+ import { WorkspaceQuota } from "components/WorkspaceQuota/WorkspaceQuota"
14
15
import { FC } from "react"
15
16
import { useTranslation } from "react-i18next"
16
17
import { useNavigate } from "react-router-dom"
@@ -98,34 +99,39 @@ export const TemplatesPageView: FC<React.PropsWithChildren<TemplatesPageViewProp
98
99
99
100
return (
100
101
< Margins >
101
- < PageHeader >
102
- < PageHeaderTitle >
103
- < Stack spacing = { 1 } direction = "row" alignItems = "center" >
104
- Templates
105
- < TemplateHelpTooltip />
106
- </ Stack >
107
- </ PageHeaderTitle >
108
- < Maybe condition = { Boolean ( props . templates && props . templates . length > 0 ) } >
109
- < PageHeaderSubtitle >
110
- Choose a template to create a new workspace
111
- { props . canCreateTemplate ? (
112
- < >
113
- , or{ " " }
114
- < Link
115
- href = "https://coder.com/docs/coder-oss/latest/templates#add-a-template"
116
- target = "_blank"
117
- >
118
- manage templates
119
- </ Link > { " " }
120
- from the CLI.
121
- </ >
122
- ) : (
123
- "."
124
- ) }
125
- </ PageHeaderSubtitle >
126
- </ Maybe >
127
- </ PageHeader >
128
-
102
+ < PageHeader
103
+ actions = {
104
+ < >
105
+ < WorkspaceQuota quota = { { count : 1 , limit : 3 } } />
106
+ </ >
107
+ }
108
+ >
109
+ < PageHeaderTitle >
110
+ < Stack spacing = { 1 } direction = "row" alignItems = "center" >
111
+ Templates
112
+ < TemplateHelpTooltip />
113
+ </ Stack >
114
+ </ PageHeaderTitle >
115
+ < Maybe condition = { Boolean ( props . templates && props . templates . length > 0 ) } >
116
+ < PageHeaderSubtitle >
117
+ Choose a template to create a new workspace
118
+ { props . canCreateTemplate ? (
119
+ < >
120
+ , or{ " " }
121
+ < Link
122
+ href = "https://coder.com/docs/coder-oss/latest/templates#add-a-template"
123
+ target = "_blank"
124
+ >
125
+ manage templates
126
+ </ Link > { " " }
127
+ from the CLI.
128
+ </ >
129
+ ) : (
130
+ "."
131
+ ) }
132
+ </ PageHeaderSubtitle >
133
+ </ Maybe >
134
+ </ PageHeader >
129
135
< ChooseOne >
130
136
< Cond condition = { Boolean ( props . getOrganizationsError ) } >
131
137
< ErrorSummary
@@ -278,4 +284,11 @@ const useStyles = makeStyles((theme) => ({
278
284
width : "100%" ,
279
285
} ,
280
286
} ,
287
+ quota : {
288
+ [ theme . breakpoints . up ( "md" ) ] : {
289
+ marginLeft : "auto" ,
290
+ } ,
291
+ paddingTop : theme . spacing ( 6 ) ,
292
+ paddingBottom : theme . spacing ( 5 ) ,
293
+ } ,
281
294
} ) )
0 commit comments