refactor(client): centralise monospace font through the theme

Add a fontFamilyMonospace token to theme.typography (ui-monospace stack with sensible fallbacks) and route the four ad-hoc fontFamily="monospace" call sites through it so the project has one source of truth.
This commit is contained in:
gorkem-bwl authored and Alex Holliday committed 2026-04-27 10:52:23 -07:00
1 parent 1dff917027
commit 7a0da57663
4 files changed
+12 -6

No files matched your search

@@ -34,7 +34,7 @@ export const MonitorStatus = ({ monitor }: { monitor: Monitor }) => {
<Typography
fontSize={typographyLevels.l}
fontWeight={"bolder"}
fontFamily={"monospace"}
fontFamily={theme.typography.fontFamilyMonospace}
overflow={"hidden"}
textOverflow={"ellipsis"}
whiteSpace={"nowrap"}
@@ -35,7 +35,7 @@ export const TableJobs = ({ jobs }: TableJobsProps) => {
content: t("common.table.headers.monitorId"),
render: (row) => (
<Typography
fontFamily="monospace"
fontFamily={theme.typography.fontFamilyMonospace}
title={String(row.monitorId)}
sx={cellSx}
>
@@ -137,7 +137,11 @@ export const TableFailedJobs = ({ metrics }: TableFailedJobsProps) => {
id: "monitorId",
content: t("common.table.headers.monitorId"),
render: (row) => {
return <Typography fontFamily={"monospace"}>{row.monitorId}</Typography>;
return (
<Typography fontFamily={theme.typography.fontFamilyMonospace}>
{row.monitorId}
</Typography>
);
},
},
{
@@ -55,7 +55,7 @@ export const TableLogs = ({ logs, logCount, page, setPage }: TableLogsProps) =>
id: "timestamp",
content: t("pages.logs.table.headers.timestamp"),
render: (row) => (
<Typography sx={{ fontFamily: "monospace" }}>
<Typography sx={{ fontFamily: theme.typography.fontFamilyMonospace }}>
{formatTimestamp(row.timestamp)}
</Typography>
),
@@ -74,7 +74,9 @@ export const TableLogs = ({ logs, logCount, page, setPage }: TableLogsProps) =>
id: "method",
content: t("pages.logs.table.headers.method"),
render: (row) => (
<Typography fontFamily={"monospace"}>{row.method || "-"}</Typography>
<Typography fontFamily={theme.typography.fontFamilyMonospace}>
{row.method || "-"}
</Typography>
),
},
{
+1 -1
View File
@@ -579,7 +579,7 @@ export const SettingsPage = () => {
<Box
component="pre"
sx={{
fontFamily: "monospace",
fontFamily: theme.typography.fontFamilyMonospace,
p: 2,
borderRadius: 1,
overflow: "auto",