Skip to content

Commit cf51f13

Browse files
committed
Chosmetic changes
1 parent 7fbca62 commit cf51f13

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

site/src/pages/WorkspacePage/WorkspaceActions/Buttons.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import ReplayIcon from "@mui/icons-material/Replay";
77
import BlockIcon from "@mui/icons-material/Block";
88
import OutlinedBlockIcon from "@mui/icons-material/BlockOutlined";
99
import PowerSettingsNewIcon from "@mui/icons-material/PowerSettingsNew";
10-
import RetryIcon from "@mui/icons-material/BuildOutlined";
11-
import RetryDebugIcon from "@mui/icons-material/BugReportOutlined";
10+
import RetryIcon from "@mui/icons-material/CachedOutlined";
11+
import DebugIcon from "@mui/icons-material/BugReportOutlined";
1212
import Star from "@mui/icons-material/Star";
1313
import StarBorder from "@mui/icons-material/StarBorder";
1414
import { type FC } from "react";
@@ -175,20 +175,22 @@ export const DisabledButton: FC<DisabledButtonProps> = ({ label }) => {
175175
);
176176
};
177177

178-
type RetryButtonProps = Omit<ActionButtonProps, "loading"> & {
179-
debug?: boolean;
178+
type RetryButtonProps = Omit<ActionButtonProps, "loading">;
179+
180+
export const RetryButton: FC<RetryButtonProps> = ({ handleAction }) => {
181+
return (
182+
<TopbarButton startIcon={<RetryIcon />} onClick={() => handleAction()}>
183+
Retry
184+
</TopbarButton>
185+
);
180186
};
181187

182-
export const RetryButton: FC<RetryButtonProps> = ({
183-
handleAction,
184-
debug = false,
185-
}) => {
188+
type DebugButtonProps = Omit<ActionButtonProps, "loading">;
189+
190+
export const DebugButton: FC<DebugButtonProps> = ({ handleAction }) => {
186191
return (
187-
<TopbarButton
188-
startIcon={debug ? <RetryDebugIcon /> : <RetryIcon />}
189-
onClick={() => handleAction()}
190-
>
191-
Retry{debug && " (Debug)"}
192+
<TopbarButton startIcon={<DebugIcon />} onClick={() => handleAction()}>
193+
Debug
192194
</TopbarButton>
193195
);
194196
};

site/src/pages/WorkspacePage/WorkspaceActions/WorkspaceActions.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
ActivateButton,
1414
RetryButton,
1515
FavoriteButton,
16+
DebugButton,
1617
} from "./Buttons";
1718

1819
import Divider from "@mui/material/Divider";
@@ -41,7 +42,7 @@ export interface WorkspaceActionsProps {
4142
handleSettings: () => void;
4243
handleChangeVersion: () => void;
4344
handleRetry: () => void;
44-
handleRetryDebug: () => void;
45+
handleDebug: () => void;
4546
handleDormantActivate: () => void;
4647
isUpdating: boolean;
4748
isRestarting: boolean;
@@ -62,7 +63,7 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({
6263
handleCancel,
6364
handleSettings,
6465
handleRetry,
65-
handleRetryDebug,
66+
handleDebug,
6667
handleChangeVersion,
6768
handleDormantActivate,
6869
isUpdating,
@@ -133,7 +134,7 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({
133134
activate: <ActivateButton handleAction={handleDormantActivate} />,
134135
activating: <ActivateButton loading handleAction={handleDormantActivate} />,
135136
retry: <RetryButton handleAction={handleRetry} />,
136-
retryDebug: <RetryButton debug handleAction={handleRetryDebug} />,
137+
retryDebug: <DebugButton handleAction={handleDebug} />,
137138
toggleFavorite: (
138139
<FavoriteButton
139140
workspaceID={workspace.id}

site/src/pages/WorkspacePage/WorkspaceTopbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
267267
handleCancel={handleCancel}
268268
handleSettings={handleSettings}
269269
handleRetry={handleBuildRetry}
270-
handleRetryDebug={handleBuildRetryDebug}
270+
handleDebug={handleBuildRetryDebug}
271271
handleChangeVersion={handleChangeVersion}
272272
handleDormantActivate={handleDormantActivate}
273273
handleToggleFavorite={handleToggleFavorite}

0 commit comments

Comments
 (0)