Skip to content

feat: add license settings UI #7210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Apr 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix empty license page
  • Loading branch information
rodrimaia committed Apr 26, 2023
commit 8d55d9821a29e38e02067f3399d01e5675456ad9
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,45 @@ const LicensesSettingsPageView: FC<Props> = ({
)}

{!isLoading && licenses === null && (
<Stack spacing={4} justifyContent="center" alignItems="center">
<Button
className={styles.ctaButton}
size="large"
component={Link}
to="/settings/deployment/licenses/add"
>
Add license
</Button>
</Stack>
<div className={styles.root}>
<Stack alignItems="center" spacing={1}>
<Stack alignItems="center" spacing={0.5}>
<span className={styles.title}>No Licenses yet</span>
<span className={styles.description}>
<a href="mailto:sales@coder.com">Contact sales</a> to learn
more.
</span>
</Stack>
</Stack>
</div>
)}
</>
)
}

const useStyles = makeStyles((theme) => ({
ctaButton: {
backgroundImage: `linear-gradient(90deg, ${theme.palette.secondary.main} 0%, ${theme.palette.secondary.dark} 100%)`,
width: theme.spacing(30),
marginBottom: theme.spacing(4),
marginTop: theme.spacing(4),
title: {
fontSize: theme.spacing(2),
},

root: {
minHeight: theme.spacing(30),
display: "flex",
alignItems: "center",
justifyContent: "center",
borderRadius: theme.shape.borderRadius,
border: `1px solid ${theme.palette.divider}`,
padding: theme.spacing(6),

"&:hover": {
backgroundColor: theme.palette.background.paper,
},
},

description: {
color: theme.palette.text.secondary,
textAlign: "center",
maxWidth: theme.spacing(50),
},
}))

Expand Down