From 20c3d7eeb2de808b92aa7743968b15589e956beb Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Wed, 3 May 2023 19:54:56 +0000 Subject: [PATCH] chore: adjust the style and wording of the license page - Reduce the size of the card to improve the use of space - Adjust the language of the add page to remove word redundancy - Change from using background colors to text colors --- .../components/LicenseCard/LicenseCard.tsx | 89 ++++++++----------- .../AddNewLicensePageView.tsx | 20 +++-- .../LicensesSettingsPageView.tsx | 27 +++--- 3 files changed, 63 insertions(+), 73 deletions(-) diff --git a/site/src/components/LicenseCard/LicenseCard.tsx b/site/src/components/LicenseCard/LicenseCard.tsx index 4a7420fcd267a..d6f5ad3a9fa75 100644 --- a/site/src/components/LicenseCard/LicenseCard.tsx +++ b/site/src/components/LicenseCard/LicenseCard.tsx @@ -1,4 +1,3 @@ -import Box from "@material-ui/core/Box" import Button from "@material-ui/core/Button" import Paper from "@material-ui/core/Paper" import { makeStyles } from "@material-ui/core/styles" @@ -48,55 +47,54 @@ export const LicenseCard = ({ setLicenseIDMarkedForRemoval(undefined) }} onClose={() => setLicenseIDMarkedForRemoval(undefined)} - title="Confirm license removal" + title="Confirm License Removal" confirmLoading={isRemoving} confirmText="Remove" - description="Are you sure you want to remove this license?" + description="Removing this license will disable all Enterprise features. You add a new license at any time." /> - - #{license.id} - - - {license.claims.trial ? "Trial" : "Enterprise"} - + #{license.id} + + {license.claims.trial ? "Trial" : "Enterprise"} + - + Users -
- {userLimitActual} - - {` / ${userLimitLimit || "Unlimited"}`} - -
+ + {userLimitActual} {` / ${userLimitLimit || "Unlimited"}`} +
- - Valid until - + + Valid Until + {dayjs .unix(license.claims.license_expires) .format("MMMM D, YYYY")} -
- -
+
@@ -105,41 +103,28 @@ export const LicenseCard = ({ const useStyles = makeStyles((theme) => ({ userLimit: { - width: "33%", - }, - actions: { - width: "33%", - textAlign: "right", - }, - userLimitActual: { - color: theme.palette.primary.main, - }, - userLimitLimit: { - color: theme.palette.secondary.main, - fontWeight: 600, + color: theme.palette.text.primary, }, licenseCard: { padding: theme.spacing(2), }, - cardContent: { - minHeight: 100, - }, + cardContent: {}, licenseId: { color: theme.palette.secondary.main, + fontSize: 18, fontWeight: 600, }, accountType: { fontWeight: 600, - fontSize: theme.typography.h4.fontSize, - justifyContent: "center", + fontSize: 18, alignItems: "center", textTransform: "capitalize", }, - primaryMainColor: { - color: theme.palette.primary.main, + licenseExpires: { + color: theme.palette.text.secondary, }, secondaryMaincolor: { - color: theme.palette.secondary.main, + color: theme.palette.text.hint, }, removeButton: { height: "17px", diff --git a/site/src/pages/DeploySettingsPage/LicensesSettingsPage/AddNewLicensePageView.tsx b/site/src/pages/DeploySettingsPage/LicensesSettingsPage/AddNewLicensePageView.tsx index 9d2266b816767..bc441c0855b3c 100644 --- a/site/src/pages/DeploySettingsPage/LicensesSettingsPage/AddNewLicensePageView.tsx +++ b/site/src/pages/DeploySettingsPage/LicensesSettingsPage/AddNewLicensePageView.tsx @@ -6,6 +6,7 @@ import { AlertBanner } from "components/AlertBanner/AlertBanner" import { Fieldset } from "components/DeploySettingsLayout/Fieldset" import { Header } from "components/DeploySettingsLayout/Header" import { FileUpload } from "components/FileUpload/FileUpload" +import KeyboardArrowLeft from "@material-ui/icons/KeyboardArrowLeft" import { displayError } from "components/GlobalSnackbar/utils" import { Stack } from "components/Stack/Stack" import { DividerWithText } from "pages/DeploySettingsPage/LicensesSettingsPage/DividerWithText" @@ -54,15 +55,16 @@ export const AddNewLicensePageView: FC = ({ justifyContent="space-between" >
@@ -74,15 +76,15 @@ export const AddNewLicensePageView: FC = ({ isUploading={isUploading} onUpload={onUpload} removeLabel="Remove File" - title="Upload your license" - description="Upload a text file containing your license key" + title="Upload Your License" + description="Select a text file that contains your license key." /> or
{ e.preventDefault() @@ -95,15 +97,15 @@ export const AddNewLicensePageView: FC = ({ }} button={ } >
diff --git a/site/src/pages/DeploySettingsPage/LicensesSettingsPage/LicensesSettingsPageView.tsx b/site/src/pages/DeploySettingsPage/LicensesSettingsPage/LicensesSettingsPageView.tsx index 631e6dc6565f7..4e5a7e1a4c905 100644 --- a/site/src/pages/DeploySettingsPage/LicensesSettingsPage/LicensesSettingsPageView.tsx +++ b/site/src/pages/DeploySettingsPage/LicensesSettingsPage/LicensesSettingsPageView.tsx @@ -1,5 +1,6 @@ import Button from "@material-ui/core/Button" import { makeStyles, useTheme } from "@material-ui/core/styles" +import AddIcon from "@material-ui/icons/AddOutlined" import Skeleton from "@material-ui/lab/Skeleton" import { GetLicensesResponse } from "api/api" import { Header } from "components/DeploySettingsLayout/Header" @@ -37,8 +38,9 @@ const LicensesSettingsPageView: FC = ({ return ( <> @@ -49,15 +51,16 @@ const LicensesSettingsPageView: FC = ({ >
@@ -82,11 +85,14 @@ const LicensesSettingsPageView: FC = ({
- No licenses yet + + You don{"'"}t have any licenses! + - Contact sales or{" "} + You{"'"}re missing out on high availability, RBAC, quotas, and + much more. Contact sales or{" "} request a trial license to - learn more. + get started. @@ -109,16 +115,13 @@ const useStyles = makeStyles((theme) => ({ 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), + maxWidth: theme.spacing(58), + marginTop: theme.spacing(1), }, }))