diff --git a/index.html b/index.html index f4b87938..63e103ba 100644 --- a/index.html +++ b/index.html @@ -1,46 +1,81 @@ + + + - - - + + + - - - + + + + + - - - - - + + Gittensor + + - - Gittensor - - + + + + + - - - - - + + + + + + - - - - - - - - -
- - - - \ No newline at end of file + + + +
+ + + diff --git a/src/components/ContributionHeatmap.tsx b/src/components/ContributionHeatmap.tsx index 6c759ea6..fad270e0 100644 --- a/src/components/ContributionHeatmap.tsx +++ b/src/components/ContributionHeatmap.tsx @@ -3,6 +3,7 @@ import { Box, Card, Typography, Tooltip, alpha, useTheme } from '@mui/material'; import { ActivityCalendar } from 'react-activity-calendar'; import { CONTRIBUTION_HEATMAP_SCALE, + CONTRIBUTION_HEATMAP_SCALE_LIGHT, TEXT_OPACITY, scrollbarSx, } from '../theme'; @@ -39,8 +40,10 @@ const ContributionHeatmap: React.FC = ({ onDayClick, }) => { const theme = useTheme(); - const heatmapLevels = [...CONTRIBUTION_HEATMAP_SCALE]; - const heatmapTheme = { light: heatmapLevels, dark: heatmapLevels }; + const heatmapTheme = { + light: [...CONTRIBUTION_HEATMAP_SCALE_LIGHT], + dark: [...CONTRIBUTION_HEATMAP_SCALE], + }; const isEmpty = data.length === 0; const interactive = !!onDayClick; @@ -60,7 +63,7 @@ const ContributionHeatmap: React.FC = ({ = ({ > = ({ {emptySubtitle && ( = ({ { - if (pr.mergedAt) return STATUS_COLORS.merged; - if (pr.prState === 'CLOSED') return STATUS_COLORS.closed; - return STATUS_COLORS.info; +const prStateColor = ( + pr: CommitLog, + palette: { status: { merged: string; closed: string; info: string } }, +) => { + if (pr.mergedAt) return palette.status.merged; + if (pr.prState === 'CLOSED') return palette.status.closed; + return palette.status.info; }; const prStateLabel = (pr: CommitLog) => { @@ -66,7 +69,7 @@ const DayPRsPanel: React.FC = ({ date, prs, username }) => { = ({ date, prs, username }) => { @@ -95,7 +98,7 @@ const DayPRsPanel: React.FC = ({ date, prs, username }) => { }} > {dayPRs.map((pr, idx) => { - const dotColor = prStateColor(pr); + const dotColor = prStateColor(pr, theme.palette); const stateLabel = prStateLabel(pr); const detailsHref = `/miners/pr?repo=${encodeURIComponent(pr.repository)}&number=${pr.pullRequestNumber}`; const timeLabel = pr.mergedAt @@ -155,7 +158,7 @@ const DayPRsPanel: React.FC = ({ date, prs, username }) => { = ({ error, onReset, }) => { + const theme = useTheme(); const goHome = () => { window.location.assign('/dashboard'); }; @@ -50,7 +51,9 @@ const ErrorFallback: React.FC = ({ alignItems="flex-start" sx={{ maxWidth: 560, width: '100%' }} > - + void; count?: number; - color: string; + /** Status color — used as solid active background in light mode */ + color?: string; activeTextColor?: string; /** When true, button stretches to fill its container (e.g. inside a grid cell). */ fullWidth?: boolean; @@ -18,15 +19,17 @@ const FilterButton: React.FC = ({ onClick, count, color, - activeTextColor = 'text.primary', + activeTextColor, fullWidth = false, }) => (