diff --git a/components/dashboard/src/start/StartPage.tsx b/components/dashboard/src/start/StartPage.tsx index 6764c841726702..eaaf8eba6b3f6c 100644 --- a/components/dashboard/src/start/StartPage.tsx +++ b/components/dashboard/src/start/StartPage.tsx @@ -116,20 +116,11 @@ export function StartPage(props: StartPageProps) { )} {error && } {props.children} - {props.showLatestIdeWarning && ( - - This workspace is configured with the latest release (unstable) for the editor.{" "} - - Change Preferences - - - )} - {error && workspaceId && } + ); @@ -143,15 +134,33 @@ function StartError(props: { error: StartWorkspaceError }) { return

{error.message}

; } -function OrgDefaultWorkspaceWarningView(props: { workspaceId: string }) { +function WarningView(props: { workspaceId?: string; showLatestIdeWarning?: boolean; error?: StartWorkspaceError }) { const { data: imageInfo } = useDefaultWorkspaceImageQuery(props.workspaceId); - if (imageInfo?.source !== "organization") { - return null; + let useWarning: "latestIde" | "orgImage" | undefined = props.showLatestIdeWarning ? "latestIde" : undefined; + if (props.error && props.workspaceId && imageInfo?.source === "organization") { + useWarning = "orgImage"; } return ( - - A custom default workspace image is set for this organization. Contact - an organization owner or specify a different image in .gitpod.yml. - +
+ {useWarning === "latestIde" && ( + + This workspace is configured with the latest release (unstable) for the editor.{" "} + + Change Preferences + + + )} + {useWarning === "orgImage" && ( + + Could not use workspace image? Try a different workspace image + in the yaml configuration or check the default workspace image in organization settings. + + )} +
); } diff --git a/components/dashboard/src/teams/TeamSettings.tsx b/components/dashboard/src/teams/TeamSettings.tsx index 824f1a9f6040fb..e139e341f6ba34 100644 --- a/components/dashboard/src/teams/TeamSettings.tsx +++ b/components/dashboard/src/teams/TeamSettings.tsx @@ -315,6 +315,7 @@ function WorkspaceImageButton(props: {