mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
chore: use px values instead of theme.spacing
and theme.shape.borderRadius
(#10519)
This commit is contained in:
@ -11,24 +11,24 @@ export type AvatarProps = MuiAvatarProps & {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const sizeStyles = {
|
const sizeStyles = {
|
||||||
xs: (theme) => ({
|
xs: {
|
||||||
width: theme.spacing(2),
|
width: 16,
|
||||||
height: theme.spacing(2),
|
height: 16,
|
||||||
fontSize: theme.spacing(1),
|
fontSize: 8,
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
}),
|
},
|
||||||
sm: (theme) => ({
|
sm: {
|
||||||
width: theme.spacing(3),
|
width: 24,
|
||||||
height: theme.spacing(3),
|
height: 24,
|
||||||
fontSize: theme.spacing(1.5),
|
fontSize: 12,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
}),
|
},
|
||||||
md: {},
|
md: {},
|
||||||
xl: (theme) => ({
|
xl: {
|
||||||
width: theme.spacing(6),
|
width: 48,
|
||||||
height: theme.spacing(6),
|
height: 48,
|
||||||
fontSize: theme.spacing(3),
|
fontSize: 24,
|
||||||
}),
|
},
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
|
||||||
const colorStyles = {
|
const colorStyles = {
|
||||||
|
@ -28,7 +28,7 @@ export const AvatarData: FC<AvatarDataProps> = ({
|
|||||||
direction="row"
|
direction="row"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
css={{
|
css={{
|
||||||
minHeight: theme.spacing(5), // Make it predictable for the skeleton
|
minHeight: 40, // Make it predictable for the skeleton
|
||||||
width: "100%",
|
width: "100%",
|
||||||
lineHeight: "150%",
|
lineHeight: "150%",
|
||||||
}}
|
}}
|
||||||
|
@ -26,8 +26,8 @@ export const CodeExample: FC<CodeExampleProps> = (props) => {
|
|||||||
color: theme.palette.primary.contrastText,
|
color: theme.palette.primary.contrastText,
|
||||||
fontFamily: MONOSPACE_FONT_FAMILY,
|
fontFamily: MONOSPACE_FONT_FAMILY,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
padding: theme.spacing(1),
|
padding: 8,
|
||||||
lineHeight: "150%",
|
lineHeight: "150%",
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
}}
|
}}
|
||||||
@ -35,7 +35,7 @@ export const CodeExample: FC<CodeExampleProps> = (props) => {
|
|||||||
>
|
>
|
||||||
<code
|
<code
|
||||||
css={{
|
css={{
|
||||||
padding: theme.spacing(0, 1),
|
padding: "0 8px",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
|
@ -46,8 +46,8 @@ export const CopyButton: React.FC<React.PropsWithChildren<CopyButtonProps>> = ({
|
|||||||
<IconButton
|
<IconButton
|
||||||
className={buttonClassName}
|
className={buttonClassName}
|
||||||
css={(theme) => css`
|
css={(theme) => css`
|
||||||
border-radius: ${theme.shape.borderRadius}px;
|
border-radius: 8px;
|
||||||
padding: ${theme.spacing(0.85)};
|
padding: 8px;
|
||||||
min-width: 32px;
|
min-width: 32px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@ -64,15 +64,7 @@ export const CopyButton: React.FC<React.PropsWithChildren<CopyButtonProps>> = ({
|
|||||||
) : (
|
) : (
|
||||||
<FileCopyIcon css={fileCopyIconStyles} />
|
<FileCopyIcon css={fileCopyIconStyles} />
|
||||||
)}
|
)}
|
||||||
{ctaCopy && (
|
{ctaCopy && <div css={{ marginLeft: 8 }}>{ctaCopy}</div>}
|
||||||
<div
|
|
||||||
css={(theme) => ({
|
|
||||||
marginLeft: theme.spacing(1),
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{ctaCopy}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
@ -60,7 +60,7 @@ export const DashboardLayout: FC = () => {
|
|||||||
sx: (theme) => ({
|
sx: (theme) => ({
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
maxWidth: theme.spacing(55),
|
maxWidth: 440,
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
borderColor: theme.palette.info.light,
|
borderColor: theme.palette.info.light,
|
||||||
|
|
||||||
|
@ -46,18 +46,18 @@ const styles = {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
`,
|
`,
|
||||||
category: (theme) => ({
|
category: (theme) => ({
|
||||||
marginRight: theme.spacing(2),
|
marginRight: 16,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
}),
|
}),
|
||||||
values: (theme) => ({
|
values: (theme) => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
}),
|
}),
|
||||||
value: (theme) => css`
|
value: css`
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: ${theme.spacing(0.5)};
|
gap: 4px;
|
||||||
|
|
||||||
& svg {
|
& svg {
|
||||||
width: 12px;
|
width: 12px;
|
||||||
@ -129,7 +129,7 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: ${unhealthy ? colors.red[10] : undefined};
|
background-color: ${unhealthy ? colors.red[10] : undefined};
|
||||||
padding: ${theme.spacing(0, 1.5)};
|
padding: 0 12px;
|
||||||
height: ${bannerHeight}px;
|
height: ${bannerHeight}px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
@ -142,9 +142,9 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
|
|||||||
const statusSummaryStyle = className`
|
const statusSummaryStyle = className`
|
||||||
${theme.typography.body2 as CSSObject}
|
${theme.typography.body2 as CSSObject}
|
||||||
|
|
||||||
margin: ${theme.spacing(0, 0, 0.5, 1.5)};
|
margin: 0 0 4px 12px;
|
||||||
width: ${theme.spacing(50)};
|
width: 400px;
|
||||||
padding: ${theme.spacing(2)};
|
padding: 16px;
|
||||||
color: ${theme.palette.text.primary};
|
color: ${theme.palette.text.primary};
|
||||||
background-color: ${theme.palette.background.paper};
|
background-color: ${theme.palette.background.paper};
|
||||||
border: 1px solid ${theme.palette.divider};
|
border: 1px solid ${theme.palette.divider};
|
||||||
@ -158,13 +158,13 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
|
|||||||
height: bannerHeight,
|
height: bannerHeight,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
paddingRight: theme.spacing(2),
|
paddingRight: 16,
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
fontFamily: MONOSPACE_FONT_FAMILY,
|
fontFamily: MONOSPACE_FONT_FAMILY,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
gap: theme.spacing(4),
|
gap: 32,
|
||||||
borderTop: `1px solid ${theme.palette.divider}`,
|
borderTop: `1px solid ${theme.palette.divider}`,
|
||||||
overflowX: "auto",
|
overflowX: "auto",
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
@ -204,7 +204,7 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
open={process.env.STORYBOOK === "true" ? true : undefined}
|
open={process.env.STORYBOOK === "true" ? true : undefined}
|
||||||
css={{ marginRight: theme.spacing(-2) }}
|
css={{ marginRight: -16 }}
|
||||||
>
|
>
|
||||||
{unhealthy ? (
|
{unhealthy ? (
|
||||||
<Link component={RouterLink} to="/health" css={statusBadgeStyle}>
|
<Link component={RouterLink} to="/health" css={statusBadgeStyle}>
|
||||||
@ -323,7 +323,7 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
|
|||||||
marginLeft: "auto",
|
marginLeft: "auto",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(2),
|
gap: 16,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Tooltip title="The last time stats were aggregated. Workspaces report statistics periodically, so it may take a bit for these to update!">
|
<Tooltip title="The last time stats were aggregated. Workspaces report statistics periodically, so it may take a bit for these to update!">
|
||||||
@ -335,23 +335,24 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = (props) => {
|
|||||||
|
|
||||||
<Tooltip title="A countdown until stats are fetched again. Click to refresh!">
|
<Tooltip title="A countdown until stats are fetched again. Click to refresh!">
|
||||||
<Button
|
<Button
|
||||||
css={css`
|
css={[
|
||||||
${styles.value(theme)}
|
styles.value,
|
||||||
|
css`
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 8px;
|
||||||
|
height: unset;
|
||||||
|
min-height: unset;
|
||||||
|
font-size: unset;
|
||||||
|
color: unset;
|
||||||
|
border: 0;
|
||||||
|
min-width: unset;
|
||||||
|
font-family: inherit;
|
||||||
|
|
||||||
margin: 0;
|
& svg {
|
||||||
padding: 0 8px;
|
margin-right: 4px;
|
||||||
height: unset;
|
}
|
||||||
min-height: unset;
|
`,
|
||||||
font-size: unset;
|
]}
|
||||||
color: unset;
|
|
||||||
border: 0;
|
|
||||||
min-width: unset;
|
|
||||||
font-family: inherit;
|
|
||||||
|
|
||||||
& svg {
|
|
||||||
margin-right: ${theme.spacing(0.5)};
|
|
||||||
}
|
|
||||||
`}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (fetchStats) {
|
if (fetchStats) {
|
||||||
fetchStats();
|
fetchStats();
|
||||||
|
@ -21,10 +21,10 @@ export const Language = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
leftContent: (theme) => ({
|
leftContent: {
|
||||||
marginRight: theme.spacing(1),
|
marginRight: 8,
|
||||||
marginLeft: theme.spacing(1),
|
marginLeft: 8,
|
||||||
}),
|
},
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
|
||||||
export interface LicenseBannerViewProps {
|
export interface LicenseBannerViewProps {
|
||||||
@ -47,7 +47,7 @@ export const LicenseBannerView: React.FC<LicenseBannerViewProps> = ({
|
|||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: ${theme.spacing(1.5)};
|
padding: 12px;
|
||||||
background-color: ${type === "error"
|
background-color: ${type === "error"
|
||||||
? colors.red[12]
|
? colors.red[12]
|
||||||
: theme.palette.warning.main};
|
: theme.palette.warning.main};
|
||||||
@ -84,9 +84,9 @@ export const LicenseBannerView: React.FC<LicenseBannerViewProps> = ({
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<Expander expanded={showDetails} setExpanded={setShowDetails}>
|
<Expander expanded={showDetails} setExpanded={setShowDetails}>
|
||||||
<ul css={{ padding: theme.spacing(1), margin: 0 }}>
|
<ul css={{ padding: 8, margin: 0 }}>
|
||||||
{messages.map((message) => (
|
{messages.map((message) => (
|
||||||
<li css={{ margin: theme.spacing(0.5) }} key={message}>
|
<li css={{ margin: 4 }} key={message}>
|
||||||
{message}
|
{message}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
@ -70,17 +70,17 @@ const styles = {
|
|||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
drawerHeader: (theme) => ({
|
drawerHeader: {
|
||||||
padding: theme.spacing(2),
|
padding: 16,
|
||||||
paddingTop: theme.spacing(4),
|
paddingTop: 32,
|
||||||
paddingBottom: theme.spacing(4),
|
paddingBottom: 32,
|
||||||
}),
|
},
|
||||||
logo: (theme) => css`
|
logo: (theme) => css`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: ${navHeight}px;
|
height: ${navHeight}px;
|
||||||
color: ${theme.palette.text.primary};
|
color: ${theme.palette.text.primary};
|
||||||
padding: ${theme.spacing(2)};
|
padding: 16px;
|
||||||
|
|
||||||
// svg is for the Coder logo, img is for custom images
|
// svg is for the Coder logo, img is for custom images
|
||||||
& svg,
|
& svg,
|
||||||
@ -89,10 +89,10 @@ const styles = {
|
|||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
drawerLogo: (theme) => ({
|
drawerLogo: {
|
||||||
padding: 0,
|
padding: 0,
|
||||||
maxHeight: theme.spacing(5),
|
maxHeight: 40,
|
||||||
}),
|
},
|
||||||
item: {
|
item: {
|
||||||
padding: 0,
|
padding: 0,
|
||||||
},
|
},
|
||||||
@ -102,7 +102,7 @@ const styles = {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
padding: ${theme.spacing(1.5)} ${theme.spacing(2)};
|
padding: 12px 16px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: background-color 0.15s ease-in-out;
|
transition: background-color 0.15s ease-in-out;
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ const styles = {
|
|||||||
|
|
||||||
${theme.breakpoints.up("md")} {
|
${theme.breakpoints.up("md")} {
|
||||||
height: ${navHeight}px;
|
height: ${navHeight}px;
|
||||||
padding: 0 ${theme.spacing(3)};
|
padding: 0 24px;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
@ -171,6 +171,7 @@ const NavItems: React.FC<NavItemsProps> = (props) => {
|
|||||||
</nav>
|
</nav>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const NavbarView: FC<NavbarViewProps> = ({
|
export const NavbarView: FC<NavbarViewProps> = ({
|
||||||
user,
|
user,
|
||||||
logo_url,
|
logo_url,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Badge from "@mui/material/Badge";
|
import Badge from "@mui/material/Badge";
|
||||||
import { FC, PropsWithChildren } from "react";
|
import { type FC, type PropsWithChildren } from "react";
|
||||||
import { colors } from "theme/colors";
|
import { colors } from "theme/colors";
|
||||||
import * as TypesGen from "api/typesGenerated";
|
import type * as TypesGen from "api/typesGenerated";
|
||||||
import { navHeight } from "theme/constants";
|
import { navHeight } from "theme/constants";
|
||||||
import { DropdownArrow } from "components/DropdownArrow/DropdownArrow";
|
import { DropdownArrow } from "components/DropdownArrow/DropdownArrow";
|
||||||
import { UserAvatar } from "components/UserAvatar/UserAvatar";
|
import { UserAvatar } from "components/UserAvatar/UserAvatar";
|
||||||
@ -35,12 +35,12 @@ export const UserDropdown: FC<PropsWithChildren<UserDropdownProps>> = ({
|
|||||||
<>
|
<>
|
||||||
<PopoverTrigger>
|
<PopoverTrigger>
|
||||||
<button
|
<button
|
||||||
css={(theme) => css`
|
css={css`
|
||||||
background: none;
|
background: none;
|
||||||
border: 0;
|
border: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: ${navHeight}px;
|
height: ${navHeight}px;
|
||||||
padding: ${theme.spacing(1.5, 0)};
|
padding: 12px 0;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
@ -28,7 +28,7 @@ const styles = {
|
|||||||
info: (theme) => [
|
info: (theme) => [
|
||||||
theme.typography.body2 as CSSObject,
|
theme.typography.body2 as CSSObject,
|
||||||
{
|
{
|
||||||
padding: theme.spacing(2.5),
|
padding: 20,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
userName: {
|
userName: {
|
||||||
@ -45,8 +45,8 @@ const styles = {
|
|||||||
color: "inherit",
|
color: "inherit",
|
||||||
},
|
},
|
||||||
menuItem: (theme) => css`
|
menuItem: (theme) => css`
|
||||||
gap: ${theme.spacing(2.5)};
|
gap: 20px;
|
||||||
padding: ${theme.spacing(1, 2.5)};
|
padding: 8px 20px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: ${theme.palette.action.hover};
|
background-color: ${theme.palette.action.hover};
|
||||||
@ -55,8 +55,8 @@ const styles = {
|
|||||||
`,
|
`,
|
||||||
menuItemIcon: (theme) => ({
|
menuItemIcon: (theme) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
width: theme.spacing(2.5),
|
width: 20,
|
||||||
height: theme.spacing(2.5),
|
height: 20,
|
||||||
}),
|
}),
|
||||||
menuItemText: {
|
menuItemText: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
@ -33,7 +33,7 @@ export const ServiceBannerView: React.FC<ServiceBannerViewProps> = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
css={css`
|
css={css`
|
||||||
padding: ${theme.spacing(1.5)};
|
padding: 12px;
|
||||||
background-color: ${backgroundColor ?? theme.palette.warning.main};
|
background-color: ${backgroundColor ?? theme.palette.warning.main};
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -5,19 +5,19 @@ import { Stack } from "components/Stack/Stack";
|
|||||||
import { colors } from "theme/colors";
|
import { colors } from "theme/colors";
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
badge: (theme) => ({
|
badge: {
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
height: 24,
|
height: 24,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
letterSpacing: "0.085em",
|
letterSpacing: "0.085em",
|
||||||
padding: theme.spacing(0, 1.5),
|
padding: "0 12px",
|
||||||
borderRadius: 9999,
|
borderRadius: 9999,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
width: "fit-content",
|
width: "fit-content",
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
}),
|
},
|
||||||
|
|
||||||
enabledBadge: (theme) => ({
|
enabledBadge: (theme) => ({
|
||||||
border: `1px solid ${theme.palette.success.light}`,
|
border: `1px solid ${theme.palette.success.light}`,
|
||||||
@ -125,9 +125,7 @@ export const AlphaBadge: FC = () => {
|
|||||||
export const Badges: FC<PropsWithChildren> = ({ children }) => {
|
export const Badges: FC<PropsWithChildren> = ({ children }) => {
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
css={(theme) => ({
|
css={{ margin: "0 0 16px" }}
|
||||||
margin: theme.spacing(0, 0, 2),
|
|
||||||
})}
|
|
||||||
direction="row"
|
direction="row"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
spacing={1}
|
spacing={1}
|
||||||
|
@ -35,11 +35,7 @@ export const DeploySettingsLayout: FC = () => {
|
|||||||
return (
|
return (
|
||||||
<RequirePermission isFeatureVisible={permissions.viewDeploymentValues}>
|
<RequirePermission isFeatureVisible={permissions.viewDeploymentValues}>
|
||||||
<Margins>
|
<Margins>
|
||||||
<Stack
|
<Stack css={{ padding: "48px 0" }} direction="row" spacing={6}>
|
||||||
css={(theme) => ({ padding: theme.spacing(6, 0) })}
|
|
||||||
direction="row"
|
|
||||||
spacing={6}
|
|
||||||
>
|
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
<main css={{ maxWidth: 800, width: "100%" }}>
|
<main css={{ maxWidth: 800, width: "100%" }}>
|
||||||
{deploymentConfigQuery.data ? (
|
{deploymentConfigQuery.data ? (
|
||||||
|
@ -27,17 +27,17 @@ export const Fieldset: FC<FieldsetProps> = (props) => {
|
|||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
css={{
|
css={{
|
||||||
borderRadius: theme.spacing(1),
|
borderRadius: 8,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
marginTop: theme.spacing(4),
|
marginTop: 32,
|
||||||
}}
|
}}
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
>
|
>
|
||||||
<header css={{ padding: theme.spacing(3) }}>
|
<header css={{ padding: 24 }}>
|
||||||
<div
|
<div
|
||||||
css={{
|
css={{
|
||||||
fontSize: theme.spacing(2.5),
|
fontSize: 20,
|
||||||
margin: 0,
|
margin: 0,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
}}
|
}}
|
||||||
@ -49,18 +49,13 @@ export const Fieldset: FC<FieldsetProps> = (props) => {
|
|||||||
css={{
|
css={{
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginTop: theme.spacing(1),
|
marginTop: 8,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{subtitle}
|
{subtitle}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div
|
<div css={[theme.typography.body2 as CSSObject, { paddingTop: 16 }]}>
|
||||||
css={[
|
|
||||||
theme.typography.body2 as CSSObject,
|
|
||||||
{ paddingTop: theme.spacing(2) },
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@ -69,7 +64,7 @@ export const Fieldset: FC<FieldsetProps> = (props) => {
|
|||||||
theme.typography.body2 as CSSObject,
|
theme.typography.body2 as CSSObject,
|
||||||
{
|
{
|
||||||
background: theme.palette.background.paperLight,
|
background: theme.palette.background.paperLight,
|
||||||
padding: `${theme.spacing(2)} ${theme.spacing(3)}`,
|
padding: "16px 24px",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
|
@ -14,7 +14,7 @@ export const Header: FC<{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack alignItems="baseline" direction="row" justifyContent="space-between">
|
<Stack alignItems="baseline" direction="row" justifyContent="space-between">
|
||||||
<div css={{ maxWidth: 420, marginBottom: theme.spacing(3) }}>
|
<div css={{ maxWidth: 420, marginBottom: 24 }}>
|
||||||
<h1
|
<h1
|
||||||
css={[
|
css={[
|
||||||
{
|
{
|
||||||
@ -24,8 +24,8 @@ export const Header: FC<{
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
lineHeight: "initial",
|
lineHeight: "initial",
|
||||||
margin: 0,
|
margin: 0,
|
||||||
marginBottom: theme.spacing(0.5),
|
marginBottom: 4,
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
},
|
},
|
||||||
secondary && {
|
secondary && {
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
|
@ -30,7 +30,7 @@ export const OptionDescription: FC<PropsWithChildren> = (props) => {
|
|||||||
display: "block",
|
display: "block",
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginTop: theme.spacing(0.5),
|
marginTop: 4,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
@ -53,18 +53,10 @@ export const OptionValue: FC<OptionValueProps> = (props) => {
|
|||||||
user-select: all;
|
user-select: all;
|
||||||
|
|
||||||
& ul {
|
& ul {
|
||||||
padding: ${theme.spacing(2)};
|
padding: 16px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const listStyles = css`
|
|
||||||
margin: 0,
|
|
||||||
padding: 0,
|
|
||||||
display: "flex",
|
|
||||||
flex-direction: "column",
|
|
||||||
gap: theme.spacing(0.5),
|
|
||||||
`;
|
|
||||||
|
|
||||||
if (typeof value === "boolean") {
|
if (typeof value === "boolean") {
|
||||||
return value ? <EnabledBadge /> : <DisabledBadge />;
|
return value ? <EnabledBadge /> : <DisabledBadge />;
|
||||||
}
|
}
|
||||||
@ -83,7 +75,7 @@ export const OptionValue: FC<OptionValueProps> = (props) => {
|
|||||||
|
|
||||||
if (typeof value === "object" && !Array.isArray(value)) {
|
if (typeof value === "object" && !Array.isArray(value)) {
|
||||||
return (
|
return (
|
||||||
<ul css={listStyles && { listStyle: "none" }}>
|
<ul css={{ listStyle: "none" }}>
|
||||||
{Object.entries(value)
|
{Object.entries(value)
|
||||||
.sort((a, b) => a[0].localeCompare(b[0]))
|
.sort((a, b) => a[0].localeCompare(b[0]))
|
||||||
.map(([option, isEnabled]) => (
|
.map(([option, isEnabled]) => (
|
||||||
@ -109,7 +101,7 @@ export const OptionValue: FC<OptionValueProps> = (props) => {
|
|||||||
width: 16,
|
width: 16,
|
||||||
height: 16,
|
height: 16,
|
||||||
color: (theme) => theme.palette.success.light,
|
color: (theme) => theme.palette.success.light,
|
||||||
margin: (theme) => theme.spacing(0, 1),
|
margin: "0 8px",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -123,7 +115,7 @@ export const OptionValue: FC<OptionValueProps> = (props) => {
|
|||||||
|
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
return (
|
return (
|
||||||
<ul css={listStyles && { listStylePosition: "inside" }}>
|
<ul css={{ listStylePosition: "inside" }}>
|
||||||
{value.map((item) => (
|
{value.map((item) => (
|
||||||
<li key={item} css={optionStyles}>
|
<li key={item} css={optionStyles}>
|
||||||
{item}
|
{item}
|
||||||
@ -162,7 +154,7 @@ export const OptionConfig = (props: OptionConfigProps) => {
|
|||||||
display: "inline-flex",
|
display: "inline-flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
borderRadius: 0.25,
|
borderRadius: 0.25,
|
||||||
padding: (theme) => theme.spacing(0, 1),
|
padding: "0 8px",
|
||||||
border: `1px solid ${borderColor}`,
|
border: `1px solid ${borderColor}`,
|
||||||
...sx,
|
...sx,
|
||||||
}}
|
}}
|
||||||
@ -183,12 +175,12 @@ export const OptionConfigFlag = (props: OptionConfigFlagProps) => {
|
|||||||
sx={{
|
sx={{
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
margin: (theme) => theme.spacing(0, 0.75, 0, -0.5),
|
margin: "0 6px 0 -4px",
|
||||||
display: "block",
|
display: "block",
|
||||||
backgroundColor: (theme) =>
|
backgroundColor: (theme) =>
|
||||||
source ? "rgba(0, 0, 0, 0.7)" : theme.palette.divider,
|
source ? "rgba(0, 0, 0, 0.7)" : theme.palette.divider,
|
||||||
lineHeight: 1,
|
lineHeight: 1,
|
||||||
padding: (theme) => theme.spacing(0.25, 0.5),
|
padding: "2px 4px",
|
||||||
borderRadius: 0.25,
|
borderRadius: 0.25,
|
||||||
...sx,
|
...sx,
|
||||||
}}
|
}}
|
||||||
|
@ -28,15 +28,15 @@ const OptionsTable: FC<{
|
|||||||
return (
|
return (
|
||||||
<TableContainer>
|
<TableContainer>
|
||||||
<Table
|
<Table
|
||||||
css={(theme) => css`
|
css={css`
|
||||||
& td {
|
& td {
|
||||||
padding-top: ${theme.spacing(3)};
|
padding-top: 24px;
|
||||||
padding-bottom: ${theme.spacing(3)};
|
padding-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
& td:last-child,
|
& td:last-child,
|
||||||
& th:last-child {
|
& th:last-child {
|
||||||
padding-left: ${theme.spacing(4)};
|
padding-left: 32px;
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
|
@ -32,8 +32,8 @@ const SidebarNavItem: FC<
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
background-color: ${theme.palette.secondary.dark};
|
background-color: ${theme.palette.secondary.dark};
|
||||||
border-top-left-radius: ${theme.shape.borderRadius};
|
border-top-left-radius: 8px;
|
||||||
border-bottom-left-radius: ${theme.shape.borderRadius};
|
border-bottom-left-radius: 8px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -47,8 +47,8 @@ const SidebarNavItem: FC<
|
|||||||
display: block;
|
display: block;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: ${theme.spacing(1.5, 1.5, 1.5, 2)};
|
padding: 12px 12px 12px 16px;
|
||||||
border-radius: ${theme.shape.borderRadius / 2}px;
|
border-radius: 4px;
|
||||||
transition: background-color 0.15s ease-in-out;
|
transition: background-color 0.15s ease-in-out;
|
||||||
margin-bottom: 1;
|
margin-bottom: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -67,15 +67,7 @@ const SidebarNavItem: FC<
|
|||||||
};
|
};
|
||||||
|
|
||||||
const SidebarNavItemIcon: FC<{ icon: ElementType }> = ({ icon: Icon }) => {
|
const SidebarNavItemIcon: FC<{ icon: ElementType }> = ({ icon: Icon }) => {
|
||||||
const theme = useTheme();
|
return <Icon css={{ width: 16, height: 16 }} />;
|
||||||
return (
|
|
||||||
<Icon
|
|
||||||
css={{
|
|
||||||
width: theme.spacing(2),
|
|
||||||
height: theme.spacing(2),
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Sidebar: React.FC = () => {
|
export const Sidebar: React.FC = () => {
|
||||||
|
@ -58,22 +58,22 @@ const styles = {
|
|||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
width: "100%",
|
width: "100%",
|
||||||
maxWidth: theme.spacing(55),
|
maxWidth: 440,
|
||||||
},
|
},
|
||||||
"& .MuiDialogActions-spacing": {
|
"& .MuiDialogActions-spacing": {
|
||||||
padding: `0 ${theme.spacing(5)} ${theme.spacing(5)}`,
|
padding: "0 40px 40px",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
dialogContent: (theme) => ({
|
dialogContent: (theme) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
padding: theme.spacing(5),
|
padding: 40,
|
||||||
}),
|
}),
|
||||||
dialogTitle: (theme) => ({
|
dialogTitle: (theme) => ({
|
||||||
margin: 0,
|
margin: 0,
|
||||||
marginBottom: theme.spacing(2),
|
marginBottom: 16,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
fontSize: theme.spacing(2.5),
|
fontSize: 20,
|
||||||
}),
|
}),
|
||||||
dialogDescription: (theme) => ({
|
dialogDescription: (theme) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
@ -89,7 +89,7 @@ const styles = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"& > p": {
|
"& > p": {
|
||||||
margin: theme.spacing(1, 0),
|
margin: "8px 0",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -75,7 +75,7 @@ export const DeleteDialog: FC<PropsWithChildren<DeleteDialogProps>> = ({
|
|||||||
<TextField
|
<TextField
|
||||||
fullWidth
|
fullWidth
|
||||||
autoFocus
|
autoFocus
|
||||||
sx={{ marginTop: theme.spacing(3) }}
|
css={{ marginTop: 24 }}
|
||||||
name="confirmation"
|
name="confirmation"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
id={`${hookId}-confirm`}
|
id={`${hookId}-confirm`}
|
||||||
|
@ -19,7 +19,7 @@ export const DropdownArrow: FC<ArrowProps> = (props) => {
|
|||||||
aria-label={close ? "close-dropdown" : "open-dropdown"}
|
aria-label={close ? "close-dropdown" : "open-dropdown"}
|
||||||
css={(theme: Theme) => ({
|
css={(theme: Theme) => ({
|
||||||
color: color ?? theme.palette.primary.contrastText,
|
color: color ?? theme.palette.primary.contrastText,
|
||||||
marginLeft: margin ? theme.spacing(1) : 0,
|
marginLeft: margin ? 8 : 0,
|
||||||
width: 16,
|
width: 16,
|
||||||
height: 16,
|
height: 16,
|
||||||
})}
|
})}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import type { FC, ReactNode } from "react";
|
import type { FC, ReactNode } from "react";
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
|
|
||||||
export interface EmptyStateProps {
|
export interface EmptyStateProps {
|
||||||
/** Text Message to display, placed inside Typography component */
|
/** Text Message to display, placed inside Typography component */
|
||||||
@ -25,7 +24,6 @@ export const EmptyState: FC<React.PropsWithChildren<EmptyStateProps>> = (
|
|||||||
props,
|
props,
|
||||||
) => {
|
) => {
|
||||||
const { message, description, cta, image, ...boxProps } = props;
|
const { message, description, cta, image, ...boxProps } = props;
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
@ -37,17 +35,12 @@ export const EmptyState: FC<React.PropsWithChildren<EmptyStateProps>> = (
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
minHeight: 360,
|
minHeight: 360,
|
||||||
padding: theme.spacing(10, 5),
|
padding: "80px 40px",
|
||||||
position: "relative",
|
position: "relative",
|
||||||
}}
|
}}
|
||||||
{...boxProps}
|
{...boxProps}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography variant="h5" css={{ fontSize: 24 }}>
|
||||||
variant="h5"
|
|
||||||
css={{
|
|
||||||
fontSize: theme.spacing(3),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{message}
|
{message}
|
||||||
</Typography>
|
</Typography>
|
||||||
{description && (
|
{description && (
|
||||||
@ -55,24 +48,16 @@ export const EmptyState: FC<React.PropsWithChildren<EmptyStateProps>> = (
|
|||||||
variant="body2"
|
variant="body2"
|
||||||
color="textSecondary"
|
color="textSecondary"
|
||||||
css={{
|
css={{
|
||||||
marginTop: theme.spacing(1.5),
|
marginTop: 12,
|
||||||
fontSize: theme.spacing(2),
|
fontSize: 16,
|
||||||
lineHeight: "140%",
|
lineHeight: "140%",
|
||||||
maxWidth: theme.spacing(60),
|
maxWidth: 480,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{description}
|
{description}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{cta && (
|
{cta && <div css={{ marginTop: 32 }}>{cta}</div>}
|
||||||
<div
|
|
||||||
css={{
|
|
||||||
marginTop: theme.spacing(4),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{cta}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{image}
|
{image}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@ -4,7 +4,7 @@ import RefreshOutlined from "@mui/icons-material/RefreshOutlined";
|
|||||||
import { type FC, useEffect, useState } from "react";
|
import { type FC, useEffect, useState } from "react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
import { css } from "@emotion/css";
|
import { css } from "@emotion/css";
|
||||||
import { useTheme, type Interpolation, type Theme } from "@emotion/react";
|
import { type Interpolation, type Theme } from "@emotion/react";
|
||||||
import type { BuildInfoResponse } from "api/typesGenerated";
|
import type { BuildInfoResponse } from "api/typesGenerated";
|
||||||
import { CopyButton } from "components/CopyButton/CopyButton";
|
import { CopyButton } from "components/CopyButton/CopyButton";
|
||||||
import { CoderIcon } from "components/Icons/CoderIcon";
|
import { CoderIcon } from "components/Icons/CoderIcon";
|
||||||
@ -18,7 +18,6 @@ const fetchDynamicallyImportedModuleError =
|
|||||||
export type RuntimeErrorStateProps = { error: Error };
|
export type RuntimeErrorStateProps = { error: Error };
|
||||||
|
|
||||||
export const RuntimeErrorState: FC<RuntimeErrorStateProps> = ({ error }) => {
|
export const RuntimeErrorState: FC<RuntimeErrorStateProps> = ({ error }) => {
|
||||||
const theme = useTheme();
|
|
||||||
const [checkingError, setCheckingError] = useState(true);
|
const [checkingError, setCheckingError] = useState(true);
|
||||||
const [staticBuildInfo, setStaticBuildInfo] = useState<BuildInfoResponse>();
|
const [staticBuildInfo, setStaticBuildInfo] = useState<BuildInfoResponse>();
|
||||||
const coderVersion = staticBuildInfo?.version;
|
const coderVersion = staticBuildInfo?.version;
|
||||||
@ -102,10 +101,10 @@ export const RuntimeErrorState: FC<RuntimeErrorStateProps> = ({ error }) => {
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
min-height: ${theme.spacing(4)};
|
min-height: 32px;
|
||||||
min-width: ${theme.spacing(4)};
|
min-width: 32px;
|
||||||
height: ${theme.spacing(4)};
|
height: 32px;
|
||||||
width: ${theme.spacing(4)};
|
width: 32px;
|
||||||
|
|
||||||
& svg {
|
& svg {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@ -147,38 +146,38 @@ const getStaticBuildInfo = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
root: (theme) => ({
|
root: {
|
||||||
paddingTop: theme.spacing(4),
|
paddingTop: 32,
|
||||||
paddingBottom: theme.spacing(4),
|
paddingBottom: 32,
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
minHeight: "100%",
|
minHeight: "100%",
|
||||||
maxWidth: theme.spacing(75),
|
maxWidth: 600,
|
||||||
}),
|
},
|
||||||
|
|
||||||
logo: (theme) => ({
|
logo: {
|
||||||
fontSize: theme.spacing(8),
|
fontSize: 64,
|
||||||
}),
|
},
|
||||||
|
|
||||||
title: (theme) => ({
|
title: {
|
||||||
fontSize: theme.spacing(4),
|
fontSize: 32,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
}),
|
},
|
||||||
|
|
||||||
text: (theme) => ({
|
text: (theme) => ({
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
lineHeight: "160%",
|
lineHeight: "160%",
|
||||||
marginBottom: theme.spacing(4),
|
marginBottom: 32,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
stack: (theme) => ({
|
stack: (theme) => ({
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
marginTop: theme.spacing(8),
|
marginTop: 64,
|
||||||
display: "block",
|
display: "block",
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
}),
|
}),
|
||||||
@ -188,7 +187,7 @@ const styles = {
|
|||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
letterSpacing: 1,
|
letterSpacing: 1,
|
||||||
padding: theme.spacing(1, 1, 1, 2),
|
padding: "8px 8px 8px 16px",
|
||||||
backgroundColor: theme.palette.background.paperLight,
|
backgroundColor: theme.palette.background.paperLight,
|
||||||
borderBottom: `1px solid ${theme.palette.divider}`,
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
@ -198,15 +197,15 @@ const styles = {
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}),
|
}),
|
||||||
|
|
||||||
stackCode: (theme) => ({
|
stackCode: {
|
||||||
padding: theme.spacing(2),
|
padding: 16,
|
||||||
margin: 0,
|
margin: 0,
|
||||||
wordWrap: "break-word",
|
wordWrap: "break-word",
|
||||||
whiteSpace: "break-spaces",
|
whiteSpace: "break-spaces",
|
||||||
}),
|
},
|
||||||
|
|
||||||
version: (theme) => ({
|
version: (theme) => ({
|
||||||
marginTop: theme.spacing(4),
|
marginTop: 32,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
}),
|
}),
|
||||||
|
@ -49,9 +49,9 @@ const styles = {
|
|||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
}),
|
}),
|
||||||
collapseLink: (theme) => ({
|
collapseLink: {
|
||||||
marginTop: theme.spacing(2),
|
marginTop: 16,
|
||||||
}),
|
},
|
||||||
text: (theme) => ({
|
text: (theme) => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
|
@ -133,9 +133,9 @@ const styles = {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: ${theme.shape.borderRadius}px;
|
border-radius: 8px;
|
||||||
border: 2px dashed ${theme.palette.divider};
|
border: 2px dashed ${theme.palette.divider};
|
||||||
padding: ${theme.spacing(6)};
|
padding: 48px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@ -148,18 +148,18 @@ const styles = {
|
|||||||
opacity: 0.75,
|
opacity: 0.75,
|
||||||
},
|
},
|
||||||
|
|
||||||
icon: (theme) => ({
|
icon: {
|
||||||
fontSize: theme.spacing(8),
|
fontSize: 64,
|
||||||
}),
|
},
|
||||||
|
|
||||||
title: (theme) => ({
|
title: {
|
||||||
fontSize: theme.spacing(2),
|
fontSize: 16,
|
||||||
}),
|
},
|
||||||
|
|
||||||
description: (theme) => ({
|
description: (theme) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
maxWidth: theme.spacing(50),
|
maxWidth: 400,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
input: {
|
input: {
|
||||||
@ -167,9 +167,9 @@ const styles = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
file: (theme) => ({
|
file: (theme) => ({
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
padding: theme.spacing(2),
|
padding: 16,
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
}),
|
}),
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -34,10 +34,10 @@ export const Form: FC<FormProps> = ({ direction, ...formProps }) => {
|
|||||||
css={{
|
css={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: theme.spacing(direction === "horizontal" ? 10 : 5),
|
gap: direction === "horizontal" ? 80 : 40,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
gap: theme.spacing(8),
|
gap: 64,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -88,11 +88,11 @@ export const FormSection: FC<
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "flex-start",
|
alignItems: "flex-start",
|
||||||
flexDirection: direction === "horizontal" ? "row" : "column",
|
flexDirection: direction === "horizontal" ? "row" : "column",
|
||||||
gap: theme.spacing(direction === "horizontal" ? 15 : 3),
|
gap: direction === "horizontal" ? 120 : 24,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: theme.spacing(2),
|
gap: 16,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
className={classes.root}
|
className={classes.root}
|
||||||
@ -103,7 +103,7 @@ export const FormSection: FC<
|
|||||||
maxWidth: direction === "horizontal" ? 312 : undefined,
|
maxWidth: direction === "horizontal" ? 312 : undefined,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
position: direction === "horizontal" ? "sticky" : undefined,
|
position: direction === "horizontal" ? "sticky" : undefined,
|
||||||
top: theme.spacing(3),
|
top: 24,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
@ -144,15 +144,15 @@ const styles = {
|
|||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
margin: 0,
|
margin: 0,
|
||||||
marginBottom: theme.spacing(1),
|
marginBottom: 8,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
formSectionInfoTitleAlpha: (theme) => ({
|
formSectionInfoTitleAlpha: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(1.5),
|
gap: 12,
|
||||||
}),
|
},
|
||||||
|
|
||||||
formSectionInfoDescription: (theme) => ({
|
formSectionInfoDescription: (theme) => ({
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
@ -172,7 +172,7 @@ export const FormFooter = (props: Exclude<FormFooterProps, "styles">) => (
|
|||||||
|
|
||||||
const footerStyles = {
|
const footerStyles = {
|
||||||
button: (theme) => ({
|
button: (theme) => ({
|
||||||
minWidth: theme.spacing(23),
|
minWidth: 184,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
@ -184,11 +184,11 @@ const footerStyles = {
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "flex-start",
|
justifyContent: "flex-start",
|
||||||
flexDirection: "row-reverse",
|
flexDirection: "row-reverse",
|
||||||
gap: theme.spacing(2),
|
gap: 16,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
} satisfies FormFooterStyles;
|
} satisfies FormFooterStyles;
|
||||||
|
@ -57,16 +57,16 @@ export const FormFooter: FC<FormFooterProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const defaultStyles = {
|
const defaultStyles = {
|
||||||
footer: (theme) => ({
|
footer: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flex: "0",
|
flex: "0",
|
||||||
// The first button is the submit so it is the first element to be focused
|
// The first button is the submit so it is the first element to be focused
|
||||||
// on tab so we use row-reverse to display it on the right
|
// on tab so we use row-reverse to display it on the right
|
||||||
flexDirection: "row-reverse",
|
flexDirection: "row-reverse",
|
||||||
gap: theme.spacing(1.5),
|
gap: 12,
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
marginTop: theme.spacing(3),
|
marginTop: 24,
|
||||||
}),
|
},
|
||||||
button: {
|
button: {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,6 @@ import {
|
|||||||
PageHeaderTitle,
|
PageHeaderTitle,
|
||||||
PageHeaderSubtitle,
|
PageHeaderSubtitle,
|
||||||
} from "components/PageHeader/PageHeader";
|
} from "components/PageHeader/PageHeader";
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
|
|
||||||
export interface FullPageFormProps {
|
export interface FullPageFormProps {
|
||||||
title: string;
|
title: string;
|
||||||
@ -17,11 +16,9 @@ export const FullPageForm: FC<React.PropsWithChildren<FullPageFormProps>> = ({
|
|||||||
detail,
|
detail,
|
||||||
children,
|
children,
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Margins size="small">
|
<Margins size="small">
|
||||||
<PageHeader css={{ paddingBottom: theme.spacing(3) }}>
|
<PageHeader css={{ paddingBottom: 24 }}>
|
||||||
<PageHeaderTitle>{title}</PageHeaderTitle>
|
<PageHeaderTitle>{title}</PageHeaderTitle>
|
||||||
{detail && <PageHeaderSubtitle>{detail}</PageHeaderSubtitle>}
|
{detail && <PageHeaderSubtitle>{detail}</PageHeaderSubtitle>}
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
@ -35,8 +35,8 @@ export const EnterpriseSnackbar: FC<
|
|||||||
const snackbarContentStyles = css`
|
const snackbarContentStyles = css`
|
||||||
border: 1px solid ${theme.palette.divider};
|
border: 1px solid ${theme.palette.divider};
|
||||||
border-left: 4px solid ${variantColor(variant, theme)};
|
border-left: 4px solid ${variantColor(variant, theme)};
|
||||||
border-radius: ${theme.shape.borderRadius}px;
|
border-radius: 8px;
|
||||||
padding: ${theme.spacing(1, 3, 1, 2)};
|
padding: 8px 24px 8px 16px;
|
||||||
box-shadow: ${theme.shadows[6]};
|
box-shadow: ${theme.shadows[6]};
|
||||||
align-items: inherit;
|
align-items: inherit;
|
||||||
background-color: ${theme.palette.background.paper};
|
background-color: ${theme.palette.background.paper};
|
||||||
|
@ -125,11 +125,11 @@ const styles = {
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
},
|
},
|
||||||
messageSubtitle: (theme) => ({
|
messageSubtitle: {
|
||||||
marginTop: theme.spacing(1.5),
|
marginTop: 12,
|
||||||
}),
|
},
|
||||||
errorIcon: (theme) => ({
|
errorIcon: (theme) => ({
|
||||||
color: theme.palette.error.contrastText,
|
color: theme.palette.error.contrastText,
|
||||||
marginRight: theme.spacing(2),
|
marginRight: 16,
|
||||||
}),
|
}),
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -59,9 +59,9 @@ export const HelpPopover: FC<
|
|||||||
paper: className`
|
paper: className`
|
||||||
${theme.typography.body2 as CSSObject}
|
${theme.typography.body2 as CSSObject}
|
||||||
|
|
||||||
margin-top: ${theme.spacing(0.5)};
|
margin-top: 4px;
|
||||||
width: ${theme.spacing(38)};
|
width: 304px;
|
||||||
padding: ${theme.spacing(2.5)};
|
padding: 20px;
|
||||||
color: ${theme.palette.text.secondary};
|
color: ${theme.palette.text.secondary};
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
`,
|
`,
|
||||||
@ -239,7 +239,7 @@ const getIconSpacingFromSize = (size?: Size): number => {
|
|||||||
const styles = {
|
const styles = {
|
||||||
title: (theme) => ({
|
title: (theme) => ({
|
||||||
marginTop: 0,
|
marginTop: 0,
|
||||||
marginBottom: theme.spacing(1),
|
marginBottom: 8,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
lineHeight: "150%",
|
lineHeight: "150%",
|
||||||
@ -247,8 +247,8 @@ const styles = {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
text: (theme) => ({
|
text: (theme) => ({
|
||||||
marginTop: theme.spacing(0.5),
|
marginTop: 4,
|
||||||
marginBottom: theme.spacing(0.5),
|
marginBottom: 4,
|
||||||
...(theme.typography.body2 as CSSObject),
|
...(theme.typography.body2 as CSSObject),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@ -258,16 +258,16 @@ const styles = {
|
|||||||
...(theme.typography.body2 as CSSObject),
|
...(theme.typography.body2 as CSSObject),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
linkIcon: (theme) => ({
|
linkIcon: {
|
||||||
color: "inherit",
|
color: "inherit",
|
||||||
width: 14,
|
width: 14,
|
||||||
height: 14,
|
height: 14,
|
||||||
marginRight: theme.spacing(1),
|
marginRight: 8,
|
||||||
}),
|
},
|
||||||
|
|
||||||
linksGroup: (theme) => ({
|
linksGroup: {
|
||||||
marginTop: theme.spacing(2),
|
marginTop: 16,
|
||||||
}),
|
},
|
||||||
|
|
||||||
action: (theme) => ({
|
action: (theme) => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@ -280,10 +280,10 @@ const styles = {
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
actionIcon: (theme) => ({
|
actionIcon: {
|
||||||
color: "inherit",
|
color: "inherit",
|
||||||
width: 14,
|
width: 14,
|
||||||
height: 14,
|
height: 14,
|
||||||
marginRight: theme.spacing(1),
|
marginRight: 8,
|
||||||
}),
|
},
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -62,8 +62,8 @@ const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
|
|||||||
<InputAdornment
|
<InputAdornment
|
||||||
position="end"
|
position="end"
|
||||||
css={{
|
css={{
|
||||||
width: theme.spacing(3),
|
width: 24,
|
||||||
height: theme.spacing(3),
|
height: 24,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
|
@ -66,7 +66,7 @@ export const Markdown: FC<MarkdownProps> = (props) => {
|
|||||||
) : (
|
) : (
|
||||||
<code
|
<code
|
||||||
css={(theme) => ({
|
css={(theme) => ({
|
||||||
padding: theme.spacing(0.125, 0.5),
|
padding: "1px 4px",
|
||||||
background: theme.palette.divider,
|
background: theme.palette.divider,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
@ -120,14 +120,14 @@ const markdownStyles: Interpolation<Theme> = (theme: Theme) => ({
|
|||||||
lineHeight: "24px",
|
lineHeight: "24px",
|
||||||
|
|
||||||
"& h1, & h2, & h3, & h4, & h5, & h6": {
|
"& h1, & h2, & h3, & h4, & h5, & h6": {
|
||||||
marginTop: theme.spacing(4),
|
marginTop: 32,
|
||||||
marginBottom: theme.spacing(2),
|
marginBottom: 16,
|
||||||
lineHeight: "1.25",
|
lineHeight: "1.25",
|
||||||
},
|
},
|
||||||
|
|
||||||
"& p": {
|
"& p": {
|
||||||
marginTop: 0,
|
marginTop: 0,
|
||||||
marginBottom: theme.spacing(2),
|
marginBottom: 16,
|
||||||
},
|
},
|
||||||
|
|
||||||
"& p:only-child": {
|
"& p:only-child": {
|
||||||
@ -138,12 +138,12 @@ const markdownStyles: Interpolation<Theme> = (theme: Theme) => ({
|
|||||||
"& ul, & ol": {
|
"& ul, & ol": {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
marginBottom: theme.spacing(2),
|
marginBottom: 16,
|
||||||
},
|
},
|
||||||
|
|
||||||
"& li > ul, & li > ol": {
|
"& li > ul, & li > ol": {
|
||||||
marginTop: theme.spacing(2),
|
marginTop: 16,
|
||||||
},
|
},
|
||||||
|
|
||||||
"& li > p": {
|
"& li > p": {
|
||||||
@ -152,8 +152,8 @@ const markdownStyles: Interpolation<Theme> = (theme: Theme) => ({
|
|||||||
|
|
||||||
"& .prismjs": {
|
"& .prismjs": {
|
||||||
background: theme.palette.background.paperLight,
|
background: theme.palette.background.paperLight,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
padding: theme.spacing(2, 3),
|
padding: "16px 24px",
|
||||||
overflowX: "auto",
|
overflowX: "auto",
|
||||||
|
|
||||||
"& code": {
|
"& code": {
|
||||||
|
@ -93,8 +93,8 @@ export const MoreMenuItem = (
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: danger ? theme.palette.error.light : undefined,
|
color: danger ? theme.palette.error.light : undefined,
|
||||||
"& .MuiSvgIcon-root": {
|
"& .MuiSvgIcon-root": {
|
||||||
width: theme.spacing(2),
|
width: 16,
|
||||||
height: theme.spacing(2),
|
height: 16,
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
@ -11,12 +11,12 @@ export const FullWidthPageHeader: FC<
|
|||||||
css={[
|
css={[
|
||||||
{
|
{
|
||||||
...(theme.typography.body2 as CSSObject),
|
...(theme.typography.body2 as CSSObject),
|
||||||
padding: theme.spacing(3),
|
padding: 24,
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
borderBottom: `1px solid ${theme.palette.divider}`,
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(6),
|
gap: 48,
|
||||||
|
|
||||||
zIndex: 10,
|
zIndex: 10,
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
|
@ -17,9 +17,9 @@ export const PageHeader: FC<PropsWithChildren<PageHeaderProps>> = ({
|
|||||||
css={(theme) => ({
|
css={(theme) => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
paddingTop: theme.spacing(6),
|
paddingTop: 48,
|
||||||
paddingBottom: theme.spacing(6),
|
paddingBottom: 48,
|
||||||
gap: theme.spacing(4),
|
gap: 32,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
@ -53,14 +53,14 @@ export const PageHeaderTitle: FC<PropsWithChildren<unknown>> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<h1
|
<h1
|
||||||
css={(theme) => ({
|
css={{
|
||||||
fontSize: theme.spacing(3),
|
fontSize: 24,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
margin: 0,
|
margin: 0,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
lineHeight: "140%",
|
lineHeight: "140%",
|
||||||
})}
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</h1>
|
</h1>
|
||||||
@ -73,12 +73,12 @@ export const PageHeaderSubtitle: FC<
|
|||||||
return (
|
return (
|
||||||
<h2
|
<h2
|
||||||
css={(theme) => ({
|
css={(theme) => ({
|
||||||
fontSize: theme.spacing(2),
|
fontSize: 16,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
display: "block",
|
display: "block",
|
||||||
margin: 0,
|
margin: 0,
|
||||||
marginTop: condensed ? theme.spacing(0.5) : theme.spacing(1),
|
marginTop: condensed ? 4 : 8,
|
||||||
lineHeight: "140%",
|
lineHeight: "140%",
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
@ -24,7 +24,7 @@ export const PageButton = ({
|
|||||||
css={[
|
css={[
|
||||||
css`
|
css`
|
||||||
&:not(:last-of-type) {
|
&:not(:last-of-type) {
|
||||||
margin-right: ${theme.spacing(0.5)};
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
activePage === page && {
|
activePage === page && {
|
||||||
|
@ -41,7 +41,7 @@ export const PaginationWidgetBase = ({
|
|||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
css={{
|
css={{
|
||||||
marginRight: theme.spacing(0.5),
|
marginRight: 4,
|
||||||
}}
|
}}
|
||||||
aria-label="Previous page"
|
aria-label="Previous page"
|
||||||
disabled={isFirstPage}
|
disabled={isFirstPage}
|
||||||
|
@ -52,24 +52,24 @@ const styles = {
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
minHeight: 300,
|
minHeight: 300,
|
||||||
padding: theme.spacing(3),
|
padding: 24,
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
}),
|
|
||||||
header: (theme) => ({
|
|
||||||
marginBottom: theme.spacing(3),
|
|
||||||
}),
|
}),
|
||||||
|
header: {
|
||||||
|
marginBottom: 24,
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
fontFamily: "inherit",
|
fontFamily: "inherit",
|
||||||
},
|
},
|
||||||
description: (theme) => ({
|
description: {
|
||||||
marginTop: theme.spacing(1),
|
marginTop: 8,
|
||||||
fontFamily: "inherit",
|
fontFamily: "inherit",
|
||||||
maxWidth: 420,
|
maxWidth: 420,
|
||||||
lineHeight: "160%",
|
lineHeight: "160%",
|
||||||
}),
|
},
|
||||||
enterpriseChip: (theme) => ({
|
enterpriseChip: (theme) => ({
|
||||||
background: theme.palette.success.dark,
|
background: theme.palette.success.dark,
|
||||||
color: theme.palette.success.contrastText,
|
color: theme.palette.success.contrastText,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { type FC, type ReactNode, useMemo, forwardRef } from "react";
|
import { type FC, type ReactNode, useMemo, forwardRef } from "react";
|
||||||
import { css, type Interpolation, type Theme, useTheme } from "@emotion/react";
|
import { css, type Interpolation, type Theme } from "@emotion/react";
|
||||||
import { colors } from "theme/colors";
|
import { colors } from "theme/colors";
|
||||||
|
|
||||||
export type PillType =
|
export type PillType =
|
||||||
@ -53,7 +53,6 @@ export const Pill: FC<PillProps> = forwardRef<HTMLDivElement, PillProps>(
|
|||||||
type = "neutral",
|
type = "neutral",
|
||||||
...attrs
|
...attrs
|
||||||
} = props;
|
} = props;
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
const typeStyles = useMemo(() => {
|
const typeStyles = useMemo(() => {
|
||||||
if (type in themeOverrides) {
|
if (type in themeOverrides) {
|
||||||
@ -75,9 +74,9 @@ export const Pill: FC<PillProps> = forwardRef<HTMLDivElement, PillProps>(
|
|||||||
borderRadius: 99999,
|
borderRadius: 99999,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: "#FFF",
|
color: "#FFF",
|
||||||
height: theme.spacing(3),
|
height: 24,
|
||||||
paddingLeft: icon ? theme.spacing(0.75) : theme.spacing(1.5),
|
paddingLeft: icon ? 6 : 12,
|
||||||
paddingRight: theme.spacing(1.5),
|
paddingRight: 12,
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
},
|
},
|
||||||
@ -89,9 +88,9 @@ export const Pill: FC<PillProps> = forwardRef<HTMLDivElement, PillProps>(
|
|||||||
{icon && (
|
{icon && (
|
||||||
<div
|
<div
|
||||||
css={css`
|
css={css`
|
||||||
margin-right: ${theme.spacing(0.5)};
|
margin-right: 4px;
|
||||||
width: ${theme.spacing(1.75)};
|
width: 14px;
|
||||||
height: ${theme.spacing(1.75)};
|
height: 14px;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -99,8 +98,8 @@ export const Pill: FC<PillProps> = forwardRef<HTMLDivElement, PillProps>(
|
|||||||
|
|
||||||
& > img,
|
& > img,
|
||||||
& > svg {
|
& > svg {
|
||||||
width: ${theme.spacing(1.75)};
|
width: 14px;
|
||||||
height: ${theme.spacing(1.75)};
|
height: 14px;
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
|
@ -128,19 +128,19 @@ export const PopoverContent = (
|
|||||||
return (
|
return (
|
||||||
<MuiPopover
|
<MuiPopover
|
||||||
disablePortal
|
disablePortal
|
||||||
css={(theme) => ({
|
css={{
|
||||||
// When it is on hover mode, and the mode is moving from the trigger to
|
// When it is on hover mode, and the mode is moving from the trigger to
|
||||||
// the popover, if there is any space, the popover will be closed. I
|
// the popover, if there is any space, the popover will be closed. I
|
||||||
// found this is a limitation on how MUI structured the component. It is
|
// found this is a limitation on how MUI structured the component. It is
|
||||||
// not a big issue for now but we can re-evaluate it in the future.
|
// not a big issue for now but we can re-evaluate it in the future.
|
||||||
marginTop: hoverMode ? undefined : theme.spacing(1),
|
marginTop: hoverMode ? undefined : 8,
|
||||||
pointerEvents: hoverMode ? "none" : undefined,
|
pointerEvents: hoverMode ? "none" : undefined,
|
||||||
"& .MuiPaper-root": {
|
"& .MuiPaper-root": {
|
||||||
minWidth: theme.spacing(40),
|
minWidth: 320,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
pointerEvents: hoverMode ? "auto" : undefined,
|
pointerEvents: hoverMode ? "auto" : undefined,
|
||||||
},
|
},
|
||||||
})}
|
}}
|
||||||
{...horizontalProps(horizontal)}
|
{...horizontalProps(horizontal)}
|
||||||
{...modeProps(popover)}
|
{...modeProps(popover)}
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -65,11 +65,7 @@ export const AgentLatency: FC<{ agent: WorkspaceAgent }> = ({ agent }) => {
|
|||||||
first row is the preferred relay.
|
first row is the preferred relay.
|
||||||
</HelpTooltipText>
|
</HelpTooltipText>
|
||||||
<HelpTooltipText>
|
<HelpTooltipText>
|
||||||
<Stack
|
<Stack direction="column" spacing={1} css={{ marginTop: 16 }}>
|
||||||
direction="column"
|
|
||||||
spacing={1}
|
|
||||||
css={{ marginTop: theme.spacing(2) }}
|
|
||||||
>
|
|
||||||
{Object.entries(agent.latency)
|
{Object.entries(agent.latency)
|
||||||
.sort(([, a], [, b]) => a.latency_ms - b.latency_ms)
|
.sort(([, a], [, b]) => a.latency_ms - b.latency_ms)
|
||||||
.map(([regionName, region]) => (
|
.map(([regionName, region]) => (
|
||||||
|
@ -205,26 +205,26 @@ const StaticWidth = (props: BoxProps) => {
|
|||||||
// site/src/components/Resources/ResourceCard.tsx
|
// site/src/components/Resources/ResourceCard.tsx
|
||||||
const styles = {
|
const styles = {
|
||||||
root: (theme) => ({
|
root: (theme) => ({
|
||||||
padding: theme.spacing(2.5, 4),
|
padding: "20px 32px",
|
||||||
borderTop: `1px solid ${theme.palette.divider}`,
|
borderTop: `1px solid ${theme.palette.divider}`,
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
overflowX: "auto",
|
overflowX: "auto",
|
||||||
scrollPadding: theme.spacing(0, 4),
|
scrollPadding: "0 32px",
|
||||||
}),
|
}),
|
||||||
|
|
||||||
metadata: (theme) => ({
|
metadata: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
lineHeight: "normal",
|
lineHeight: "normal",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: theme.spacing(0.5),
|
gap: 4,
|
||||||
overflow: "visible",
|
overflow: "visible",
|
||||||
|
|
||||||
// Because of scrolling
|
// Because of scrolling
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: theme.spacing(4),
|
paddingRight: 32,
|
||||||
},
|
},
|
||||||
}),
|
},
|
||||||
|
|
||||||
metadataLabel: (theme) => ({
|
metadataLabel: (theme) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
@ -255,9 +255,9 @@ const styles = {
|
|||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
}),
|
}),
|
||||||
|
|
||||||
skeleton: (theme) => ({
|
skeleton: {
|
||||||
marginTop: theme.spacing(0.5),
|
marginTop: 4,
|
||||||
}),
|
},
|
||||||
|
|
||||||
inlineCommand: (theme) => ({
|
inlineCommand: (theme) => ({
|
||||||
fontFamily: MONOSPACE_FONT_FAMILY,
|
fontFamily: MONOSPACE_FONT_FAMILY,
|
||||||
|
@ -563,31 +563,31 @@ const styles = {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
agentInfo: (theme) => ({
|
agentInfo: (theme) => ({
|
||||||
padding: theme.spacing(2, 4),
|
padding: "16px 32px",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(6),
|
gap: 48,
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
gap: theme.spacing(2),
|
gap: 16,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
agentNameAndInfo: (theme) => ({
|
agentNameAndInfo: (theme) => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(3),
|
gap: 24,
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
gap: theme.spacing(1.5),
|
gap: 12,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
agentButtons: (theme) => ({
|
agentButtons: (theme) => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
justifyContent: "flex-end",
|
justifyContent: "flex-end",
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
flex: 1,
|
flex: 1,
|
||||||
@ -607,7 +607,7 @@ const styles = {
|
|||||||
maxHeight: 256,
|
maxHeight: 256,
|
||||||
borderBottom: `1px solid ${theme.palette.divider}`,
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
paddingTop: theme.spacing(2),
|
paddingTop: 16,
|
||||||
|
|
||||||
// We need this to be able to apply the padding top from startupLogs
|
// We need this to be able to apply the padding top from startupLogs
|
||||||
"& > div": {
|
"& > div": {
|
||||||
@ -618,7 +618,7 @@ const styles = {
|
|||||||
agentNameAndStatus: (theme) => ({
|
agentNameAndStatus: (theme) => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(4),
|
gap: 32,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
@ -631,7 +631,7 @@ const styles = {
|
|||||||
textOverflow: "ellipsis",
|
textOverflow: "ellipsis",
|
||||||
maxWidth: 260,
|
maxWidth: 260,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
fontSize: theme.spacing(2),
|
fontSize: 16,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
width: "fit-content",
|
width: "fit-content",
|
||||||
|
|
||||||
@ -640,11 +640,11 @@ const styles = {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
agentDataGroup: (theme) => ({
|
agentDataGroup: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "baseline",
|
alignItems: "baseline",
|
||||||
gap: theme.spacing(6),
|
gap: 48,
|
||||||
}),
|
},
|
||||||
|
|
||||||
agentData: (theme) => ({
|
agentData: (theme) => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@ -670,12 +670,12 @@ const styles = {
|
|||||||
background: "transparent",
|
background: "transparent",
|
||||||
border: 0,
|
border: 0,
|
||||||
fontFamily: "inherit",
|
fontFamily: "inherit",
|
||||||
padding: theme.spacing(1.5, 4),
|
padding: "12px 32px",
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
|
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
@ -699,7 +699,7 @@ const styles = {
|
|||||||
agentErrorMessage: (theme) => ({
|
agentErrorMessage: (theme) => ({
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
marginTop: theme.spacing(0.5),
|
marginTop: 4,
|
||||||
color: theme.palette.warning.light,
|
color: theme.palette.warning.light,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ export const AgentRowPreview: FC<AgentRowPreviewProps> = ({
|
|||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
agentRow: (theme) => ({
|
agentRow: (theme) => ({
|
||||||
padding: theme.spacing(2, 4),
|
padding: "16px 32px",
|
||||||
backgroundColor: theme.palette.background.paperLight,
|
backgroundColor: theme.palette.background.paperLight,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
position: "relative",
|
position: "relative",
|
||||||
@ -122,12 +122,12 @@ const styles = {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
agentStatusWrapper: (theme) => ({
|
agentStatusWrapper: {
|
||||||
width: theme.spacing(4.5),
|
width: 36,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
}),
|
},
|
||||||
|
|
||||||
agentStatusPreview: (theme) => ({
|
agentStatusPreview: (theme) => ({
|
||||||
width: 10,
|
width: 10,
|
||||||
@ -153,7 +153,7 @@ const styles = {
|
|||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
gap: theme.spacing(2),
|
gap: 16,
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
@ -170,7 +170,7 @@ const styles = {
|
|||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
alignItems: "flex-start",
|
alignItems: "flex-start",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
width: "fit-content",
|
width: "fit-content",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
@ -353,12 +353,12 @@ export const AgentStatus: React.FC<{
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
status: (theme) => ({
|
status: {
|
||||||
width: theme.spacing(1),
|
width: 8,
|
||||||
height: theme.spacing(1),
|
height: 8,
|
||||||
borderRadius: "100%",
|
borderRadius: "100%",
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
}),
|
},
|
||||||
|
|
||||||
connected: (theme) => ({
|
connected: (theme) => ({
|
||||||
backgroundColor: theme.palette.success.light,
|
backgroundColor: theme.palette.success.light,
|
||||||
@ -388,15 +388,15 @@ const styles = {
|
|||||||
|
|
||||||
timeoutWarning: (theme) => ({
|
timeoutWarning: (theme) => ({
|
||||||
color: theme.palette.warning.light,
|
color: theme.palette.warning.light,
|
||||||
width: theme.spacing(2),
|
width: 16,
|
||||||
height: theme.spacing(2),
|
height: 16,
|
||||||
position: "relative",
|
position: "relative",
|
||||||
}),
|
}),
|
||||||
|
|
||||||
errorWarning: (theme) => ({
|
errorWarning: (theme) => ({
|
||||||
color: theme.palette.error.main,
|
color: theme.palette.error.main,
|
||||||
width: theme.spacing(2),
|
width: 16,
|
||||||
height: theme.spacing(2),
|
height: 16,
|
||||||
position: "relative",
|
position: "relative",
|
||||||
}),
|
}),
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -94,7 +94,7 @@ export const AppLink: FC<AppLinkProps> = ({ app, workspace, agent }) => {
|
|||||||
<span
|
<span
|
||||||
css={
|
css={
|
||||||
!isPrivateApp && {
|
!isPrivateApp && {
|
||||||
marginRight: theme.spacing(1),
|
marginRight: 8,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
@ -12,7 +12,7 @@ export const AppPreviewLink: FC<AppPreviewProps> = ({ app }) => {
|
|||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
css={(theme) => ({
|
css={(theme) => ({
|
||||||
padding: theme.spacing(0.25, 1.5),
|
padding: "2px 12px",
|
||||||
borderRadius: 9999,
|
borderRadius: 9999,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
|
@ -13,7 +13,7 @@ const meta: Meta<typeof PortForwardPopoverView> = {
|
|||||||
(Story) => (
|
(Story) => (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: (theme) => theme.spacing(38),
|
width: 304,
|
||||||
border: (theme) => `1px solid ${theme.palette.divider}`,
|
border: (theme) => `1px solid ${theme.palette.divider}`,
|
||||||
borderRadius: 1,
|
borderRadius: 1,
|
||||||
backgroundColor: (theme) => theme.palette.background.paper,
|
backgroundColor: (theme) => theme.palette.background.paper,
|
||||||
|
@ -54,7 +54,7 @@ export const PortForwardButton: React.FC<PortForwardButtonProps> = (props) => {
|
|||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
height: 20,
|
height: 20,
|
||||||
minWidth: 20,
|
minWidth: 20,
|
||||||
padding: (theme) => theme.spacing(0, 0.5),
|
padding: "0 4px",
|
||||||
borderRadius: "50%",
|
borderRadius: "50%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
@ -75,9 +75,9 @@ export const PortForwardButton: React.FC<PortForwardButtonProps> = (props) => {
|
|||||||
classes={{
|
classes={{
|
||||||
paper: css`
|
paper: css`
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: ${theme.spacing(38)};
|
width: 304px;
|
||||||
color: ${theme.palette.text.secondary};
|
color: ${theme.palette.text.secondary};
|
||||||
margin-top: ${theme.spacing(0.5)};
|
margin-top: 4px;
|
||||||
`,
|
`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -90,25 +90,24 @@ export const PortForwardButton: React.FC<PortForwardButtonProps> = (props) => {
|
|||||||
export const PortForwardPopoverView: React.FC<
|
export const PortForwardPopoverView: React.FC<
|
||||||
PortForwardButtonProps & { ports?: WorkspaceAgentListeningPort[] }
|
PortForwardButtonProps & { ports?: WorkspaceAgentListeningPort[] }
|
||||||
> = (props) => {
|
> = (props) => {
|
||||||
|
const theme = useTheme();
|
||||||
const { host, workspaceName, agent, username, ports } = props;
|
const { host, workspaceName, agent, username, ports } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
css={{
|
||||||
padding: (theme) => theme.spacing(2.5),
|
padding: 20,
|
||||||
borderBottom: (theme) => `1px solid ${theme.palette.divider}`,
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<HelpTooltipTitle>Forwarded ports</HelpTooltipTitle>
|
<HelpTooltipTitle>Forwarded ports</HelpTooltipTitle>
|
||||||
<HelpTooltipText
|
<HelpTooltipText sx={{ color: theme.palette.text.secondary }}>
|
||||||
sx={{ color: (theme) => theme.palette.text.secondary }}
|
|
||||||
>
|
|
||||||
{ports?.length === 0
|
{ports?.length === 0
|
||||||
? "No open ports were detected."
|
? "No open ports were detected."
|
||||||
: "The forwarded ports are exclusively accessible to you."}
|
: "The forwarded ports are exclusively accessible to you."}
|
||||||
</HelpTooltipText>
|
</HelpTooltipText>
|
||||||
<Box sx={{ marginTop: (theme) => theme.spacing(1.5) }}>
|
<Box css={{ marginTop: 12 }}>
|
||||||
{ports?.map((p) => {
|
{ports?.map((p) => {
|
||||||
const url = portForwardURL(
|
const url = portForwardURL(
|
||||||
host,
|
host,
|
||||||
@ -122,7 +121,7 @@ export const PortForwardPopoverView: React.FC<
|
|||||||
<Link
|
<Link
|
||||||
underline="none"
|
underline="none"
|
||||||
sx={{
|
sx={{
|
||||||
color: (theme) => theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
@ -141,7 +140,7 @@ export const PortForwardPopoverView: React.FC<
|
|||||||
component="span"
|
component="span"
|
||||||
sx={{
|
sx={{
|
||||||
ml: "auto",
|
ml: "auto",
|
||||||
color: (theme) => theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
}}
|
}}
|
||||||
@ -154,28 +153,22 @@ export const PortForwardPopoverView: React.FC<
|
|||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box css={{ padding: 20 }}>
|
||||||
sx={{
|
|
||||||
padding: (theme) => theme.spacing(2.5),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<HelpTooltipTitle>Forward port</HelpTooltipTitle>
|
<HelpTooltipTitle>Forward port</HelpTooltipTitle>
|
||||||
<HelpTooltipText
|
<HelpTooltipText sx={{ color: theme.palette.text.secondary }}>
|
||||||
sx={{ color: (theme) => theme.palette.text.secondary }}
|
|
||||||
>
|
|
||||||
Access ports running on the agent:
|
Access ports running on the agent:
|
||||||
</HelpTooltipText>
|
</HelpTooltipText>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
component="form"
|
component="form"
|
||||||
sx={{
|
sx={{
|
||||||
border: (theme) => `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
borderRadius: "4px",
|
borderRadius: "4px",
|
||||||
mt: 2,
|
mt: 2,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
"&:focus-within": {
|
"&:focus-within": {
|
||||||
borderColor: (theme) => theme.palette.primary.main,
|
borderColor: theme.palette.primary.main,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onSubmit={(e) => {
|
onSubmit={(e) => {
|
||||||
@ -201,26 +194,26 @@ export const PortForwardPopoverView: React.FC<
|
|||||||
min={0}
|
min={0}
|
||||||
max={65535}
|
max={65535}
|
||||||
required
|
required
|
||||||
sx={{
|
css={{
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
height: 34,
|
height: 34,
|
||||||
p: (theme) => theme.spacing(0, 1.5),
|
padding: "0 12px",
|
||||||
background: "none",
|
background: "none",
|
||||||
border: 0,
|
border: 0,
|
||||||
outline: "none",
|
outline: "none",
|
||||||
color: (theme) => theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
appearance: "textfield",
|
appearance: "textfield",
|
||||||
display: "block",
|
display: "block",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<OpenInNewOutlined
|
<OpenInNewOutlined
|
||||||
sx={{
|
css={{
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
width: 14,
|
width: 14,
|
||||||
height: 14,
|
height: 14,
|
||||||
marginRight: (theme) => theme.spacing(1.5),
|
marginRight: 12,
|
||||||
color: (theme) => theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -2,9 +2,9 @@ import { type FC, useState } from "react";
|
|||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import Tooltip from "@mui/material/Tooltip";
|
import Tooltip from "@mui/material/Tooltip";
|
||||||
import { type CSSObject, type Interpolation, type Theme } from "@emotion/react";
|
import { type CSSObject, type Interpolation, type Theme } from "@emotion/react";
|
||||||
import { WorkspaceAgent, WorkspaceResource } from "api/typesGenerated";
|
import type { WorkspaceAgent, WorkspaceResource } from "api/typesGenerated";
|
||||||
import { DropdownArrow } from "components/DropdownArrow/DropdownArrow";
|
import { DropdownArrow } from "../DropdownArrow/DropdownArrow";
|
||||||
import { CopyableValue } from "components/CopyableValue/CopyableValue";
|
import { CopyableValue } from "../CopyableValue/CopyableValue";
|
||||||
import { Stack } from "../Stack/Stack";
|
import { Stack } from "../Stack/Stack";
|
||||||
import { ResourceAvatar } from "./ResourceAvatar";
|
import { ResourceAvatar } from "./ResourceAvatar";
|
||||||
import { SensitiveValue } from "./SensitiveValue";
|
import { SensitiveValue } from "./SensitiveValue";
|
||||||
@ -12,7 +12,7 @@ import { SensitiveValue } from "./SensitiveValue";
|
|||||||
const styles = {
|
const styles = {
|
||||||
resourceCard: (theme) => ({
|
resourceCard: (theme) => ({
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
|
|
||||||
"&:not(:first-of-type)": {
|
"&:not(:first-of-type)": {
|
||||||
@ -33,7 +33,7 @@ const styles = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
resourceCardHeader: (theme) => ({
|
resourceCardHeader: (theme) => ({
|
||||||
padding: theme.spacing(3, 4),
|
padding: "24px 32px",
|
||||||
borderBottom: `1px solid ${theme.palette.divider}`,
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||||
|
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
@ -112,13 +112,13 @@ export const ResourceCard: FC<ResourceCardProps> = ({ resource, agentRow }) => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
css={(theme) => ({
|
css={{
|
||||||
flexGrow: 2,
|
flexGrow: 2,
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: `repeat(${gridWidth}, minmax(0, 1fr))`,
|
gridTemplateColumns: `repeat(${gridWidth}, minmax(0, 1fr))`,
|
||||||
gap: theme.spacing(5),
|
gap: 40,
|
||||||
rowGap: theme.spacing(3),
|
rowGap: 24,
|
||||||
})}
|
}}
|
||||||
>
|
>
|
||||||
{resource.daily_cost > 0 && (
|
{resource.daily_cost > 0 && (
|
||||||
<div css={styles.metadata}>
|
<div css={styles.metadata}>
|
||||||
|
@ -55,12 +55,12 @@ export const Resources: FC<React.PropsWithChildren<ResourcesProps>> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
buttonWrapper: (theme) => ({
|
buttonWrapper: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
marginTop: theme.spacing(2),
|
marginTop: 16,
|
||||||
}),
|
},
|
||||||
|
|
||||||
showMoreButton: {
|
showMoreButton: {
|
||||||
borderRadius: 9999,
|
borderRadius: 9999,
|
||||||
|
@ -41,10 +41,10 @@ export const SSHButton: FC<PropsWithChildren<SSHButtonProps>> = ({
|
|||||||
horizontal="right"
|
horizontal="right"
|
||||||
classes={{
|
classes={{
|
||||||
paper: css`
|
paper: css`
|
||||||
padding: ${theme.spacing(2, 3, 3)};
|
padding: 16px 24px 24px;
|
||||||
width: ${theme.spacing(38)};
|
width: 304px;
|
||||||
color: ${theme.palette.text.secondary};
|
color: ${theme.palette.text.secondary};
|
||||||
margin-top: ${theme.spacing(0.25)};
|
margin-top: 2px;
|
||||||
`,
|
`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -94,9 +94,9 @@ export const SSHButton: FC<PropsWithChildren<SSHButtonProps>> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
codeExamples: (theme) => ({
|
codeExamples: {
|
||||||
marginTop: theme.spacing(1.5),
|
marginTop: 12,
|
||||||
}),
|
},
|
||||||
|
|
||||||
codeExampleLabel: {
|
codeExampleLabel: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
@ -2,7 +2,7 @@ import IconButton from "@mui/material/IconButton";
|
|||||||
import Tooltip from "@mui/material/Tooltip";
|
import Tooltip from "@mui/material/Tooltip";
|
||||||
import VisibilityOffOutlined from "@mui/icons-material/VisibilityOffOutlined";
|
import VisibilityOffOutlined from "@mui/icons-material/VisibilityOffOutlined";
|
||||||
import VisibilityOutlined from "@mui/icons-material/VisibilityOutlined";
|
import VisibilityOutlined from "@mui/icons-material/VisibilityOutlined";
|
||||||
import { useState } from "react";
|
import { type FC, useState } from "react";
|
||||||
import { css } from "@emotion/react";
|
import { css } from "@emotion/react";
|
||||||
import { CopyableValue } from "components/CopyableValue/CopyableValue";
|
import { CopyableValue } from "components/CopyableValue/CopyableValue";
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ const Language = {
|
|||||||
hideLabel: "Hide value",
|
hideLabel: "Hide value",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SensitiveValue: React.FC<{ value: string }> = ({ value }) => {
|
export const SensitiveValue: FC<{ value: string }> = ({ value }) => {
|
||||||
const [shouldDisplay, setShouldDisplay] = useState(false);
|
const [shouldDisplay, setShouldDisplay] = useState(false);
|
||||||
const displayValue = shouldDisplay ? value : "••••••••";
|
const displayValue = shouldDisplay ? value : "••••••••";
|
||||||
const buttonLabel = shouldDisplay ? Language.hideLabel : Language.showLabel;
|
const buttonLabel = shouldDisplay ? Language.hideLabel : Language.showLabel;
|
||||||
@ -23,11 +23,11 @@ export const SensitiveValue: React.FC<{ value: string }> = ({ value }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
css={(theme) => ({
|
css={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(0.5),
|
gap: 4,
|
||||||
})}
|
}}
|
||||||
>
|
>
|
||||||
<CopyableValue
|
<CopyableValue
|
||||||
value={value}
|
value={value}
|
||||||
|
@ -72,15 +72,15 @@ export const MultiTextField: FC<MultiTextFieldProps> = ({
|
|||||||
const styles = {
|
const styles = {
|
||||||
root: (theme) => ({
|
root: (theme) => ({
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
minHeight: theme.spacing(6), // Chip height + paddings
|
minHeight: 48, // Chip height + paddings
|
||||||
padding: theme.spacing(1.25, 1.75),
|
padding: "10px 14px",
|
||||||
fontSize: theme.spacing(2),
|
fontSize: 16,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
position: "relative",
|
position: "relative",
|
||||||
margin: theme.spacing(1, 0, 0.5), // Have same margin than TextField
|
margin: "8px 0 4px", // Have same margin than TextField
|
||||||
|
|
||||||
"&:has(input:focus)": {
|
"&:has(input:focus)": {
|
||||||
borderColor: theme.palette.primary.main,
|
borderColor: theme.palette.primary.main,
|
||||||
|
@ -4,7 +4,7 @@ import Radio from "@mui/material/Radio";
|
|||||||
import RadioGroup from "@mui/material/RadioGroup";
|
import RadioGroup from "@mui/material/RadioGroup";
|
||||||
import TextField, { TextFieldProps } from "@mui/material/TextField";
|
import TextField, { TextFieldProps } from "@mui/material/TextField";
|
||||||
import Tooltip from "@mui/material/Tooltip";
|
import Tooltip from "@mui/material/Tooltip";
|
||||||
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
|
import { type Interpolation, type Theme } from "@emotion/react";
|
||||||
import { type FC } from "react";
|
import { type FC } from "react";
|
||||||
import { TemplateVersionParameter } from "api/typesGenerated";
|
import { TemplateVersionParameter } from "api/typesGenerated";
|
||||||
import { MemoizedMarkdown } from "components/Markdown/Markdown";
|
import { MemoizedMarkdown } from "components/Markdown/Markdown";
|
||||||
@ -17,9 +17,9 @@ const isBoolean = (parameter: TemplateVersionParameter) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
label: (theme) => ({
|
label: {
|
||||||
marginBottom: theme.spacing(0.5),
|
marginBottom: 4,
|
||||||
}),
|
},
|
||||||
labelCaption: (theme) => ({
|
labelCaption: (theme) => ({
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
@ -43,11 +43,11 @@ const styles = {
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
labelImmutable: (theme) => ({
|
labelImmutable: {
|
||||||
marginTop: theme.spacing(0.5),
|
marginTop: 4,
|
||||||
marginBottom: theme.spacing(0.5),
|
marginBottom: 4,
|
||||||
color: colors.yellow[7],
|
color: colors.yellow[7],
|
||||||
}),
|
},
|
||||||
textField: {
|
textField: {
|
||||||
".small & .MuiInputBase-root": {
|
".small & .MuiInputBase-root": {
|
||||||
height: 36,
|
height: 36,
|
||||||
@ -55,32 +55,32 @@ const styles = {
|
|||||||
borderRadius: 6,
|
borderRadius: 6,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
radioGroup: (theme) => ({
|
radioGroup: {
|
||||||
".small & .MuiFormControlLabel-label": {
|
".small & .MuiFormControlLabel-label": {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
".small & .MuiRadio-root": {
|
".small & .MuiRadio-root": {
|
||||||
padding: theme.spacing(0.75, "9px"), // 8px + 1px border
|
padding: "6px 9px", // 8px + 1px border
|
||||||
},
|
},
|
||||||
".small & .MuiRadio-root svg": {
|
".small & .MuiRadio-root svg": {
|
||||||
width: 16,
|
width: 16,
|
||||||
height: 16,
|
height: 16,
|
||||||
},
|
},
|
||||||
}),
|
},
|
||||||
checkbox: (theme) => ({
|
checkbox: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
}),
|
},
|
||||||
labelIconWrapper: (theme) => ({
|
labelIconWrapper: {
|
||||||
width: theme.spacing(2.5),
|
width: 20,
|
||||||
height: theme.spacing(2.5),
|
height: 20,
|
||||||
display: "block",
|
display: "block",
|
||||||
|
|
||||||
".small &": {
|
".small &": {
|
||||||
display: "none",
|
display: "none",
|
||||||
},
|
},
|
||||||
}),
|
},
|
||||||
labelIcon: {
|
labelIcon: {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
@ -175,7 +175,6 @@ const RichParameterField: React.FC<RichParameterInputProps> = ({
|
|||||||
size,
|
size,
|
||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
|
||||||
const small = size === "small";
|
const small = size === "small";
|
||||||
|
|
||||||
if (isBoolean(parameter)) {
|
if (isBoolean(parameter)) {
|
||||||
@ -232,9 +231,7 @@ const RichParameterField: React.FC<RichParameterInputProps> = ({
|
|||||||
spacing={small ? 1 : 0}
|
spacing={small ? 1 : 0}
|
||||||
alignItems={small ? "center" : undefined}
|
alignItems={small ? "center" : undefined}
|
||||||
direction={small ? "row" : "column"}
|
direction={small ? "row" : "column"}
|
||||||
css={{
|
css={{ padding: small ? undefined : "4px 0" }}
|
||||||
padding: small ? undefined : `${theme.spacing(0.5)} 0`,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{small ? (
|
{small ? (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import { type FC, type ReactNode, type PropsWithChildren } from "react";
|
import { type FC, type ReactNode, type PropsWithChildren } from "react";
|
||||||
import { SectionAction } from "./SectionAction";
|
import { SectionAction } from "./SectionAction";
|
||||||
@ -32,8 +31,6 @@ export const Section: SectionFC = ({
|
|||||||
children,
|
children,
|
||||||
layout = "fixed",
|
layout = "fixed",
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={className} id={id} data-testid={id}>
|
<section className={className} id={id} data-testid={id}>
|
||||||
<div css={{ maxWidth: layout === "fluid" ? "100%" : 500 }}>
|
<div css={{ maxWidth: layout === "fluid" ? "100%" : 500 }}>
|
||||||
@ -55,7 +52,7 @@ export const Section: SectionFC = ({
|
|||||||
{toolbar && <div>{toolbar}</div>}
|
{toolbar && <div>{toolbar}</div>}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{alert && <div css={{ marginBottom: theme.spacing(1) }}>{alert}</div>}
|
{alert && <div css={{ marginBottom: 8 }}>{alert}</div>}
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -66,16 +63,16 @@ export const Section: SectionFC = ({
|
|||||||
Section.Action = SectionAction;
|
Section.Action = SectionAction;
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
header: (theme) => ({
|
header: {
|
||||||
marginBottom: theme.spacing(3),
|
marginBottom: 24,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
}),
|
},
|
||||||
description: (theme) => ({
|
description: (theme) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginTop: theme.spacing(0.5),
|
marginTop: 4,
|
||||||
lineHeight: "140%",
|
lineHeight: "140%",
|
||||||
}),
|
}),
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -7,13 +7,5 @@ import { type FC } from "react";
|
|||||||
export const SectionAction: FC<React.PropsWithChildren<unknown>> = ({
|
export const SectionAction: FC<React.PropsWithChildren<unknown>> = ({
|
||||||
children,
|
children,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return <div css={{ marginTop: 24 }}>{children}</div>;
|
||||||
<div
|
|
||||||
css={(theme) => ({
|
|
||||||
marginTop: theme.spacing(3),
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
@ -18,21 +18,10 @@ export const SettingsLayout: FC = () => {
|
|||||||
</Helmet>
|
</Helmet>
|
||||||
|
|
||||||
<Margins>
|
<Margins>
|
||||||
<Stack
|
<Stack css={{ padding: "48px 0" }} direction="row" spacing={6}>
|
||||||
css={(theme) => ({
|
|
||||||
padding: theme.spacing(6, 0),
|
|
||||||
})}
|
|
||||||
direction="row"
|
|
||||||
spacing={6}
|
|
||||||
>
|
|
||||||
<Sidebar user={me} />
|
<Sidebar user={me} />
|
||||||
<Suspense fallback={<Loader />}>
|
<Suspense fallback={<Loader />}>
|
||||||
<main
|
<main css={{ maxWidth: 800, width: "100%" }}>
|
||||||
css={{
|
|
||||||
maxWidth: 800,
|
|
||||||
width: "100%",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</main>
|
</main>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
@ -33,8 +33,8 @@ const SidebarNavItem: FC<
|
|||||||
display: block;
|
display: block;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: ${theme.spacing(1.5, 1.5, 1.5, 2)};
|
padding: 12px 12px 12px 16px;
|
||||||
border-radius: ${theme.shape.borderRadius / 2}px;
|
border-radius: 4px;
|
||||||
transition: background-color 0.15s ease-in-out;
|
transition: background-color 0.15s ease-in-out;
|
||||||
margin-bottom: 1px;
|
margin-bottom: 1px;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -56,8 +56,8 @@ const SidebarNavItem: FC<
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
background-color: ${theme.palette.secondary.dark};
|
background-color: ${theme.palette.secondary.dark};
|
||||||
border-top-left-radius: ${theme.shape.borderRadius};
|
border-top-left-radius: 8px;
|
||||||
border-bottom-left-radius: ${theme.shape.borderRadius};
|
border-bottom-left-radius: 8px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -82,14 +82,7 @@ const SidebarNavItem: FC<
|
|||||||
const SidebarNavItemIcon: React.FC<{
|
const SidebarNavItemIcon: React.FC<{
|
||||||
icon: ComponentType<{ className?: string }>;
|
icon: ComponentType<{ className?: string }>;
|
||||||
}> = ({ icon: Icon }) => {
|
}> = ({ icon: Icon }) => {
|
||||||
return (
|
return <Icon css={{ width: 16, height: 16 }} />;
|
||||||
<Icon
|
|
||||||
css={(theme) => ({
|
|
||||||
width: theme.spacing(2),
|
|
||||||
height: theme.spacing(2),
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Sidebar: React.FC<{ user: User }> = ({ user }) => {
|
export const Sidebar: React.FC<{ user: User }> = ({ user }) => {
|
||||||
@ -150,7 +143,7 @@ const styles = {
|
|||||||
},
|
},
|
||||||
userInfo: (theme) => ({
|
userInfo: (theme) => ({
|
||||||
...(theme.typography.body2 as CSSObject),
|
...(theme.typography.body2 as CSSObject),
|
||||||
marginBottom: theme.spacing(2),
|
marginBottom: 16,
|
||||||
}),
|
}),
|
||||||
userData: {
|
userData: {
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
|
@ -5,7 +5,7 @@ import { colors } from "theme/colors";
|
|||||||
export const Sidebar = styled((props: BoxProps) => (
|
export const Sidebar = styled((props: BoxProps) => (
|
||||||
<Box {...props} component="nav" />
|
<Box {...props} component="nav" />
|
||||||
))(({ theme }) => ({
|
))(({ theme }) => ({
|
||||||
width: theme.spacing(32),
|
width: 256,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
borderRight: `1px solid ${theme.palette.divider}`,
|
borderRight: `1px solid ${theme.palette.divider}`,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
@ -22,7 +22,7 @@ export const SidebarItem = styled(
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
width: "100%",
|
width: "100%",
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
padding: theme.spacing(0, 3),
|
padding: "0 24px",
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
pointerEvents: active ? "none" : "auto",
|
pointerEvents: active ? "none" : "auto",
|
||||||
color: active ? theme.palette.text.primary : theme.palette.text.secondary,
|
color: active ? theme.palette.text.primary : theme.palette.text.secondary,
|
||||||
@ -30,8 +30,8 @@ export const SidebarItem = styled(
|
|||||||
background: theme.palette.action.hover,
|
background: theme.palette.action.hover,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
},
|
},
|
||||||
paddingTop: theme.spacing(1.25),
|
paddingTop: 10,
|
||||||
paddingBottom: theme.spacing(1.25),
|
paddingBottom: 10,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const SidebarCaption = styled(Box)(({ theme }) => ({
|
export const SidebarCaption = styled(Box)(({ theme }) => ({
|
||||||
@ -39,6 +39,6 @@ export const SidebarCaption = styled(Box)(({ theme }) => ({
|
|||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
padding: theme.spacing(1.5, 3),
|
padding: "12px 24px",
|
||||||
letterSpacing: "0.5px",
|
letterSpacing: "0.5px",
|
||||||
}));
|
}));
|
||||||
|
@ -32,7 +32,7 @@ export const SignInLayout: FC<{ children: ReactNode }> = ({ children }) => {
|
|||||||
css={(theme) => ({
|
css={(theme) => ({
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
marginTop: theme.spacing(3),
|
marginTop: 24,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{`\u00a9 ${new Date().getFullYear()} Coder Technologies, Inc.`}
|
{`\u00a9 ${new Date().getFullYear()} Coder Technologies, Inc.`}
|
||||||
|
@ -25,15 +25,15 @@ export const Stack = forwardRef<HTMLDivElement, StackProps>((props, ref) => {
|
|||||||
<div
|
<div
|
||||||
{...divProps}
|
{...divProps}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
css={(theme) => ({
|
css={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: direction,
|
flexDirection: direction,
|
||||||
gap: spacing && theme.spacing(spacing),
|
gap: spacing * 8,
|
||||||
alignItems: alignItems,
|
alignItems: alignItems,
|
||||||
justifyContent: justifyContent,
|
justifyContent: justifyContent,
|
||||||
flexWrap: wrap,
|
flexWrap: wrap,
|
||||||
maxWidth: "100%",
|
maxWidth: "100%",
|
||||||
})}
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,9 +23,9 @@ export const StatsItem: FC<
|
|||||||
const styles = {
|
const styles = {
|
||||||
stats: (theme) => ({
|
stats: (theme) => ({
|
||||||
...(theme.typography.body2 as CSSObject),
|
...(theme.typography.body2 as CSSObject),
|
||||||
paddingLeft: theme.spacing(2),
|
paddingLeft: 16,
|
||||||
paddingRight: theme.spacing(2),
|
paddingRight: 16,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
@ -35,20 +35,20 @@ const styles = {
|
|||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
display: "block",
|
display: "block",
|
||||||
padding: theme.spacing(2),
|
padding: 16,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
statItem: (theme) => ({
|
statItem: (theme) => ({
|
||||||
padding: theme.spacing(1.75),
|
padding: 14,
|
||||||
paddingLeft: theme.spacing(2),
|
paddingLeft: 16,
|
||||||
paddingRight: theme.spacing(2),
|
paddingRight: 16,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "baseline",
|
alignItems: "baseline",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
padding: theme.spacing(1),
|
padding: 8,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ const styles = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
statsValue: (theme) => ({
|
statsValue: (theme) => ({
|
||||||
marginTop: theme.spacing(0.25),
|
marginTop: 2,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
wordWrap: "break-word",
|
wordWrap: "break-word",
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
|
@ -35,7 +35,7 @@ export const SyntaxHighlighter: FC<{
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
css={(theme) => ({
|
css={(theme) => ({
|
||||||
padding: theme.spacing(1, 0),
|
padding: "8px 0",
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
})}
|
})}
|
||||||
|
@ -1,21 +1,12 @@
|
|||||||
import TableCell from "@mui/material/TableCell";
|
import TableCell from "@mui/material/TableCell";
|
||||||
import TableRow, { type TableRowProps } from "@mui/material/TableRow";
|
import TableRow, { type TableRowProps } from "@mui/material/TableRow";
|
||||||
import { type FC, type ReactNode, cloneElement, isValidElement } from "react";
|
import { type FC, type ReactNode, cloneElement, isValidElement } from "react";
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import { Loader } from "../Loader/Loader";
|
import { Loader } from "../Loader/Loader";
|
||||||
|
|
||||||
export const TableLoader: FC = () => {
|
export const TableLoader: FC = () => {
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell
|
<TableCell colSpan={999} css={{ textAlign: "center", height: 160 }}>
|
||||||
colSpan={999}
|
|
||||||
css={{
|
|
||||||
textAlign: "center",
|
|
||||||
height: theme.spacing(20),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Loader />
|
<Loader />
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
@ -4,13 +4,15 @@ import Skeleton from "@mui/material/Skeleton";
|
|||||||
|
|
||||||
export const TableToolbar = styled(Box)(({ theme }) => ({
|
export const TableToolbar = styled(Box)(({ theme }) => ({
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
marginBottom: theme.spacing(1),
|
marginBottom: "8px",
|
||||||
marginTop: 0,
|
marginTop: 0,
|
||||||
height: 36, // The size of a small button
|
height: "36px", // The size of a small button
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
"& strong": { color: theme.palette.text.primary },
|
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
|
"& strong": {
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
type BasePaginationStatusProps = {
|
type BasePaginationStatusProps = {
|
||||||
|
@ -10,15 +10,15 @@ export const Tabs = ({ children }: { children: ReactNode }) => {
|
|||||||
<div
|
<div
|
||||||
css={(theme) => ({
|
css={(theme) => ({
|
||||||
borderBottom: `1px solid ${theme.palette.divider}`,
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||||
marginBottom: theme.spacing(5),
|
marginBottom: 40,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Margins
|
<Margins
|
||||||
css={(theme) => ({
|
css={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(0.25),
|
gap: 2,
|
||||||
})}
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Margins>
|
</Margins>
|
||||||
@ -34,7 +34,7 @@ export const TabLink = (props: NavLinkProps) => {
|
|||||||
color: ${theme.palette.text.secondary};
|
color: ${theme.palette.text.secondary};
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: block;
|
display: block;
|
||||||
padding: ${theme.spacing(0, 2, 2)};
|
padding: 0 16px 16px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: ${theme.palette.text.primary};
|
color: ${theme.palette.text.primary};
|
||||||
|
@ -33,7 +33,7 @@ export const TemplateExampleCard: FC<TemplateExampleCardProps> = ({
|
|||||||
const styles = {
|
const styles = {
|
||||||
template: (theme) => ({
|
template: (theme) => ({
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
@ -47,36 +47,36 @@ const styles = {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
templateIcon: (theme) => ({
|
templateIcon: {
|
||||||
width: theme.spacing(12),
|
width: 96,
|
||||||
height: theme.spacing(12),
|
height: 96,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
|
|
||||||
"& img": {
|
"& img": {
|
||||||
height: theme.spacing(4),
|
height: 32,
|
||||||
},
|
},
|
||||||
}),
|
},
|
||||||
|
|
||||||
templateInfo: (theme) => ({
|
templateInfo: {
|
||||||
padding: theme.spacing(2, 2, 2, 0),
|
padding: "16px 16px 16px 0",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
}),
|
},
|
||||||
|
|
||||||
templateName: (theme) => ({
|
templateName: {
|
||||||
fontSize: theme.spacing(2),
|
fontSize: 16,
|
||||||
textOverflow: "ellipsis",
|
textOverflow: "ellipsis",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
}),
|
},
|
||||||
|
|
||||||
templateDescription: (theme) => ({
|
templateDescription: (theme) => ({
|
||||||
fontSize: theme.spacing(1.75),
|
fontSize: 14,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
textOverflow: "ellipsis",
|
textOverflow: "ellipsis",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
|
@ -99,13 +99,13 @@ const styles = {
|
|||||||
tab: (theme) => ({
|
tab: (theme) => ({
|
||||||
background: "transparent",
|
background: "transparent",
|
||||||
border: 0,
|
border: 0,
|
||||||
padding: theme.spacing(0, 3),
|
padding: "0 24px",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
height: theme.spacing(6),
|
height: 48,
|
||||||
opacity: 0.85,
|
opacity: 0.85,
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
gap: theme.spacing(0.5),
|
gap: 4,
|
||||||
position: "relative",
|
position: "relative",
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
@ -142,7 +142,7 @@ const styles = {
|
|||||||
width: 6,
|
width: 6,
|
||||||
backgroundColor: theme.palette.warning.light,
|
backgroundColor: theme.palette.warning.light,
|
||||||
borderRadius: "100%",
|
borderRadius: "100%",
|
||||||
marginLeft: theme.spacing(0.5),
|
marginLeft: 4,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
codeWrapper: (theme) => ({
|
codeWrapper: (theme) => ({
|
||||||
@ -150,7 +150,7 @@ const styles = {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
files: (theme) => ({
|
files: (theme) => ({
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ export const TimelineDateRow: FC<TimelineDateRow> = ({ date }) => {
|
|||||||
>
|
>
|
||||||
<TableCell
|
<TableCell
|
||||||
css={{
|
css={{
|
||||||
padding: `${theme.spacing(1, 4)} !important`,
|
padding: `8px 32px !important`,
|
||||||
background: `${theme.palette.background.paperLight} !important`,
|
background: `${theme.palette.background.paperLight} !important`,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
position: "relative",
|
position: "relative",
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { css } from "@emotion/css";
|
import { css } from "@emotion/css";
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
import Autocomplete from "@mui/material/Autocomplete";
|
import Autocomplete from "@mui/material/Autocomplete";
|
||||||
@ -33,7 +32,6 @@ export const UserAutocomplete: FC<UserAutocompleteProps> = ({
|
|||||||
className,
|
className,
|
||||||
size = "small",
|
size = "small",
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
|
||||||
const [autoComplete, setAutoComplete] = useState<{
|
const [autoComplete, setAutoComplete] = useState<{
|
||||||
value: string;
|
value: string;
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@ -130,10 +128,8 @@ export const UserAutocomplete: FC<UserAutocompleteProps> = ({
|
|||||||
),
|
),
|
||||||
classes: {
|
classes: {
|
||||||
root: css`
|
root: css`
|
||||||
padding-left: ${theme.spacing(
|
padding-left: 14px !important; // Same padding left as input
|
||||||
1.75,
|
gap: 4px;
|
||||||
)} !important; // Same padding left as input
|
|
||||||
gap: ${theme.spacing(0.5)};
|
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
@ -27,18 +27,16 @@ export const Welcome: FC<
|
|||||||
<CoderIcon
|
<CoderIcon
|
||||||
css={{
|
css={{
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
fontSize: theme.spacing(8),
|
fontSize: 64,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Typography
|
<Typography
|
||||||
css={css`
|
css={css`
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: ${theme.spacing(4)};
|
font-size: 32px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
margin: 0;
|
margin: 16px 0 32px;
|
||||||
margin-bottom: ${theme.spacing(4)};
|
|
||||||
margin-top: ${theme.spacing(2)};
|
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
|
|
||||||
& strong {
|
& strong {
|
||||||
|
@ -25,7 +25,7 @@ export const Logs: FC<React.PropsWithChildren<LogsProps>> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div css={styles.root} className={className}>
|
<div css={styles.root} className={className}>
|
||||||
<div css={styles.scrollWrapper}>
|
<div css={{ minWidth: "fit-content" }}>
|
||||||
{lines.map((line, idx) => (
|
{lines.map((line, idx) => (
|
||||||
<div css={styles.line} className={line.level} key={idx}>
|
<div css={styles.line} className={line.level} key={idx}>
|
||||||
{!hideTimestamps && (
|
{!hideTimestamps && (
|
||||||
@ -63,7 +63,7 @@ export const LogLine: FC<{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
css={[styles.line, isUsingLineNumber && styles.lineNumber]}
|
css={[styles.line, isUsingLineNumber && { paddingLeft: 16 }]}
|
||||||
className={line.level}
|
className={line.level}
|
||||||
style={style}
|
style={style}
|
||||||
>
|
>
|
||||||
@ -93,8 +93,8 @@ export const LogLine: FC<{
|
|||||||
const styles = {
|
const styles = {
|
||||||
root: (theme) => ({
|
root: (theme) => ({
|
||||||
minHeight: 156,
|
minHeight: 156,
|
||||||
padding: theme.spacing(1, 0),
|
padding: "8px 0",
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
overflowX: "auto",
|
overflowX: "auto",
|
||||||
background: theme.palette.background.default,
|
background: theme.palette.background.default,
|
||||||
|
|
||||||
@ -103,9 +103,6 @@ const styles = {
|
|||||||
borderRadius: 0,
|
borderRadius: 0,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
scrollWrapper: {
|
|
||||||
minWidth: "fit-content",
|
|
||||||
},
|
|
||||||
line: (theme) => ({
|
line: (theme) => ({
|
||||||
wordBreak: "break-all",
|
wordBreak: "break-all",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@ -116,7 +113,7 @@ const styles = {
|
|||||||
height: "auto",
|
height: "auto",
|
||||||
// Whitespace is significant in terminal output for alignment
|
// Whitespace is significant in terminal output for alignment
|
||||||
whiteSpace: "pre",
|
whiteSpace: "pre",
|
||||||
padding: theme.spacing(0, 4),
|
padding: "0 32px",
|
||||||
|
|
||||||
"&.error": {
|
"&.error": {
|
||||||
backgroundColor: theme.palette.error.dark,
|
backgroundColor: theme.palette.error.dark,
|
||||||
@ -130,23 +127,20 @@ const styles = {
|
|||||||
backgroundColor: theme.palette.warning.dark,
|
backgroundColor: theme.palette.warning.dark,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
lineNumber: (theme) => ({
|
space: {
|
||||||
paddingLeft: theme.spacing(2),
|
|
||||||
}),
|
|
||||||
space: (theme) => ({
|
|
||||||
userSelect: "none",
|
userSelect: "none",
|
||||||
width: theme.spacing(3),
|
width: 24,
|
||||||
display: "block",
|
display: "block",
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
}),
|
},
|
||||||
time: (theme) => ({
|
time: (theme) => ({
|
||||||
userSelect: "none",
|
userSelect: "none",
|
||||||
whiteSpace: "pre",
|
whiteSpace: "pre",
|
||||||
display: "inline-block",
|
display: "inline-block",
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
}),
|
}),
|
||||||
number: (theme) => ({
|
number: {
|
||||||
width: theme.spacing(4),
|
width: 32,
|
||||||
textAlign: "right",
|
textAlign: "right",
|
||||||
}),
|
},
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -97,7 +97,7 @@ const styles = {
|
|||||||
header: (theme) => ({
|
header: (theme) => ({
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
padding: theme.spacing(0.5, 3),
|
padding: "4px 24px",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
fontFamily: "Inter",
|
fontFamily: "Inter",
|
||||||
|
@ -89,7 +89,7 @@ const FailureTooltip = styled(({ className, ...props }: TooltipProps) => (
|
|||||||
backgroundColor: theme.palette.background.paperLight,
|
backgroundColor: theme.palette.background.paperLight,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
padding: theme.spacing(1, 1.25),
|
padding: "8px 10px",
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ export const useClickableTableRow = ({
|
|||||||
},
|
},
|
||||||
|
|
||||||
"&:last-of-type": {
|
"&:last-of-type": {
|
||||||
borderBottomLeftRadius: theme.shape.borderRadius,
|
borderBottomLeftRadius: 8,
|
||||||
borderBottomRightRadius: theme.shape.borderRadius,
|
borderBottomRightRadius: 8,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
hover: true,
|
hover: true,
|
||||||
|
@ -15,8 +15,8 @@ export const NotFoundPage: FC = () => {
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
css={(theme) => ({
|
css={(theme) => ({
|
||||||
margin: theme.spacing(1),
|
margin: 8,
|
||||||
padding: theme.spacing(1),
|
padding: 8,
|
||||||
borderRight: theme.palette.divider,
|
borderRight: theme.palette.divider,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
@ -69,15 +69,15 @@ const styles = {
|
|||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
diffColumn: (theme) => ({
|
diffColumn: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
paddingTop: theme.spacing(2),
|
paddingTop: 16,
|
||||||
paddingBottom: theme.spacing(2.5),
|
paddingBottom: 20,
|
||||||
paddingRight: theme.spacing(2),
|
paddingRight: 16,
|
||||||
lineHeight: "160%",
|
lineHeight: "160%",
|
||||||
alignSelf: "stretch",
|
alignSelf: "stretch",
|
||||||
overflowWrap: "anywhere",
|
overflowWrap: "anywhere",
|
||||||
}),
|
},
|
||||||
|
|
||||||
diffOld: (theme) => ({
|
diffOld: (theme) => ({
|
||||||
backgroundColor: theme.palette.error.dark,
|
backgroundColor: theme.palette.error.dark,
|
||||||
@ -89,15 +89,15 @@ const styles = {
|
|||||||
alignItems: "baseline",
|
alignItems: "baseline",
|
||||||
},
|
},
|
||||||
|
|
||||||
diffLine: (theme) => ({
|
diffLine: {
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
width: theme.spacing(6),
|
width: 48,
|
||||||
textAlign: "right",
|
textAlign: "right",
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
}),
|
},
|
||||||
|
|
||||||
diffIcon: (theme) => ({
|
diffIcon: (theme) => ({
|
||||||
width: theme.spacing(4),
|
width: 32,
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
fontSize: theme.typography.body1.fontSize,
|
fontSize: theme.typography.body1.fontSize,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
@ -108,10 +108,10 @@ const styles = {
|
|||||||
color: theme.palette.success.contrastText,
|
color: theme.palette.success.contrastText,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
diffValue: (theme) => ({
|
diffValue: {
|
||||||
padding: 1,
|
padding: 1,
|
||||||
borderRadius: theme.shape.borderRadius / 2,
|
borderRadius: 4,
|
||||||
}),
|
},
|
||||||
|
|
||||||
diffValueOld: {
|
diffValueOld: {
|
||||||
backgroundColor: colors.red[12],
|
backgroundColor: colors.red[12],
|
||||||
|
@ -168,9 +168,9 @@ const styles = {
|
|||||||
border: 0,
|
border: 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
auditLogHeader: (theme) => ({
|
auditLogHeader: {
|
||||||
padding: theme.spacing(2, 4),
|
padding: "16px 32px",
|
||||||
}),
|
},
|
||||||
|
|
||||||
auditLogHeaderInfo: {
|
auditLogHeaderInfo: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
@ -26,7 +26,7 @@ export const CliAuthPageView: FC<CliAuthPageViewProps> = ({ sessionToken }) => {
|
|||||||
css={{
|
css={{
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
marginBottom: theme.spacing(4),
|
marginBottom: 32,
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
lineHeight: "160%",
|
lineHeight: "160%",
|
||||||
}}
|
}}
|
||||||
@ -48,7 +48,7 @@ export const CliAuthPageView: FC<CliAuthPageViewProps> = ({ sessionToken }) => {
|
|||||||
css={{
|
css={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "flex-end",
|
justifyContent: "flex-end",
|
||||||
paddingTop: theme.spacing(1),
|
paddingTop: 8,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Button component={RouterLink} size="large" to="/workspaces" fullWidth>
|
<Button component={RouterLink} size="large" to="/workspaces" fullWidth>
|
||||||
|
@ -695,18 +695,18 @@ const styles = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
optionText: (theme) => ({
|
optionText: (theme) => ({
|
||||||
fontSize: theme.spacing(2),
|
fontSize: 16,
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
optionHelperText: (theme) => ({
|
optionHelperText: (theme) => ({
|
||||||
fontSize: theme.spacing(1.5),
|
fontSize: 12,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
error: (theme) => ({
|
error: (theme) => ({
|
||||||
padding: theme.spacing(3),
|
padding: 24,
|
||||||
borderRadius: theme.spacing(1),
|
borderRadius: 8,
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
border: `1px solid ${theme.palette.error.main}`,
|
border: `1px solid ${theme.palette.error.main}`,
|
||||||
}),
|
}),
|
||||||
@ -719,13 +719,13 @@ const styles = {
|
|||||||
errorDescription: (theme) => ({
|
errorDescription: (theme) => ({
|
||||||
margin: 0,
|
margin: 0,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
marginTop: theme.spacing(0.5),
|
marginTop: 4,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
errorDetails: (theme) => ({
|
errorDetails: (theme) => ({
|
||||||
display: "block",
|
display: "block",
|
||||||
marginTop: theme.spacing(1),
|
marginTop: 8,
|
||||||
color: theme.palette.error.light,
|
color: theme.palette.error.light,
|
||||||
fontSize: theme.spacing(2),
|
fontSize: 16,
|
||||||
}),
|
}),
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -114,7 +114,7 @@ const styles = {
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
display: "block",
|
display: "block",
|
||||||
marginBottom: theme.spacing(0.5),
|
marginBottom: 4,
|
||||||
}),
|
}),
|
||||||
labelDescription: (theme) => ({
|
labelDescription: (theme) => ({
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
@ -72,12 +72,12 @@ export const CreateTokenPage: FC = () => {
|
|||||||
<p>Make sure you copy the below token before proceeding:</p>
|
<p>Make sure you copy the below token before proceeding:</p>
|
||||||
<CodeExample
|
<CodeExample
|
||||||
code={newToken?.key ?? ""}
|
code={newToken?.key ?? ""}
|
||||||
css={(theme) => ({
|
css={{
|
||||||
minHeight: "auto",
|
minHeight: "auto",
|
||||||
userSelect: "all",
|
userSelect: "all",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
marginTop: theme.spacing(3),
|
marginTop: 24,
|
||||||
})}
|
}}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -234,9 +234,9 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
|
|||||||
border: 1px solid ${theme.palette.warning.light};
|
border: 1px solid ${theme.palette.warning.light};
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background-color: ${theme.palette.background.paper};
|
background-color: ${theme.palette.background.paper};
|
||||||
padding: ${theme.spacing(10)};
|
padding: 80px;
|
||||||
margin-left: ${theme.spacing(-10)};
|
margin-left: -80px;
|
||||||
margin-right: ${theme.spacing(-10)};
|
margin-right: -80px;
|
||||||
`,
|
`,
|
||||||
}}
|
}}
|
||||||
getInputProps={(parameter, index) => {
|
getInputProps={(parameter, index) => {
|
||||||
@ -308,9 +308,9 @@ const useExternalAuthVerification = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
hasDescription: (theme) => ({
|
hasDescription: {
|
||||||
paddingBottom: theme.spacing(2),
|
paddingBottom: 16,
|
||||||
}),
|
},
|
||||||
description: (theme) => ({
|
description: (theme) => ({
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
|
@ -40,8 +40,8 @@ export const SelectedTemplate: FC<SelectedTemplateProps> = ({ template }) => {
|
|||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
template: (theme) => ({
|
template: (theme) => ({
|
||||||
padding: theme.spacing(2.5, 3),
|
padding: "20px 24px",
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
}),
|
}),
|
||||||
|
@ -134,8 +134,8 @@ export const AppearanceSettingsPageView = ({
|
|||||||
<InputAdornment
|
<InputAdornment
|
||||||
position="end"
|
position="end"
|
||||||
css={{
|
css={{
|
||||||
width: theme.spacing(3),
|
width: 24,
|
||||||
height: theme.spacing(3),
|
height: 24,
|
||||||
|
|
||||||
"& img": {
|
"& img": {
|
||||||
maxWidth: "100%",
|
maxWidth: "100%",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { css, useTheme } from "@emotion/react";
|
import { css } from "@emotion/react";
|
||||||
import Table from "@mui/material/Table";
|
import Table from "@mui/material/Table";
|
||||||
import TableBody from "@mui/material/TableBody";
|
import TableBody from "@mui/material/TableBody";
|
||||||
import TableCell from "@mui/material/TableCell";
|
import TableCell from "@mui/material/TableCell";
|
||||||
@ -18,8 +18,6 @@ export type ExternalAuthSettingsPageViewProps = {
|
|||||||
export const ExternalAuthSettingsPageView = ({
|
export const ExternalAuthSettingsPageView = ({
|
||||||
config,
|
config,
|
||||||
}: ExternalAuthSettingsPageViewProps): JSX.Element => {
|
}: ExternalAuthSettingsPageViewProps): JSX.Element => {
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Header
|
<Header
|
||||||
@ -42,8 +40,8 @@ export const ExternalAuthSettingsPageView = ({
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
css={{
|
css={{
|
||||||
marginTop: theme.spacing(3),
|
marginTop: 24,
|
||||||
marginBottom: theme.spacing(3),
|
marginBottom: 24,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Alert severity="info" actions={<EnterpriseBadge key="enterprise" />}>
|
<Alert severity="info" actions={<EnterpriseBadge key="enterprise" />}>
|
||||||
@ -56,13 +54,13 @@ export const ExternalAuthSettingsPageView = ({
|
|||||||
<Table
|
<Table
|
||||||
css={css`
|
css={css`
|
||||||
& td {
|
& td {
|
||||||
padding-top: ${theme.spacing(3)};
|
padding-top: 24px;
|
||||||
padding-bottom: ${theme.spacing(3)};
|
padding-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
& td:last-child,
|
& td:last-child,
|
||||||
& th:last-child {
|
& th:last-child {
|
||||||
padding-left: ${theme.spacing(4)};
|
padding-left: 32px;
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
|
@ -28,7 +28,7 @@ export const ChartSection: FC<PropsWithChildren<ChartSectionProps>> = ({
|
|||||||
<Paper
|
<Paper
|
||||||
css={{
|
css={{
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
}}
|
}}
|
||||||
elevation={0}
|
elevation={0}
|
||||||
>
|
>
|
||||||
@ -38,7 +38,7 @@ export const ChartSection: FC<PropsWithChildren<ChartSectionProps>> = ({
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
padding: theme.spacing(1.5, 2),
|
padding: "12px 16px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
@ -54,12 +54,7 @@ export const ChartSection: FC<PropsWithChildren<ChartSectionProps>> = ({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
<div {...contentsProps} css={{ margin: 16 }}>
|
||||||
{...contentsProps}
|
|
||||||
css={{
|
|
||||||
margin: theme.spacing(2),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft";
|
import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft";
|
||||||
@ -23,8 +22,6 @@ export const AddNewLicensePageView: FC<AddNewLicenseProps> = ({
|
|||||||
isSavingLicense,
|
isSavingLicense,
|
||||||
savingLicenseError,
|
savingLicenseError,
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
function handleFileUploaded(files: File[]) {
|
function handleFileUploaded(files: File[]) {
|
||||||
const fileReader = new FileReader();
|
const fileReader = new FileReader();
|
||||||
fileReader.onload = () => {
|
fileReader.onload = () => {
|
||||||
@ -76,7 +73,7 @@ export const AddNewLicensePageView: FC<AddNewLicenseProps> = ({
|
|||||||
description="Select a text file that contains your license key."
|
description="Select a text file that contains your license key."
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Stack css={{ paddingTop: theme.spacing(5) }}>
|
<Stack css={{ paddingTop: 40 }}>
|
||||||
<DividerWithText>or</DividerWithText>
|
<DividerWithText>or</DividerWithText>
|
||||||
|
|
||||||
<Fieldset
|
<Fieldset
|
||||||
|
@ -21,10 +21,10 @@ const styles = {
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
}),
|
}),
|
||||||
content: (theme) => ({
|
content: (theme) => ({
|
||||||
paddingTop: theme.spacing(0.5),
|
paddingTop: 4,
|
||||||
paddingBottom: theme.spacing(0.5),
|
paddingBottom: 4,
|
||||||
paddingRight: theme.spacing(2),
|
paddingRight: 16,
|
||||||
paddingLeft: theme.spacing(2),
|
paddingLeft: 16,
|
||||||
fontSize: theme.typography.h5.fontSize,
|
fontSize: theme.typography.h5.fontSize,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
}),
|
}),
|
||||||
|
@ -118,7 +118,7 @@ const styles = {
|
|||||||
}),
|
}),
|
||||||
licenseCard: (theme) => ({
|
licenseCard: (theme) => ({
|
||||||
...(theme.typography.body2 as CSSObject),
|
...(theme.typography.body2 as CSSObject),
|
||||||
padding: theme.spacing(2),
|
padding: 16,
|
||||||
}),
|
}),
|
||||||
cardContent: {},
|
cardContent: {},
|
||||||
licenseId: (theme) => ({
|
licenseId: (theme) => ({
|
||||||
@ -135,9 +135,9 @@ const styles = {
|
|||||||
licenseExpires: (theme) => ({
|
licenseExpires: (theme) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
}),
|
}),
|
||||||
expiredBadge: (theme) => ({
|
expiredBadge: {
|
||||||
marginBottom: theme.spacing(0.5),
|
marginBottom: 4,
|
||||||
}),
|
},
|
||||||
secondaryMaincolor: (theme) => ({
|
secondaryMaincolor: (theme) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
}),
|
}),
|
||||||
|
@ -128,25 +128,25 @@ const LicensesSettingsPageView: FC<Props> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
title: (theme) => ({
|
title: {
|
||||||
fontSize: theme.spacing(2),
|
fontSize: 16,
|
||||||
}),
|
},
|
||||||
|
|
||||||
root: (theme) => ({
|
root: (theme) => ({
|
||||||
minHeight: theme.spacing(30),
|
minHeight: 240,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: 8,
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
padding: theme.spacing(6),
|
padding: 48,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
description: (theme) => ({
|
description: (theme) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
maxWidth: theme.spacing(58),
|
maxWidth: 464,
|
||||||
marginTop: theme.spacing(1),
|
marginTop: 8,
|
||||||
}),
|
}),
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
|
||||||
|
@ -232,30 +232,30 @@ const styles = {
|
|||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
installAlert: (theme) => ({
|
installAlert: {
|
||||||
margin: theme.spacing(2),
|
margin: 16,
|
||||||
}),
|
},
|
||||||
|
|
||||||
links: (theme) => ({
|
links: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
gap: theme.spacing(0.5),
|
gap: 4,
|
||||||
margin: theme.spacing(2),
|
margin: 16,
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
}),
|
},
|
||||||
|
|
||||||
link: (theme) => ({
|
link: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
}),
|
},
|
||||||
|
|
||||||
status: (theme) => ({
|
status: (theme) => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
color: theme.palette.text.disabled,
|
color: theme.palette.text.disabled,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@ -263,6 +263,6 @@ const styles = {
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
gap: 4,
|
gap: 4,
|
||||||
color: theme.palette.text.disabled,
|
color: theme.palette.text.disabled,
|
||||||
margin: theme.spacing(4),
|
margin: 32,
|
||||||
}),
|
}),
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -220,7 +220,7 @@ const styles = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"& .MuiTableCell-root:last-child": {
|
"& .MuiTableCell-root:last-child": {
|
||||||
paddingRight: `${theme.spacing(2)} !important`,
|
paddingRight: `16px !important`,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
arrowRight: (theme) => ({
|
arrowRight: (theme) => ({
|
||||||
|
@ -114,7 +114,7 @@ export function HealthPageView({
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: (theme) => theme.spacing(32),
|
width: 256,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
borderRight: (theme) => `1px solid ${theme.palette.divider}`,
|
borderRight: (theme) => `1px solid ${theme.palette.divider}`,
|
||||||
}}
|
}}
|
||||||
@ -125,7 +125,7 @@ export function HealthPageView({
|
|||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
color: (theme) => theme.palette.text.secondary,
|
color: (theme) => theme.palette.text.secondary,
|
||||||
padding: (theme) => theme.spacing(1.5, 3),
|
padding: "12px 24px",
|
||||||
letterSpacing: "0.5px",
|
letterSpacing: "0.5px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -157,7 +157,7 @@ export function HealthPageView({
|
|||||||
gap: 1,
|
gap: 1,
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
height: 36,
|
height: 36,
|
||||||
padding: (theme) => theme.spacing(0, 3),
|
padding: "0 24px",
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
pointerEvents: isActive ? "none" : "auto",
|
pointerEvents: isActive ? "none" : "auto",
|
||||||
color: (theme) =>
|
color: (theme) =>
|
||||||
@ -214,15 +214,15 @@ const styles = {
|
|||||||
stats: (theme) => ({
|
stats: (theme) => ({
|
||||||
padding: 0,
|
padding: 0,
|
||||||
border: 0,
|
border: 0,
|
||||||
gap: theme.spacing(6),
|
gap: 48,
|
||||||
rowGap: theme.spacing(3),
|
rowGap: 24,
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
|
||||||
[theme.breakpoints.down("md")]: {
|
[theme.breakpoints.down("md")]: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
alignItems: "flex-start",
|
alignItems: "flex-start",
|
||||||
gap: theme.spacing(1),
|
gap: 8,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ export const IconsPage: FC = () => {
|
|||||||
title={
|
title={
|
||||||
<Box
|
<Box
|
||||||
css={{
|
css={{
|
||||||
padding: theme.spacing(1),
|
padding: 8,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
lineHeight: 1.5,
|
lineHeight: 1.5,
|
||||||
}}
|
}}
|
||||||
@ -153,14 +153,14 @@ export const IconsPage: FC = () => {
|
|||||||
wrap="wrap"
|
wrap="wrap"
|
||||||
spacing={1}
|
spacing={1}
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
css={(theme) => ({ marginTop: theme.spacing(4) })}
|
css={{ marginTop: 32 }}
|
||||||
>
|
>
|
||||||
{searchedIcons.length === 0 && (
|
{searchedIcons.length === 0 && (
|
||||||
<EmptyState message="No results matched your search" />
|
<EmptyState message="No results matched your search" />
|
||||||
)}
|
)}
|
||||||
{searchedIcons.map((icon) => (
|
{searchedIcons.map((icon) => (
|
||||||
<CopyableValue key={icon.url} value={icon.url} placement="bottom">
|
<CopyableValue key={icon.url} value={icon.url} placement="bottom">
|
||||||
<Stack alignItems="center" css={{ margin: theme.spacing(1.5) }}>
|
<Stack alignItems="center" css={{ margin: 12 }}>
|
||||||
<img
|
<img
|
||||||
alt={icon.url}
|
alt={icon.url}
|
||||||
src={icon.url}
|
src={icon.url}
|
||||||
@ -169,7 +169,7 @@ export const IconsPage: FC = () => {
|
|||||||
height: 60,
|
height: 60,
|
||||||
objectFit: "contain",
|
objectFit: "contain",
|
||||||
pointerEvents: "none",
|
pointerEvents: "none",
|
||||||
padding: theme.spacing(1.5),
|
padding: 12,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<figcaption
|
<figcaption
|
||||||
|
@ -64,31 +64,31 @@ export const LoginPageView: FC<LoginPageViewProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
root: (theme) => ({
|
root: {
|
||||||
padding: theme.spacing(3),
|
padding: 24,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
minHeight: "100%",
|
minHeight: "100%",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
}),
|
},
|
||||||
|
|
||||||
container: (theme) => ({
|
container: {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
maxWidth: 385,
|
maxWidth: 385,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(2),
|
gap: 16,
|
||||||
}),
|
},
|
||||||
|
|
||||||
icon: (theme) => ({
|
icon: {
|
||||||
fontSize: theme.spacing(8),
|
fontSize: 64,
|
||||||
}),
|
},
|
||||||
|
|
||||||
footer: (theme) => ({
|
footer: (theme) => ({
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
marginTop: theme.spacing(3),
|
marginTop: 24,
|
||||||
}),
|
}),
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
@ -4,7 +4,6 @@ import GitHubIcon from "@mui/icons-material/GitHub";
|
|||||||
import KeyIcon from "@mui/icons-material/VpnKey";
|
import KeyIcon from "@mui/icons-material/VpnKey";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import { type FC } from "react";
|
import { type FC } from "react";
|
||||||
import { useTheme } from "@emotion/react";
|
|
||||||
import { Language } from "./SignInForm";
|
import { Language } from "./SignInForm";
|
||||||
import { type AuthMethods } from "api/typesGenerated";
|
import { type AuthMethods } from "api/typesGenerated";
|
||||||
|
|
||||||
@ -19,11 +18,9 @@ export const OAuthSignInForm: FC<OAuthSignInFormProps> = ({
|
|||||||
redirectTo,
|
redirectTo,
|
||||||
authMethods,
|
authMethods,
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
const iconStyles = {
|
const iconStyles = {
|
||||||
width: theme.spacing(2),
|
width: 16,
|
||||||
height: theme.spacing(2),
|
height: 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -25,27 +25,27 @@ const styles = {
|
|||||||
root: {
|
root: {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
},
|
},
|
||||||
title: (theme) => ({
|
title: {
|
||||||
fontSize: theme.spacing(4),
|
fontSize: 32,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
margin: 0,
|
margin: 0,
|
||||||
marginBottom: theme.spacing(4),
|
marginBottom: 32,
|
||||||
lineHeight: 1,
|
lineHeight: 1,
|
||||||
|
|
||||||
"& strong": {
|
"& strong": {
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
},
|
},
|
||||||
}),
|
},
|
||||||
alert: (theme) => ({
|
alert: {
|
||||||
marginBottom: theme.spacing(4),
|
marginBottom: 32,
|
||||||
}),
|
},
|
||||||
divider: (theme) => ({
|
divider: {
|
||||||
paddingTop: theme.spacing(3),
|
paddingTop: 24,
|
||||||
paddingBottom: theme.spacing(3),
|
paddingBottom: 24,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing(2),
|
gap: 16,
|
||||||
}),
|
},
|
||||||
dividerLine: (theme) => ({
|
dividerLine: (theme) => ({
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: 1,
|
height: 1,
|
||||||
@ -58,10 +58,10 @@ const styles = {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
letterSpacing: 1,
|
letterSpacing: 1,
|
||||||
}),
|
}),
|
||||||
icon: (theme) => ({
|
icon: {
|
||||||
width: theme.spacing(2),
|
width: 16,
|
||||||
height: theme.spacing(2),
|
height: 16,
|
||||||
}),
|
},
|
||||||
} satisfies Record<string, Interpolation<Theme>>;
|
} satisfies Record<string, Interpolation<Theme>>;
|
||||||
|
|
||||||
export interface SignInFormProps {
|
export interface SignInFormProps {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user