|
7 | 7 | import { LinkButton } from "@podkit/buttons/LinkButton"; |
8 | 8 | import { Heading2, Subheading } from "@podkit/typography/Headings"; |
9 | 9 | import { StartWorkspaceModalKeyBinding } from "../App"; |
| 10 | +import { VideoSection } from "../onboarding/VideoSection"; |
| 11 | +import { trackVideoClick } from "../Analytics"; |
| 12 | +import { useInstallationConfiguration } from "../data/installation/default-workspace-image-query"; |
10 | 13 |
|
11 | 14 | export const EmptyWorkspacesContent = () => { |
| 15 | + const { data: installationConfig } = useInstallationConfiguration(); |
| 16 | + const isDedicatedInstallation = !!installationConfig?.isDedicatedInstallation; |
| 17 | + |
| 18 | + const handlePlay = () => { |
| 19 | + trackVideoClick("create-new-workspace"); |
| 20 | + }; |
| 21 | + |
12 | 22 | return ( |
13 | 23 | <div className="app-container flex flex-col space-y-2"> |
14 | 24 | <div className="px-6 mt-16 flex flex-col xl:flex-row items-center justify-center gap-x-14 gap-y-10 min-h-96 min-w-96"> |
15 | | - <div className="flex flex-col items-center text-center justify-center"> |
16 | | - <Heading2 className="!font-semibold !text-lg">No workspaces</Heading2> |
17 | | - <Subheading className="max-w-xs xl:text-left text-center"> |
18 | | - Create a new workspace to start coding |
19 | | - </Subheading> |
20 | | - <div className="flex flex-col mt-4 w-fit"> |
21 | | - <LinkButton href={"/new"} className="gap-1.5"> |
22 | | - New Workspace{" "} |
23 | | - <span className="opacity-60 hidden md:inline">{StartWorkspaceModalKeyBinding}</span> |
24 | | - </LinkButton> |
| 25 | + {isDedicatedInstallation ? ( |
| 26 | + <div className="flex flex-col items-center text-center justify-center"> |
| 27 | + <Heading2 className="!font-semibold !text-lg">No workspaces</Heading2> |
| 28 | + <Subheading className="max-w-xs xl:text-left text-center"> |
| 29 | + Create a new workspace to start coding |
| 30 | + </Subheading> |
| 31 | + <div className="flex flex-col mt-4 w-fit"> |
| 32 | + <LinkButton href={"/new"} className="gap-1.5"> |
| 33 | + New Workspace{" "} |
| 34 | + <span className="opacity-60 hidden md:inline">{StartWorkspaceModalKeyBinding}</span> |
| 35 | + </LinkButton> |
| 36 | + </div> |
25 | 37 | </div> |
26 | | - </div> |
| 38 | + ) : ( |
| 39 | + <> |
| 40 | + <VideoSection |
| 41 | + metadataVideoTitle="Gitpod demo" |
| 42 | + playbackId="m01BUvCkTz7HzQKFoIcQmK00Rx5laLLoMViWBstetmvLs" |
| 43 | + poster="https://i.ytimg.com/vi_webp/1ZBN-b2cIB8/maxresdefault.webp" |
| 44 | + playerProps={{ onPlay: handlePlay, defaultHiddenCaptions: true }} |
| 45 | + className="w-[535px] rounded-xl" |
| 46 | + /> |
| 47 | + <div className="flex flex-col items-center xl:items-start justify-center"> |
| 48 | + <Heading2 className="mb-4 !font-semibold !text-lg">Create your first workspace</Heading2> |
| 49 | + <Subheading className="max-w-xs xl:text-left text-center"> |
| 50 | + Write code in your personal development environment that’s running in the cloud |
| 51 | + </Subheading> |
| 52 | + <span className="flex flex-col space-y-4 w-fit"> |
| 53 | + <LinkButton |
| 54 | + variant="secondary" |
| 55 | + className="mt-4 border !border-pk-content-invert-primary text-pk-content-secondary bg-pk-surface-secondary" |
| 56 | + href={"/new?showExamples=true"} |
| 57 | + > |
| 58 | + Try a configured demo repository |
| 59 | + </LinkButton> |
| 60 | + <LinkButton href={"/new"} className="gap-1.5"> |
| 61 | + Configure your own repository |
| 62 | + </LinkButton> |
| 63 | + </span> |
| 64 | + </div> |
| 65 | + </> |
| 66 | + )} |
27 | 67 | </div> |
28 | 68 | </div> |
29 | 69 | ); |
|
0 commit comments