feat: update language on workspace page (#2220)

This commit is contained in:
Kira Pilot
2022-06-10 16:42:21 -04:00
committed by GitHub
parent 02d2aea7f2
commit ec0bb7b330

View File

@ -7,10 +7,12 @@ import { Workspace } from "../../api/typesGenerated"
import { CardRadius, MONOSPACE_FONT_FAMILY } from "../../theme/constants" import { CardRadius, MONOSPACE_FONT_FAMILY } from "../../theme/constants"
import { combineClasses } from "../../util/combineClasses" import { combineClasses } from "../../util/combineClasses"
import { getDisplayStatus } from "../../util/workspace" import { getDisplayStatus } from "../../util/workspace"
import { WorkspaceSection } from "../WorkspaceSection/WorkspaceSection"
const Language = { const Language = {
workspaceDetails: "Workspace Details",
templateLabel: "Template", templateLabel: "Template",
statusLabel: "Status", statusLabel: "Workspace Status",
versionLabel: "Version", versionLabel: "Version",
lastBuiltLabel: "Last Built", lastBuiltLabel: "Last Built",
outdated: "Outdated", outdated: "Outdated",
@ -27,7 +29,7 @@ export const WorkspaceStats: FC<WorkspaceStatsProps> = ({ workspace }) => {
const status = getDisplayStatus(theme, workspace.latest_build) const status = getDisplayStatus(theme, workspace.latest_build)
return ( return (
<div className={styles.stats}> <WorkspaceSection title={Language.workspaceDetails} contentsProps={{ className: styles.stats }}>
<div className={styles.statItem}> <div className={styles.statItem}>
<span className={styles.statsLabel}>{Language.templateLabel}</span> <span className={styles.statsLabel}>{Language.templateLabel}</span>
<Link <Link
@ -65,7 +67,7 @@ export const WorkspaceStats: FC<WorkspaceStatsProps> = ({ workspace }) => {
</span> </span>
</span> </span>
</div> </div>
</div> </WorkspaceSection>
) )
} }
@ -79,7 +81,7 @@ const useStyles = makeStyles((theme) => ({
alignItems: "center", alignItems: "center",
color: theme.palette.text.secondary, color: theme.palette.text.secondary,
fontFamily: MONOSPACE_FONT_FAMILY, fontFamily: MONOSPACE_FONT_FAMILY,
border: `1px solid ${theme.palette.divider}`, margin: "0px",
}, },
statItem: { statItem: {