Skip to content

Commit 1a31bc4

Browse files
committed
Still show old empty ws page for PAYG
1 parent d9b61cb commit 1a31bc4

File tree

2 files changed

+51
-97
lines changed

2 files changed

+51
-97
lines changed

components/dashboard/src/teams/EditorOptions.tsx

Lines changed: 0 additions & 86 deletions
This file was deleted.

components/dashboard/src/workspaces/EmptyWorkspacesContent.tsx

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,63 @@
77
import { LinkButton } from "@podkit/buttons/LinkButton";
88
import { Heading2, Subheading } from "@podkit/typography/Headings";
99
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";
1013

1114
export const EmptyWorkspacesContent = () => {
15+
const { data: installationConfig } = useInstallationConfiguration();
16+
const isDedicatedInstallation = !!installationConfig?.isDedicatedInstallation;
17+
18+
const handlePlay = () => {
19+
trackVideoClick("create-new-workspace");
20+
};
21+
1222
return (
1323
<div className="app-container flex flex-col space-y-2">
1424
<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>
2537
</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+
)}
2767
</div>
2868
</div>
2969
);

0 commit comments

Comments
 (0)