nuke theme
This commit is contained in:
1 parent
32fbb8f434
commit
dd463bb60b
83 files changed
+225
-349
No files matched your search
@@ -41,12 +41,12 @@ export const BaseChart: React.FC<BaseChartProps> = ({
|
||||
justifyContent: "center",
|
||||
width: 34,
|
||||
height: 34,
|
||||
backgroundColor: theme.palette.primary.veryLowContrast,
|
||||
backgroundColor: theme.palette.action.hover,
|
||||
"& svg": {
|
||||
width: 20,
|
||||
height: 20,
|
||||
"& path": {
|
||||
stroke: theme.palette.primary.contrastTextTertiary,
|
||||
stroke: theme.palette.text.secondary,
|
||||
},
|
||||
},
|
||||
}}
|
||||
|
||||
@@ -41,7 +41,7 @@ export const ChartAvgResponse = ({
|
||||
>
|
||||
<RadialBar
|
||||
dataKey="value"
|
||||
background={{ fill: theme.palette[palette].lowContrast }}
|
||||
background={{ fill: theme.palette[palette].light }}
|
||||
>
|
||||
<Cell visibility={"hidden"} />
|
||||
<Cell fill={theme.palette[palette].main} />
|
||||
|
||||
@@ -61,7 +61,7 @@ export const ChartPageSpeedReport = ({ latestCheck }: { latestCheck: any }) => {
|
||||
{
|
||||
value: 100,
|
||||
fill: alpha(
|
||||
theme.palette[pageSpeedPalette].lowContrast || "#ffffff",
|
||||
theme.palette[pageSpeedPalette].light || "#ffffff",
|
||||
0.6
|
||||
),
|
||||
stroke: "none",
|
||||
|
||||
@@ -24,7 +24,7 @@ const MetricBox = ({
|
||||
sx={{
|
||||
border: 1,
|
||||
borderStyle: "solid",
|
||||
borderColor: theme.palette.primary.lowContrast,
|
||||
borderColor: theme.palette.divider,
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
}}
|
||||
>
|
||||
@@ -37,7 +37,7 @@ const MetricBox = ({
|
||||
</Stack>
|
||||
<Box
|
||||
width={4}
|
||||
bgcolor={theme.palette[palette].lowContrast}
|
||||
bgcolor={theme.palette[palette].light}
|
||||
sx={{
|
||||
borderTopRightRadius: theme.shape.borderRadius,
|
||||
borderBottomRightRadius: theme.shape.borderRadius,
|
||||
|
||||
@@ -38,7 +38,7 @@ export const XTick: React.FC<XTickProps> = ({ x, y, payload, range }) => {
|
||||
x={x}
|
||||
y={y + 10}
|
||||
textAnchor="middle"
|
||||
fill={theme.palette.primary.contrastTextTertiary}
|
||||
fill={theme.palette.text.secondary}
|
||||
fontSize={11}
|
||||
fontWeight={400}
|
||||
>
|
||||
@@ -98,7 +98,7 @@ export const ChartResponseTime = ({
|
||||
<ResponsiveContainer width="100%" height={300}>
|
||||
<AreaChart data={normalized?.slice().reverse()}>
|
||||
<CartesianGrid
|
||||
stroke={theme.palette.primary.lowContrast}
|
||||
stroke={theme.palette.divider}
|
||||
strokeWidth={1}
|
||||
strokeOpacity={1}
|
||||
fill="transparent"
|
||||
@@ -108,12 +108,12 @@ export const ChartResponseTime = ({
|
||||
<linearGradient id="colorUv" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop
|
||||
offset="0%"
|
||||
stopColor={theme.palette.accent.main}
|
||||
stopColor={theme.palette.primary.main}
|
||||
stopOpacity={0.8}
|
||||
/>
|
||||
<stop
|
||||
offset="100%"
|
||||
stopColor={theme.palette.accent.light}
|
||||
stopColor={theme.palette.primary.light}
|
||||
stopOpacity={0}
|
||||
/>
|
||||
</linearGradient>
|
||||
@@ -138,7 +138,7 @@ export const ChartResponseTime = ({
|
||||
<Area
|
||||
type="monotone"
|
||||
dataKey="normalResponseTime"
|
||||
stroke={theme.palette.accent.main}
|
||||
stroke={theme.palette.primary.main}
|
||||
fill="url(#colorUv)"
|
||||
/>
|
||||
</AreaChart>
|
||||
|
||||
@@ -145,7 +145,7 @@ export const HistogramInfrastructure = ({
|
||||
<YAxis domain={title === "temp" ? tempYDomain : yDomain} />
|
||||
|
||||
<CartesianGrid
|
||||
stroke={theme.palette.primary.lowContrast}
|
||||
stroke={theme.palette.divider}
|
||||
strokeWidth={1}
|
||||
strokeOpacity={1}
|
||||
fill="transparent"
|
||||
|
||||
@@ -68,14 +68,14 @@ export const HistogramPageSpeed = ({
|
||||
style={{ cursor: "pointer" }}
|
||||
>
|
||||
<CartesianGrid
|
||||
stroke={theme.palette.primary.lowContrast}
|
||||
stroke={theme.palette.divider}
|
||||
strokeWidth={1}
|
||||
strokeOpacity={1}
|
||||
fill="transparent"
|
||||
vertical={false}
|
||||
/>
|
||||
<Tooltip
|
||||
cursor={{ stroke: theme.palette.primary.lowContrast }}
|
||||
cursor={{ stroke: theme.palette.divider }}
|
||||
content={<HistogramPageSpeedTooltip />}
|
||||
/>
|
||||
<defs>
|
||||
|
||||
@@ -12,10 +12,7 @@ import { HistogramPageSpeedScoresTooltip } from "./HistogramPageSpeedScoresToolt
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
import type { GroupedCheck } from "@/types/check";
|
||||
import type { Palette } from "@mui/material/styles";
|
||||
type PaletteColorKey = Extract<
|
||||
keyof Palette,
|
||||
"primary" | "secondary" | "success" | "warning" | "accent"
|
||||
>;
|
||||
type PaletteColorKey = Extract<keyof Palette, "primary" | "secondary" | "success" | "warning">;
|
||||
|
||||
export interface ConfigItem {
|
||||
id: string;
|
||||
@@ -42,7 +39,7 @@ const config: Record<string, ConfigItem> = {
|
||||
accessibility: {
|
||||
id: "accessibility",
|
||||
text: "accessibility",
|
||||
palette: "accent",
|
||||
palette: "secondary",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -57,20 +54,20 @@ export const HistogramPageSpeedScores = ({
|
||||
<ResponsiveContainer width="100%" minWidth={25} height={215}>
|
||||
<AreaChart data={checks}>
|
||||
<CartesianGrid
|
||||
stroke={theme.palette.primary.lowContrast}
|
||||
stroke={theme.palette.divider}
|
||||
strokeWidth={1}
|
||||
strokeOpacity={1}
|
||||
fill="transparent"
|
||||
vertical={false}
|
||||
/>
|
||||
<Tooltip
|
||||
cursor={{ stroke: theme.palette.primary.lowContrast }}
|
||||
cursor={{ stroke: theme.palette.divider }}
|
||||
content={<HistogramPageSpeedScoresTooltip config={config} />}
|
||||
/>
|
||||
<defs>
|
||||
{Object.values(config).map(({ id, palette }) => {
|
||||
const startColor = theme.palette[palette].main;
|
||||
const endColor = theme.palette[palette].lowContrast;
|
||||
const endColor = theme.palette[palette].light;
|
||||
|
||||
return (
|
||||
<linearGradient id={id} x1="0" y1="0" x2="0" y2="1" key={id}>
|
||||
|
||||
@@ -26,7 +26,7 @@ export const HistogramPageSpeedScoresTooltip = ({
|
||||
sx={{
|
||||
backgroundColor: theme.palette.primary.main,
|
||||
border: 1,
|
||||
borderColor: theme.palette.primary.lowContrast,
|
||||
borderColor: theme.palette.divider,
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
py: theme.spacing(2),
|
||||
px: theme.spacing(4),
|
||||
@@ -34,7 +34,7 @@ export const HistogramPageSpeedScoresTooltip = ({
|
||||
>
|
||||
<Typography
|
||||
sx={{
|
||||
color: theme.palette.primary.contrastTextTertiary,
|
||||
color: theme.palette.text.secondary,
|
||||
fontSize: 12,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
|
||||
@@ -19,7 +19,7 @@ export const HistogramPageSpeedTooltip = ({
|
||||
sx={{
|
||||
backgroundColor: theme.palette.secondary.main,
|
||||
border: 1,
|
||||
borderColor: theme.palette.primary.lowContrast,
|
||||
borderColor: theme.palette.divider,
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
p: theme.spacing(4),
|
||||
}}
|
||||
|
||||
@@ -34,7 +34,7 @@ const XLabel = ({
|
||||
dy={-3}
|
||||
textAnchor="start"
|
||||
fontSize={11}
|
||||
fill={theme.palette.primary.contrastTextTertiary}
|
||||
fill={theme.palette.text.secondary}
|
||||
>
|
||||
{formatDateWithTz(p1._id, dateFormat, uiTimezone)}
|
||||
</text>
|
||||
@@ -44,7 +44,7 @@ const XLabel = ({
|
||||
dy={-3}
|
||||
textAnchor="end"
|
||||
fontSize={11}
|
||||
fill={theme.palette.primary.contrastTextTertiary}
|
||||
fill={theme.palette.text.secondary}
|
||||
>
|
||||
{formatDateWithTz(p2._id, dateFormat, uiTimezone)}
|
||||
</text>
|
||||
@@ -118,7 +118,7 @@ export const HistogramStatus = ({
|
||||
<ResponsiveContainer width="100%" height={155}>
|
||||
<BarChart data={normalChecks}>
|
||||
<XAxis
|
||||
stroke={theme.palette.primary.lowContrast}
|
||||
stroke={theme.palette.divider}
|
||||
height={15}
|
||||
tick={false}
|
||||
label={
|
||||
|
||||
@@ -32,7 +32,7 @@ export const MonitorStatus = ({ monitor }: { monitor: IMonitor }) => {
|
||||
<Stack direction="row" alignItems={"center"} gap={theme.spacing(4)}>
|
||||
<PulseDot color={getStatusColor(monitor.status, theme)} />
|
||||
<Typography
|
||||
color={theme.palette.primary.contrastTextSecondary}
|
||||
color={theme.palette.text.secondary}
|
||||
fontSize={typographyLevels.l}
|
||||
fontWeight={"bolder"}
|
||||
fontFamily={"monospace"}
|
||||
|
||||
Reference in new issue
Block a user