From 6127fca802705ecaef13ad2312667c863729eb7f Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Wed, 12 Feb 2025 23:49:34 +0000 Subject: [PATCH 1/3] fix: change resource icon colors based on theme --- .../WorkspacesPage/BatchDeleteConfirmation.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx b/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx index 582b35d30eec6..ef0ba41787a2e 100644 --- a/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx +++ b/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx @@ -45,9 +45,8 @@ export const BatchDeleteConfirmation: FC = ({ } }; - const workspaceCount = `${checkedWorkspaces.length} ${ - checkedWorkspaces.length === 1 ? "workspace" : "workspaces" - }`; + const workspaceCount = `${checkedWorkspaces.length} ${checkedWorkspaces.length === 1 ? "workspace" : "workspaces" + }`; let confirmText: ReactNode = <>Review selected workspaces…; if (stage === "workspaces") { @@ -57,9 +56,8 @@ export const BatchDeleteConfirmation: FC = ({ const resources = checkedWorkspaces .map((workspace) => workspace.latest_build.resources.length) .reduce((a, b) => a + b, 0); - const resourceCount = `${resources} ${ - resources === 1 ? "resource" : "resources" - }`; + const resourceCount = `${resources} ${resources === 1 ? "resource" : "resources" + }`; confirmText = ( <> Delete {workspaceCount} and {resourceCount} @@ -247,7 +245,12 @@ const Resources: FC = ({ workspaces }) => { > {Object.entries(resources).map(([type, summary]) => ( - +
{summary.count} {type} From 956ffa32ff50def1343f7779a417c3f251064faf Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Thu, 13 Feb 2025 00:04:36 +0000 Subject: [PATCH 2/3] chore: format --- .../BatchDeleteConfirmation.tsx | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx b/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx index ef0ba41787a2e..2bbf60f9faf5d 100644 --- a/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx +++ b/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx @@ -45,8 +45,9 @@ export const BatchDeleteConfirmation: FC = ({ } }; - const workspaceCount = `${checkedWorkspaces.length} ${checkedWorkspaces.length === 1 ? "workspace" : "workspaces" - }`; + const workspaceCount = `${checkedWorkspaces.length} ${ + checkedWorkspaces.length === 1 ? "workspace" : "workspaces" + }`; let confirmText: ReactNode = <>Review selected workspaces…; if (stage === "workspaces") { @@ -56,8 +57,9 @@ export const BatchDeleteConfirmation: FC = ({ const resources = checkedWorkspaces .map((workspace) => workspace.latest_build.resources.length) .reduce((a, b) => a + b, 0); - const resourceCount = `${resources} ${resources === 1 ? "resource" : "resources" - }`; + const resourceCount = `${resources} ${ + resources === 1 ? "resource" : "resources" + }`; confirmText = ( <> Delete {workspaceCount} and {resourceCount} @@ -245,12 +247,16 @@ const Resources: FC = ({ workspaces }) => { > {Object.entries(resources).map(([type, summary]) => ( -
+
{summary.count} {type} From 438878c387a70fc7703d93a959b351c411d2cac3 Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Thu, 13 Feb 2025 22:23:21 +0000 Subject: [PATCH 3/3] fix: use ExternalImage component --- .../WorkspacesPage/BatchDeleteConfirmation.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx b/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx index 2bbf60f9faf5d..a4a79c0c1e91f 100644 --- a/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx +++ b/site/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx @@ -4,6 +4,7 @@ import ScheduleIcon from "@mui/icons-material/Schedule"; import { visuallyHidden } from "@mui/utils"; import type { Workspace } from "api/typesGenerated"; import { ConfirmDialog } from "components/Dialogs/ConfirmDialog/ConfirmDialog"; +import { ExternalImage } from "components/ExternalImage/ExternalImage"; import { Stack } from "components/Stack/Stack"; import dayjs from "dayjs"; import relativeTime from "dayjs/plugin/relativeTime"; @@ -247,15 +248,10 @@ const Resources: FC = ({ workspaces }) => { > {Object.entries(resources).map(([type, summary]) => ( -
{summary.count} {type}