1
1
import Box from "@material-ui/core/Box"
2
- import Paper from "@material-ui/core/Paper"
3
2
import Typography from "@material-ui/core/Typography"
4
3
import React from "react"
5
4
import { Link } from "react-router-dom"
6
5
import { WorkspaceProps } from "../Workspace/Workspace"
7
6
import CloudCircleIcon from "@material-ui/icons/CloudCircle"
8
- import { CardPadding , CardRadius , TitleIconSize } from "../../theme/constants"
7
+ import { TitleIconSize } from "../../theme/constants"
9
8
import { makeStyles } from "@material-ui/core/styles"
10
9
import { WorkspaceSection } from "../WorkspaceSection/WorkspaceSection"
10
+ import { Stack } from "../Stack/Stack"
11
+ import Button from "@material-ui/core/Button"
11
12
12
13
/**
13
14
* Component for the header at the top of the workspace page
@@ -16,33 +17,51 @@ export const WorkspaceStatusBar: React.FC<WorkspaceProps> = ({ organization, tem
16
17
const styles = useStyles ( )
17
18
18
19
const templateLink = `/templates/${ organization . name } /${ template . name } `
20
+ const action = "Start" // TODO don't let me merge this
21
+ const outOfDate = false // TODO
19
22
20
23
return (
21
24
< WorkspaceSection >
25
+ < Stack spacing = { 1 } >
26
+ < Typography variant = "body2" color = "textSecondary" >
27
+ Back to < Link className = { styles . link } to = { templateLink } > { template . name } </ Link >
28
+ </ Typography >
22
29
< div className = { styles . horizontal } >
23
- < Box mr = "1em" >
24
- < CloudCircleIcon width = { TitleIconSize } height = { TitleIconSize } />
25
- </ Box >
26
- < div className = { styles . vertical } >
27
- < Typography variant = "h4" > { workspace . name } </ Typography >
28
- < Typography variant = "body2" color = "textSecondary" >
29
- < Link to = { templateLink } > { template . name } </ Link >
30
- </ Typography >
30
+ < div className = { styles . horizontal } >
31
+ < Box mr = "1em" >
32
+ < CloudCircleIcon width = { TitleIconSize } height = { TitleIconSize } />
33
+ </ Box >
34
+ < div className = { styles . vertical } >
35
+ < Typography variant = "h4" > { workspace . name } </ Typography >
36
+ </ div >
37
+ </ div >
38
+ < div className = { styles . horizontal } >
39
+ < Button color = "primary" > { action } </ Button >
40
+ < Button color = "primary" disabled = { ! outOfDate } > Update</ Button >
41
+ < Link className = { styles . link } to = { `workspaces/${ workspace . id } /edit` } > Settings</ Link >
31
42
</ div >
32
43
</ div >
44
+ </ Stack >
33
45
</ WorkspaceSection >
34
46
)
35
47
}
36
48
37
49
const useStyles = makeStyles ( ( theme ) => {
38
50
return {
51
+ link : {
52
+ textDecoration : 'none' ,
53
+ color : theme . palette . text . primary
54
+ } ,
39
55
icon : {
40
56
width : TitleIconSize ,
41
57
height : TitleIconSize ,
42
58
} ,
43
59
horizontal : {
44
60
display : "flex" ,
45
61
flexDirection : "row" ,
62
+ justifyContent : "space-between" ,
63
+ alignItems : "center" ,
64
+ gap : theme . spacing ( 1 )
46
65
} ,
47
66
vertical : {
48
67
display : "flex" ,
0 commit comments