mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: replace MUI icons with Lucide icons - 8 (#17778)
1. Replaced CheckOutlined with CheckIcon in: - TemplateVersionStatusBadge.tsx - TemplateEmbedPage.tsx - IntervalMenu.tsx - WeekPicker.tsx - SelectMenu.tsx 2. Replaced EditCalendarOutlined with CalendarCogIcon in: - UserSettingsPage/Sidebar.tsx - Sidebar.stories.tsx 3. Replaced LockOutlined with LockIcon in: - UserSettingsPage/Sidebar.tsx - TemplateSettingsPage/Sidebar.tsx - Sidebar.stories.tsx 4. Replaced Person with UserIcon in: - UserSettingsPage/Sidebar.tsx - Sidebar.stories.tsx 5. Replaced VpnKeyOutlined with KeyIcon in: - UserSettingsPage/Sidebar.tsx - Sidebar.stories.tsx 6. Replaced FingerprintOutlined with FingerprintIcon in: - UserSettingsPage/Sidebar.tsx - Sidebar.stories.tsx
This commit is contained in:
@ -1,4 +1,3 @@
|
|||||||
import CheckOutlined from "@mui/icons-material/CheckOutlined";
|
|
||||||
import Button, { type ButtonProps } from "@mui/material/Button";
|
import Button, { type ButtonProps } from "@mui/material/Button";
|
||||||
import MenuItem, { type MenuItemProps } from "@mui/material/MenuItem";
|
import MenuItem, { type MenuItemProps } from "@mui/material/MenuItem";
|
||||||
import MenuList, { type MenuListProps } from "@mui/material/MenuList";
|
import MenuList, { type MenuListProps } from "@mui/material/MenuList";
|
||||||
@ -12,6 +11,7 @@ import {
|
|||||||
PopoverContent,
|
PopoverContent,
|
||||||
PopoverTrigger,
|
PopoverTrigger,
|
||||||
} from "components/deprecated/Popover/Popover";
|
} from "components/deprecated/Popover/Popover";
|
||||||
|
import { CheckIcon } from "lucide-react";
|
||||||
import {
|
import {
|
||||||
Children,
|
Children,
|
||||||
type FC,
|
type FC,
|
||||||
@ -145,10 +145,7 @@ export const SelectMenuItem: FC<MenuItemProps> = (props) => {
|
|||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
{props.selected && (
|
{props.selected && (
|
||||||
<CheckOutlined
|
<CheckIcon className="size-icon-xs" css={{ marginLeft: "auto" }} />
|
||||||
// TODO: Don't set the menu icon font size on default theme
|
|
||||||
css={{ marginLeft: "auto", fontSize: "inherit !important" }}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
);
|
);
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
import ScheduleIcon from "@mui/icons-material/EditCalendarOutlined";
|
|
||||||
import FingerprintOutlinedIcon from "@mui/icons-material/FingerprintOutlined";
|
|
||||||
import SecurityIcon from "@mui/icons-material/LockOutlined";
|
|
||||||
import AccountIcon from "@mui/icons-material/Person";
|
|
||||||
import VpnKeyOutlined from "@mui/icons-material/VpnKeyOutlined";
|
|
||||||
import type { Meta, StoryObj } from "@storybook/react";
|
import type { Meta, StoryObj } from "@storybook/react";
|
||||||
import { Avatar } from "components/Avatar/Avatar";
|
import { Avatar } from "components/Avatar/Avatar";
|
||||||
|
import {
|
||||||
|
CalendarCogIcon,
|
||||||
|
FingerprintIcon,
|
||||||
|
KeyIcon,
|
||||||
|
LockIcon,
|
||||||
|
UserIcon,
|
||||||
|
} from "lucide-react";
|
||||||
import { Sidebar, SidebarHeader, SidebarNavItem } from "./Sidebar";
|
import { Sidebar, SidebarHeader, SidebarNavItem } from "./Sidebar";
|
||||||
|
|
||||||
const meta: Meta<typeof Sidebar> = {
|
const meta: Meta<typeof Sidebar> = {
|
||||||
@ -24,19 +26,19 @@ export const Default: Story = {
|
|||||||
title="Jon"
|
title="Jon"
|
||||||
subtitle="jon@coder.com"
|
subtitle="jon@coder.com"
|
||||||
/>
|
/>
|
||||||
<SidebarNavItem href="account" icon={AccountIcon}>
|
<SidebarNavItem href="account" icon={UserIcon}>
|
||||||
Account
|
Account
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="schedule" icon={ScheduleIcon}>
|
<SidebarNavItem href="schedule" icon={CalendarCogIcon}>
|
||||||
Schedule
|
Schedule
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="security" icon={SecurityIcon}>
|
<SidebarNavItem href="security" icon={LockIcon}>
|
||||||
Security
|
Security
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="ssh-keys" icon={FingerprintOutlinedIcon}>
|
<SidebarNavItem href="ssh-keys" icon={FingerprintIcon}>
|
||||||
SSH Keys
|
SSH Keys
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="tokens" icon={VpnKeyOutlined}>
|
<SidebarNavItem href="tokens" icon={KeyIcon}>
|
||||||
Tokens
|
Tokens
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import CheckOutlined from "@mui/icons-material/CheckOutlined";
|
|
||||||
import FileCopyOutlined from "@mui/icons-material/FileCopyOutlined";
|
import FileCopyOutlined from "@mui/icons-material/FileCopyOutlined";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import FormControlLabel from "@mui/material/FormControlLabel";
|
import FormControlLabel from "@mui/material/FormControlLabel";
|
||||||
@ -10,6 +9,7 @@ import { FormSection, VerticalForm } from "components/Form/Form";
|
|||||||
import { Loader } from "components/Loader/Loader";
|
import { Loader } from "components/Loader/Loader";
|
||||||
import { RichParameterInput } from "components/RichParameterInput/RichParameterInput";
|
import { RichParameterInput } from "components/RichParameterInput/RichParameterInput";
|
||||||
import { useClipboard } from "hooks/useClipboard";
|
import { useClipboard } from "hooks/useClipboard";
|
||||||
|
import { CheckIcon } from "lucide-react";
|
||||||
import { useTemplateLayoutContext } from "pages/TemplatePage/TemplateLayout";
|
import { useTemplateLayoutContext } from "pages/TemplatePage/TemplateLayout";
|
||||||
import { type FC, useEffect, useState } from "react";
|
import { type FC, useEffect, useState } from "react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
@ -187,7 +187,7 @@ export const TemplateEmbedPageView: FC<TemplateEmbedPageViewProps> = ({
|
|||||||
css={{ borderRadius: 999 }}
|
css={{ borderRadius: 999 }}
|
||||||
startIcon={
|
startIcon={
|
||||||
clipboard.showCopiedSuccess ? (
|
clipboard.showCopiedSuccess ? (
|
||||||
<CheckOutlined />
|
<CheckIcon className="size-icon-sm" />
|
||||||
) : (
|
) : (
|
||||||
<FileCopyOutlined />
|
<FileCopyOutlined />
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import CheckOutlined from "@mui/icons-material/CheckOutlined";
|
|
||||||
import ExpandMoreOutlined from "@mui/icons-material/ExpandMoreOutlined";
|
import ExpandMoreOutlined from "@mui/icons-material/ExpandMoreOutlined";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Menu from "@mui/material/Menu";
|
import Menu from "@mui/material/Menu";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import { CheckIcon } from "lucide-react";
|
||||||
import { type FC, useRef, useState } from "react";
|
import { type FC, useRef, useState } from "react";
|
||||||
|
|
||||||
const insightsIntervals = {
|
const insightsIntervals = {
|
||||||
@ -71,9 +71,7 @@ export const IntervalMenu: FC<IntervalMenuProps> = ({ value, onChange }) => {
|
|||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
<div css={{ width: 16, height: 16 }}>
|
<div css={{ width: 16, height: 16 }}>
|
||||||
{value === interval && (
|
{value === interval && <CheckIcon className="size-icon-xs" />}
|
||||||
<CheckOutlined css={{ width: 16, height: 16 }} />
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
);
|
);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import CheckOutlined from "@mui/icons-material/CheckOutlined";
|
|
||||||
import ExpandMoreOutlined from "@mui/icons-material/ExpandMoreOutlined";
|
import ExpandMoreOutlined from "@mui/icons-material/ExpandMoreOutlined";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Menu from "@mui/material/Menu";
|
import Menu from "@mui/material/Menu";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
import { differenceInWeeks } from "date-fns";
|
import { differenceInWeeks } from "date-fns";
|
||||||
|
import { CheckIcon } from "lucide-react";
|
||||||
import { type FC, useRef, useState } from "react";
|
import { type FC, useRef, useState } from "react";
|
||||||
import type { DateRangeValue } from "./DateRange";
|
import type { DateRangeValue } from "./DateRange";
|
||||||
import { lastWeeks } from "./utils";
|
import { lastWeeks } from "./utils";
|
||||||
@ -71,7 +71,7 @@ export const WeekPicker: FC<WeekPickerProps> = ({ value, onChange }) => {
|
|||||||
Last {option} weeks
|
Last {option} weeks
|
||||||
<div css={{ width: 16, height: 16 }}>
|
<div css={{ width: 16, height: 16 }}>
|
||||||
{numberOfWeeks === option && (
|
{numberOfWeeks === option && (
|
||||||
<CheckOutlined css={{ width: 16, height: 16 }} />
|
<CheckIcon className="size-icon-xs" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import VariablesIcon from "@mui/icons-material/CodeOutlined";
|
import VariablesIcon from "@mui/icons-material/CodeOutlined";
|
||||||
import SecurityIcon from "@mui/icons-material/LockOutlined";
|
|
||||||
import GeneralIcon from "@mui/icons-material/SettingsOutlined";
|
import GeneralIcon from "@mui/icons-material/SettingsOutlined";
|
||||||
import ScheduleIcon from "@mui/icons-material/TimerOutlined";
|
import ScheduleIcon from "@mui/icons-material/TimerOutlined";
|
||||||
import type { Template } from "api/typesGenerated";
|
import type { Template } from "api/typesGenerated";
|
||||||
@ -9,6 +8,7 @@ import {
|
|||||||
SidebarHeader,
|
SidebarHeader,
|
||||||
SidebarNavItem,
|
SidebarNavItem,
|
||||||
} from "components/Sidebar/Sidebar";
|
} from "components/Sidebar/Sidebar";
|
||||||
|
import { LockIcon } from "lucide-react";
|
||||||
import { linkToTemplate, useLinks } from "modules/navigation";
|
import { linkToTemplate, useLinks } from "modules/navigation";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ export const Sidebar: FC<SidebarProps> = ({ template }) => {
|
|||||||
<SidebarNavItem href="" icon={GeneralIcon}>
|
<SidebarNavItem href="" icon={GeneralIcon}>
|
||||||
General
|
General
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="permissions" icon={SecurityIcon}>
|
<SidebarNavItem href="permissions" icon={LockIcon}>
|
||||||
Permissions
|
Permissions
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="variables" icon={VariablesIcon}>
|
<SidebarNavItem href="variables" icon={VariablesIcon}>
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import CheckIcon from "@mui/icons-material/CheckOutlined";
|
|
||||||
import QueuedIcon from "@mui/icons-material/HourglassEmpty";
|
import QueuedIcon from "@mui/icons-material/HourglassEmpty";
|
||||||
import type { TemplateVersion } from "api/typesGenerated";
|
import type { TemplateVersion } from "api/typesGenerated";
|
||||||
import { Pill, PillSpinner } from "components/Pill/Pill";
|
import { Pill, PillSpinner } from "components/Pill/Pill";
|
||||||
import { CircleAlertIcon } from "lucide-react";
|
import { CheckIcon, CircleAlertIcon } from "lucide-react";
|
||||||
import type { FC, ReactNode } from "react";
|
import type { FC, ReactNode } from "react";
|
||||||
import type { ThemeRole } from "theme/roles";
|
import type { ThemeRole } from "theme/roles";
|
||||||
import { getPendingStatusLabel } from "utils/provisionerJob";
|
import { getPendingStatusLabel } from "utils/provisionerJob";
|
||||||
@ -70,7 +69,7 @@ const getStatus = (
|
|||||||
return {
|
return {
|
||||||
type: "success",
|
type: "success",
|
||||||
text: "Success",
|
text: "Success",
|
||||||
icon: <CheckIcon />,
|
icon: <CheckIcon className="size-icon-sm" />,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
import AppearanceIcon from "@mui/icons-material/Brush";
|
import AppearanceIcon from "@mui/icons-material/Brush";
|
||||||
import ScheduleIcon from "@mui/icons-material/EditCalendarOutlined";
|
|
||||||
import FingerprintOutlinedIcon from "@mui/icons-material/FingerprintOutlined";
|
|
||||||
import SecurityIcon from "@mui/icons-material/LockOutlined";
|
|
||||||
import NotificationsIcon from "@mui/icons-material/NotificationsNoneOutlined";
|
import NotificationsIcon from "@mui/icons-material/NotificationsNoneOutlined";
|
||||||
import AccountIcon from "@mui/icons-material/Person";
|
|
||||||
import VpnKeyOutlined from "@mui/icons-material/VpnKeyOutlined";
|
|
||||||
import type { User } from "api/typesGenerated";
|
import type { User } from "api/typesGenerated";
|
||||||
import { Avatar } from "components/Avatar/Avatar";
|
import { Avatar } from "components/Avatar/Avatar";
|
||||||
import { GitIcon } from "components/Icons/GitIcon";
|
import { GitIcon } from "components/Icons/GitIcon";
|
||||||
@ -13,6 +8,13 @@ import {
|
|||||||
SidebarHeader,
|
SidebarHeader,
|
||||||
SidebarNavItem,
|
SidebarNavItem,
|
||||||
} from "components/Sidebar/Sidebar";
|
} from "components/Sidebar/Sidebar";
|
||||||
|
import {
|
||||||
|
CalendarCogIcon,
|
||||||
|
FingerprintIcon,
|
||||||
|
KeyIcon,
|
||||||
|
LockIcon,
|
||||||
|
UserIcon,
|
||||||
|
} from "lucide-react";
|
||||||
import { useDashboard } from "modules/dashboard/useDashboard";
|
import { useDashboard } from "modules/dashboard/useDashboard";
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
|
|
||||||
@ -32,7 +34,7 @@ export const Sidebar: FC<SidebarProps> = ({ user }) => {
|
|||||||
title={user.username}
|
title={user.username}
|
||||||
subtitle={user.email}
|
subtitle={user.email}
|
||||||
/>
|
/>
|
||||||
<SidebarNavItem href="account" icon={AccountIcon}>
|
<SidebarNavItem href="account" icon={UserIcon}>
|
||||||
Account
|
Account
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="appearance" icon={AppearanceIcon}>
|
<SidebarNavItem href="appearance" icon={AppearanceIcon}>
|
||||||
@ -42,17 +44,17 @@ export const Sidebar: FC<SidebarProps> = ({ user }) => {
|
|||||||
External Authentication
|
External Authentication
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
{showSchedulePage && (
|
{showSchedulePage && (
|
||||||
<SidebarNavItem href="schedule" icon={ScheduleIcon}>
|
<SidebarNavItem href="schedule" icon={CalendarCogIcon}>
|
||||||
Schedule
|
Schedule
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
)}
|
)}
|
||||||
<SidebarNavItem href="security" icon={SecurityIcon}>
|
<SidebarNavItem href="security" icon={LockIcon}>
|
||||||
Security
|
Security
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="ssh-keys" icon={FingerprintOutlinedIcon}>
|
<SidebarNavItem href="ssh-keys" icon={FingerprintIcon}>
|
||||||
SSH Keys
|
SSH Keys
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="tokens" icon={VpnKeyOutlined}>
|
<SidebarNavItem href="tokens" icon={KeyIcon}>
|
||||||
Tokens
|
Tokens
|
||||||
</SidebarNavItem>
|
</SidebarNavItem>
|
||||||
<SidebarNavItem href="notifications" icon={NotificationsIcon}>
|
<SidebarNavItem href="notifications" icon={NotificationsIcon}>
|
||||||
|
Reference in New Issue
Block a user