Skip to content

Commit 7cf5ad2

Browse files
committed
remove theme.colors
1 parent 5b071f4 commit 7cf5ad2

File tree

8 files changed

+21
-74
lines changed

8 files changed

+21
-74
lines changed

site/src/AppRouter.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import WorkspacesPage from "./pages/WorkspacesPage/WorkspacesPage";
2121
import UserSettingsLayout from "./pages/UserSettingsPage/Layout";
2222
import { TemplateSettingsLayout } from "./pages/TemplateSettingsPage/TemplateSettingsLayout";
2323
import { WorkspaceSettingsLayout } from "./pages/WorkspaceSettingsPage/WorkspaceSettingsLayout";
24+
import { ThemeOverride } from "contexts/ThemeProvider";
25+
import themes from "theme";
2426

2527
// Lazy load pages
2628
// - Pages that are secondary, not in the main navigation or not usually accessed
@@ -384,7 +386,11 @@ export const AppRouter: FC = () => {
384386
/>
385387
<Route
386388
path="/:username/:workspace/terminal"
387-
element={<TerminalPage />}
389+
element={
390+
<ThemeOverride theme={themes.dark}>
391+
<TerminalPage />
392+
</ThemeOverride>
393+
}
388394
/>
389395
<Route path="/cli-auth" element={<CliAuthenticationPage />} />
390396
<Route path="/icons" element={<IconsPage />} />

site/src/components/Dashboard/DeploymentBanner/DeploymentBannerView.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { TerminalIcon } from "components/Icons/TerminalIcon";
3636
import { RocketIcon } from "components/Icons/RocketIcon";
3737
import ErrorIcon from "@mui/icons-material/ErrorOutline";
3838
import { MONOSPACE_FONT_FAMILY } from "theme/constants";
39+
import colors from "theme/tailwind";
3940
import { getDisplayWorkspaceStatus } from "utils/workspace";
4041
import { HelpTooltipTitle } from "components/HelpTooltip/HelpTooltip";
4142
import { Stack } from "components/Stack/Stack";
@@ -439,9 +440,9 @@ const styles = {
439440
height: 16px;
440441
}
441442
`,
442-
unhealthy: (theme) => css`
443-
background-color: ${theme.colors.red[10]};
444-
`,
443+
unhealthy: (theme) => ({
444+
backgroundColor: colors.red[700],
445+
}),
445446
group: css`
446447
display: flex;
447448
align-items: center;

site/src/components/IconField/IconField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
102102
styles={css`
103103
em-emoji-picker {
104104
--rgb-background: ${theme.palette.background.paper};
105-
--rgb-input: ${theme.colors.gray[17]};
106-
--rgb-color: ${theme.colors.gray[4]};
105+
--rgb-input: ${theme.palette.primary.main};
106+
--rgb-color: ${theme.palette.text.primary};
107107
108108
// Hack to prevent the right side from being cut off
109109
width: 350px;

site/src/pages/TemplatePage/TemplateInsightsPage/TemplateInsightsPage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,10 @@ const TemplateUsagePanel: FC<TemplateUsagePanelProps> = ({
420420
const totalInSeconds =
421421
validUsage?.reduce((total, usage) => total + usage.seconds, 0) ?? 1;
422422
const usageColors = chroma
423-
.scale([theme.colors.green[8], theme.colors.blue[8]])
423+
.scale([
424+
theme.experimental.roles.success.fill,
425+
theme.experimental.roles.notice.fill,
426+
])
424427
.mode("lch")
425428
.colors(validUsage?.length ?? 0);
426429
// The API returns a row for each app, even if the user didn't use it.

site/src/pages/TerminalPage/TerminalPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const TerminalPage: FC = () => {
108108
fontFamily: MONOSPACE_FONT_FAMILY,
109109
fontSize: 16,
110110
theme: {
111-
background: theme.colors.gray[16],
111+
background: theme.palette.background.default,
112112
},
113113
});
114114
if (renderer === "webgl") {

site/src/pages/WorkspacesPage/LastUsed.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const LastUsed: FC<LastUsedProps> = ({ lastUsedAt }) => {
4040
);
4141

4242
if (t.isAfter(now.subtract(1, "hour"))) {
43-
circle = <Circle color={theme.colors.green[9]} />;
43+
circle = <Circle color={theme.experimental.roles.success.fill} />;
4444
// Since the agent reports on a 10m interval,
4545
// the last_used_at can be inaccurate when recent.
4646
message = "Now";
@@ -49,15 +49,14 @@ export const LastUsed: FC<LastUsedProps> = ({ lastUsedAt }) => {
4949
} else if (t.isAfter(now.subtract(1, "month"))) {
5050
circle = <Circle color={theme.palette.warning.light} />;
5151
} else if (t.isAfter(now.subtract(100, "year"))) {
52-
circle = <Circle color={theme.colors.red[10]} />;
52+
circle = <Circle color={theme.experimental.roles.error.fill} />;
5353
} else {
54-
// color = theme.palette.error.light
5554
message = "Never";
5655
}
5756

5857
return (
5958
<Stack
60-
css={{ color: theme.palette.text.secondary }}
59+
style={{ color: theme.palette.text.secondary }}
6160
direction="row"
6261
spacing={1}
6362
alignItems="center"

site/src/theme/colors.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

site/src/theme/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ import dark from "./dark";
44
import darkBlue from "./darkBlue";
55
import light from "./light";
66
import type { NewTheme } from "./experimental";
7-
import type { Colors } from "./colors";
87

98
export interface Theme extends MuiTheme {
10-
colors: Colors;
119
experimental: NewTheme;
1210
monaco: monaco.editor.IStandaloneThemeData;
1311
}

0 commit comments

Comments
 (0)