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