Skip to content

Commit 24aa223

Browse files
refactor(site): adjust a few colors (#10750)
1 parent 4121121 commit 24aa223

File tree

6 files changed

+34
-9
lines changed

6 files changed

+34
-9
lines changed

site/src/components/DeploySettingsLayout/Sidebar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const SidebarNavItem: FC<
3131
position: absolute;
3232
left: 0;
3333
top: 0;
34-
background-color: ${theme.palette.secondary.dark};
34+
background-color: ${theme.palette.primary.main};
3535
border-top-left-radius: 8px;
3636
border-bottom-left-radius: 8px;
3737
}

site/src/components/SettingsLayout/Sidebar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const SidebarNavItem: FC<
5555
position: absolute;
5656
left: 0;
5757
top: 0;
58-
background-color: ${theme.palette.secondary.dark};
58+
background-color: ${theme.palette.primary.main};
5959
border-top-left-radius: 8px;
6060
border-bottom-left-radius: 8px;
6161
}

site/src/components/Tabs/Tabs.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const TabLink = (props: NavLinkProps) => {
5151
bottom: 0;
5252
height: 2px;
5353
width: 100%;
54-
background: ${theme.palette.secondary.dark};
54+
background: ${theme.palette.primary.main};
5555
position: absolute;
5656
}
5757
`;

site/src/components/UsersLayout/UsersLayout.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import { USERS_LINK } from "components/Dashboard/Navbar/NavbarView";
66
import { PageHeader, PageHeaderTitle } from "components/PageHeader/PageHeader";
77
import { useFeatureVisibility } from "hooks/useFeatureVisibility";
88
import { usePermissions } from "hooks/usePermissions";
9-
import { FC } from "react";
9+
import { FC, Suspense } from "react";
1010
import { Link as RouterLink, Outlet, useNavigate } from "react-router-dom";
1111
import { Margins } from "components/Margins/Margins";
1212
import { TabLink, Tabs } from "components/Tabs/Tabs";
13+
import { Loader } from "components/Loader/Loader";
1314

1415
export const UsersLayout: FC = () => {
1516
const { createUser: canCreateUser, createGroup: canCreateGroup } =
@@ -51,7 +52,9 @@ export const UsersLayout: FC = () => {
5152
</Tabs>
5253

5354
<Margins>
54-
<Outlet />
55+
<Suspense fallback={<Loader />}>
56+
<Outlet />
57+
</Suspense>
5558
</Margins>
5659
</>
5760
);

site/src/pages/WorkspacesPage/filter/filter.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,19 @@ const StatusOptionItem = ({
189189
};
190190

191191
const StatusIndicator: FC<{ option: StatusOption }> = ({ option }) => {
192+
const color = option.color === "notice" ? "warning" : option.color;
193+
192194
return (
193195
<Box
194196
height={8}
195197
width={8}
196198
borderRadius={9999}
197-
sx={{
198-
backgroundColor: (theme) =>
199-
(theme.palette[option.color as keyof Palette] as PaletteColor).light,
199+
css={(theme) => {
200+
return {
201+
backgroundColor: (
202+
theme.palette[color as keyof Palette] as PaletteColor
203+
).light,
204+
};
200205
}}
201206
/>
202207
);

site/src/theme/mui.ts

+18-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import {
77
BUTTON_MD_HEIGHT,
88
BUTTON_SM_HEIGHT,
99
} from "./constants";
10+
// eslint-disable-next-line no-restricted-imports -- We need MUI here
11+
import { alertClasses } from "@mui/material/Alert";
1012

1113
export type PaletteIndex =
1214
| "primary"
@@ -41,7 +43,7 @@ export let dark = createTheme({
4143
},
4244
text: {
4345
primary: colors.gray[1],
44-
secondary: colors.gray[4],
46+
secondary: colors.gray[6],
4547
disabled: colors.gray[9],
4648
},
4749
divider: colors.gray[13],
@@ -514,6 +516,21 @@ dark = createTheme(dark, {
514516
message: ({ theme }) => ({
515517
color: theme.palette.text.primary,
516518
}),
519+
outlinedWarning: {
520+
[`& .${alertClasses.icon}`]: {
521+
color: dark.palette.warning.light,
522+
},
523+
},
524+
outlinedInfo: {
525+
[`& .${alertClasses.icon}`]: {
526+
color: dark.palette.primary.light,
527+
},
528+
},
529+
outlinedError: {
530+
[`& .${alertClasses.icon}`]: {
531+
color: dark.palette.error.light,
532+
},
533+
},
517534
},
518535
},
519536
MuiAlertTitle: {

0 commit comments

Comments
 (0)