Path: blob/main/components/dashboard/src/workspaces/EmptyWorkspacesContent.tsx
2500 views
/**1* Copyright (c) 2023 Gitpod GmbH. All rights reserved.2* Licensed under the GNU Affero General Public License (AGPL).3* See License.AGPL.txt in the project root for license information.4*/56import { LinkButton } from "@podkit/buttons/LinkButton";7import { Heading2, Subheading } from "@podkit/typography/Headings";8import { StartWorkspaceModalKeyBinding } from "../App";9import { VideoSection } from "../onboarding/VideoSection";10import { trackVideoClick } from "../Analytics";11import { useInstallationConfiguration } from "../data/installation/installation-config-query";1213export const EmptyWorkspacesContent = () => {14const { data: installationConfig } = useInstallationConfiguration();15const isDedicatedInstallation = !!installationConfig?.isDedicatedInstallation;1617const handlePlay = () => {18trackVideoClick("create-new-workspace");19};2021return (22<div className="app-container flex flex-col space-y-2">23<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">24{isDedicatedInstallation ? (25<div className="flex flex-col items-center text-center justify-center">26<Heading2 className="!font-semibold !text-lg">No workspaces</Heading2>27<Subheading className="max-w-xs xl:text-left text-center">28Create a new workspace to start coding29</Subheading>30<div className="flex flex-col mt-4 w-fit">31<LinkButton href={"/new"} className="gap-1.5">32New Workspace{" "}33<span className="opacity-60 hidden md:inline">{StartWorkspaceModalKeyBinding}</span>34</LinkButton>35</div>36</div>37) : (38<>39<VideoSection40metadataVideoTitle="Gitpod demo"41playbackId="m01BUvCkTz7HzQKFoIcQmK00Rx5laLLoMViWBstetmvLs"42poster="https://i.ytimg.com/vi_webp/1ZBN-b2cIB8/maxresdefault.webp"43playerProps={{ onPlay: handlePlay, defaultHiddenCaptions: true }}44className="w-[535px] rounded-xl"45/>46<div className="flex flex-col items-center xl:items-start justify-center">47<Heading2 className="mb-4 !font-semibold !text-lg">Create your first workspace</Heading2>48<Subheading className="max-w-xs xl:text-left text-center">49Write code in your personal development environment that’s running in the cloud50</Subheading>51<span className="flex flex-col space-y-4 w-fit">52<LinkButton53variant="secondary"54className="mt-4 border !border-pk-content-invert-primary text-pk-content-secondary bg-pk-surface-secondary"55href={"/new?showExamples=true"}56>57Try a configured demo repository58</LinkButton>59<LinkButton href={"/new"} className="gap-1.5">60Configure your own repository61</LinkButton>62</span>63</div>64</>65)}66</div>67</div>68);69};707172