mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: use square icon for stop button instead of pause icon (#21386)
The pause icon (`||`) for the Stop button was confusing as it suggests pause/resume functionality. Changed to a square icon (`□`) which is the standard icon for stop in media players and interfaces. ### Before <img width="100" alt="before" src="https://github.com/user-attachments/assets/77e2fee5-cb66-4b47-9a2a-0dccce5c28ca" /> ### After The button will now display a square (⬛) stop icon instead of the pause (⏸) icon. --------- Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> Co-authored-by: Jaayden Halko <jaayden@coder.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import type { WorkspaceTransition } from "api/typesGenerated";
|
import type { WorkspaceTransition } from "api/typesGenerated";
|
||||||
import { PauseIcon, PlayIcon, TrashIcon } from "lucide-react";
|
import { PlayIcon, SquareIcon, TrashIcon } from "lucide-react";
|
||||||
import type { ComponentProps } from "react";
|
import type { ComponentProps } from "react";
|
||||||
|
|
||||||
type SVGIcon = typeof PlayIcon;
|
type SVGIcon = typeof PlayIcon;
|
||||||
@@ -8,7 +8,7 @@ type SVGIconProps = ComponentProps<SVGIcon>;
|
|||||||
|
|
||||||
const iconByTransition: Record<WorkspaceTransition, SVGIcon> = {
|
const iconByTransition: Record<WorkspaceTransition, SVGIcon> = {
|
||||||
start: PlayIcon,
|
start: PlayIcon,
|
||||||
stop: PauseIcon,
|
stop: SquareIcon,
|
||||||
delete: TrashIcon,
|
delete: TrashIcon,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import {
|
|||||||
import {
|
import {
|
||||||
BanIcon,
|
BanIcon,
|
||||||
CloudIcon,
|
CloudIcon,
|
||||||
PauseIcon,
|
|
||||||
PlayIcon,
|
PlayIcon,
|
||||||
PowerIcon,
|
PowerIcon,
|
||||||
RotateCcwIcon,
|
RotateCcwIcon,
|
||||||
|
SquareIcon,
|
||||||
StarIcon,
|
StarIcon,
|
||||||
StarOffIcon,
|
StarOffIcon,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
@@ -130,7 +130,7 @@ export const StopButton: FC<ActionButtonProps> = ({
|
|||||||
onClick={() => handleAction()}
|
onClick={() => handleAction()}
|
||||||
data-testid="workspace-stop-button"
|
data-testid="workspace-stop-button"
|
||||||
>
|
>
|
||||||
<PauseIcon />
|
<SquareIcon />
|
||||||
{loading ? <>Stopping…</> : "Stop"}
|
{loading ? <>Stopping…</> : "Stop"}
|
||||||
</TopbarButton>
|
</TopbarButton>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import { TableToolbar } from "components/TableToolbar/TableToolbar";
|
|||||||
import {
|
import {
|
||||||
ChevronDownIcon,
|
ChevronDownIcon,
|
||||||
CloudIcon,
|
CloudIcon,
|
||||||
PauseIcon,
|
|
||||||
PlayIcon,
|
PlayIcon,
|
||||||
|
SquareIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { WorkspacesTable } from "pages/WorkspacesPage/WorkspacesTable";
|
import { WorkspacesTable } from "pages/WorkspacesPage/WorkspacesTable";
|
||||||
@@ -175,7 +175,7 @@ export const WorkspacesPageView: FC<WorkspacesPageViewProps> = ({
|
|||||||
}
|
}
|
||||||
onClick={onBatchStopTransition}
|
onClick={onBatchStopTransition}
|
||||||
>
|
>
|
||||||
<PauseIcon /> Stop
|
<SquareIcon /> Stop
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<DropdownMenuItem onClick={onBatchUpdateTransition}>
|
<DropdownMenuItem onClick={onBatchUpdateTransition}>
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ import {
|
|||||||
EllipsisVertical,
|
EllipsisVertical,
|
||||||
ExternalLinkIcon,
|
ExternalLinkIcon,
|
||||||
FileIcon,
|
FileIcon,
|
||||||
PauseIcon,
|
|
||||||
PlayIcon,
|
PlayIcon,
|
||||||
RefreshCcwIcon,
|
RefreshCcwIcon,
|
||||||
|
SquareIcon,
|
||||||
SquareTerminalIcon,
|
SquareTerminalIcon,
|
||||||
StarIcon,
|
StarIcon,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
@@ -491,7 +491,7 @@ const WorkspaceActionsCell: FC<WorkspaceActionsCellProps> = ({
|
|||||||
isLoading={stopWorkspaceMutation.isPending}
|
isLoading={stopWorkspaceMutation.isPending}
|
||||||
label="Stop workspace"
|
label="Stop workspace"
|
||||||
>
|
>
|
||||||
<PauseIcon />
|
<SquareIcon />
|
||||||
</PrimaryAction>
|
</PrimaryAction>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -736,7 +736,7 @@ const WorkspaceApps: FC<WorkspaceAppsProps> = ({ workspace }) => {
|
|||||||
}}
|
}}
|
||||||
label="Open Terminal"
|
label="Open Terminal"
|
||||||
>
|
>
|
||||||
<SquareTerminalIcon />
|
<SquareTerminalIcon className="!size-7" />
|
||||||
</BaseIconLink>,
|
</BaseIconLink>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import utc from "dayjs/plugin/utc";
|
|||||||
import {
|
import {
|
||||||
CircleAlertIcon,
|
CircleAlertIcon,
|
||||||
HourglassIcon,
|
HourglassIcon,
|
||||||
PauseIcon,
|
|
||||||
PlayIcon,
|
PlayIcon,
|
||||||
|
SquareIcon,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import semver from "semver";
|
import semver from "semver";
|
||||||
import { getPendingStatusLabel } from "./provisionerJob";
|
import { getPendingStatusLabel } from "./provisionerJob";
|
||||||
@@ -241,7 +241,7 @@ export const getDisplayWorkspaceStatus = (
|
|||||||
return {
|
return {
|
||||||
type: "inactive",
|
type: "inactive",
|
||||||
text: "Stopped",
|
text: "Stopped",
|
||||||
icon: <PauseIcon />,
|
icon: <SquareIcon />,
|
||||||
} as const;
|
} as const;
|
||||||
case "deleting":
|
case "deleting":
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user