Skip to content

refactor(site): add minor tweaks to the workspace delete dialog #10758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions site/src/components/Dialogs/Dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import MuiDialog, { DialogProps as MuiDialogProps } from "@mui/material/Dialog";
import { type ReactNode } from "react";
import { colors } from "theme/colors";
import { ConfirmDialogType } from "./types";
import { type Interpolation, type Theme } from "@emotion/react";
import LoadingButton, { LoadingButtonProps } from "@mui/lab/LoadingButton";
Expand Down Expand Up @@ -73,24 +72,24 @@ export const DialogActionButtons: React.FC<DialogActionButtonsProps> = ({
const styles = {
warningButton: (theme) => ({
"&.MuiButton-contained": {
backgroundColor: colors.orange[12],
borderColor: colors.orange[9],
backgroundColor: theme.palette.warning.main,
borderColor: theme.palette.warning.main,

"&:not(.MuiLoadingButton-loading)": {
color: theme.palette.text.primary,
},

"&:hover:not(:disabled)": {
backgroundColor: colors.orange[9],
borderColor: colors.orange[9],
backgroundColor: theme.palette.warning.main,
borderColor: theme.palette.warning.main,
},

"&.Mui-disabled": {
backgroundColor: colors.orange[14],
borderColor: colors.orange[15],
backgroundColor: theme.palette.warning.dark,
borderColor: theme.palette.warning.dark,

"&:not(.MuiLoadingButton-loading)": {
color: colors.orange[12],
color: theme.palette.warning.main,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ const styles = {
workspaceInfo: (theme) => ({
display: "flex",
justifyContent: "space-between",
backgroundColor: colors.gray[14],
backgroundColor: theme.palette.background.paperLight,
border: `1px solid ${theme.palette.divider}`,
borderRadius: 8,
padding: 12,
borderRadius: 6,
padding: 16,
marginBottom: 20,
lineHeight: "1.3em",

"& .name": {
fontSize: 18,
fontWeight: 800,
fontSize: 16,
fontWeight: 600,
color: theme.palette.text.primary,
},

"& .label": {
fontSize: 11,
fontSize: 12,
color: theme.palette.text.secondary,
},

"& .info": {
fontSize: 14,
fontSize: 12,
fontWeight: 500,
color: theme.palette.text.primary,
},
Expand All @@ -44,6 +44,7 @@ const styles = {
border: `1px solid ${colors.orange[11]}`,
borderRadius: 8,
padding: 12,
gap: 8,
lineHeight: "18px",

"& .option": {
Expand All @@ -54,9 +55,8 @@ const styles = {
},

"& .info": {
fontSize: "14px",
color: colors.orange[10],
fontWeight: 500,
fontSize: 14,
fontWeight: 600,
},
}),
} satisfies Record<string, Interpolation<Theme>>;
Expand Down Expand Up @@ -112,7 +112,7 @@ export const WorkspaceDeleteDialog = (props: WorkspaceDeleteDialogProps) => {
<p className="name">{workspace.name}</p>
<p className="label">workspace</p>
</div>
<div>
<div css={{ textAlign: "right" }}>
<p className="info">{workspaceBuildDateStr}</p>
<p className="label">created</p>
</div>
Expand Down Expand Up @@ -167,7 +167,7 @@ export const WorkspaceDeleteDialog = (props: WorkspaceDeleteDialogProps) => {
</div>
<div css={{ flexDirection: "column" }}>
<p className="info">Orphan resources</p>
<span css={{ fontSize: "11px" }}>
<span css={{ fontSize: 12, marginTop: 4, display: "block" }}>
Skip resource cleanup. Resources such as volumes and virtual
machines will not be destroyed.&nbsp;
<Link
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/WorkspacesPage/WorkspacesPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export const WorkspacesPageView = ({
</MoreMenuItem>
<Divider />
<MoreMenuItem danger onClick={onDeleteAll}>
<DeleteOutlined /> Delete
<DeleteOutlined /> Delete&hellip;
</MoreMenuItem>
</MoreMenuContent>
</MoreMenu>
Expand Down