@@ -35,6 +35,7 @@ import { trackVideoClick } from "../Analytics";
3535import { useSuggestedRepositories } from "../data/git-providers/suggested-repositories-query" ;
3636import { useUserLoader } from "../hooks/use-user-loader" ;
3737import { cn } from "@podkit/lib/cn" ;
38+ import { useInstallationConfiguration } from "../data/installation/default-workspace-image-query" ;
3839
3940const WorkspacesPage : FunctionComponent = ( ) => {
4041 const [ limit , setLimit ] = useState ( 50 ) ;
@@ -73,6 +74,9 @@ const WorkspacesPage: FunctionComponent = () => {
7374 trackVideoClick ( "create-new-workspace" ) ;
7475 } ;
7576
77+ const { data : installationConfig } = useInstallationConfiguration ( ) ;
78+ const isDedicatedInstallation = ! ! installationConfig ?. isDedicatedInstallation ;
79+
7680 const { data : suggestedRepos } = useSuggestedRepositories ( { excludeConfigurations : false } ) ;
7781
7882 const recentRepos = useMemo ( ( ) => {
@@ -136,84 +140,98 @@ const WorkspacesPage: FunctionComponent = () => {
136140 subtitle = "Manage, start and stop your personal development environments in the cloud."
137141 />
138142
139- < Subheading className = "font-semibold text-pk-content-primary mt-4 mb-2 lg:px-28 px-4" >
140- Getting started
141- </ Subheading >
142-
143- < div className = "flex flex-wrap gap-5 lg:px-28 px-4" >
144- < Card onClick = { ( ) => setVideoModalVisible ( true ) } >
145- < GraduationCap className = "flex-shrink-0" size = { 24 } />
146- < div >
147- < CardTitle > Learn how Gitpod works</ CardTitle >
148- < CardDescription >
149- We’ve put together resources for you to get the most our of Gitpod.
150- </ CardDescription >
151- </ div >
152- </ Card >
153- { orgSettings ?. onboardingSettings ?. internalLink ? (
154- < Card href = { orgSettings . onboardingSettings . internalLink } isLinkExternal >
155- < Building className = "flex-shrink-0" size = { 24 } />
156- < div >
157- < CardTitle > Learn more about Gitpod at { org ?. name } </ CardTitle >
158- < CardDescription >
159- Read through the internal Gitpod landing page of your organization.
160- </ CardDescription >
161- </ div >
162- </ Card >
163- ) : (
164- < Card href = { "/new?showExamples=true" } >
165- < Code className = "flex-shrink-0" size = { 24 } />
166- < div >
167- < CardTitle > Open a sample repository</ CardTitle >
168- < CardDescription > Explore a sample repository to quickly experience Gitpod.</ CardDescription >
169- </ div >
170- </ Card >
171- ) }
172- < Card href = "https://www.gitpod.io/docs/introduction" isLinkExternal >
173- < Book className = "flex-shrink-0" size = { 24 } />
174- < div >
175- < CardTitle > Visit the docs</ CardTitle >
176- < CardDescription > We have extensive documentation to help if you get stuck.</ CardDescription >
143+ { isDedicatedInstallation && (
144+ < >
145+ < Subheading className = "font-semibold text-pk-content-primary mt-4 mb-2 lg:px-28 px-4" >
146+ Getting started
147+ </ Subheading >
148+
149+ < div className = "flex flex-wrap gap-5 lg:px-28 px-4" >
150+ < Card onClick = { ( ) => setVideoModalVisible ( true ) } >
151+ < GraduationCap className = "flex-shrink-0" size = { 24 } />
152+ < div >
153+ < CardTitle > Learn how Gitpod works</ CardTitle >
154+ < CardDescription >
155+ We’ve put together resources for you to get the most our of Gitpod.
156+ </ CardDescription >
157+ </ div >
158+ </ Card >
159+ { orgSettings ?. onboardingSettings ?. internalLink ? (
160+ < Card href = { orgSettings . onboardingSettings . internalLink } isLinkExternal >
161+ < Building className = "flex-shrink-0" size = { 24 } />
162+ < div >
163+ < CardTitle > Learn more about Gitpod at { org ?. name } </ CardTitle >
164+ < CardDescription >
165+ Read through the internal Gitpod landing page of your organization.
166+ </ CardDescription >
167+ </ div >
168+ </ Card >
169+ ) : (
170+ < Card href = { "/new?showExamples=true" } >
171+ < Code className = "flex-shrink-0" size = { 24 } />
172+ < div >
173+ < CardTitle > Open a sample repository</ CardTitle >
174+ < CardDescription >
175+ Explore a sample repository to quickly experience Gitpod.
176+ </ CardDescription >
177+ </ div >
178+ </ Card >
179+ ) }
180+ < Card href = "https://www.gitpod.io/docs/introduction" isLinkExternal >
181+ < Book className = "flex-shrink-0" size = { 24 } />
182+ < div >
183+ < CardTitle > Visit the docs</ CardTitle >
184+ < CardDescription >
185+ We have extensive documentation to help if you get stuck.
186+ </ CardDescription >
187+ </ div >
188+ </ Card >
177189 </ div >
178- </ Card >
179- </ div >
180190
181- < Subheading className = "font-semibold text-pk-content-primary pt-8 mb-2 lg:px-28 px-4" > Suggested</ Subheading >
191+ { recentRepos . length > 0 && (
192+ < >
193+ < Subheading className = "font-semibold text-pk-content-primary pt-8 mb-2 lg:px-28 px-4" >
194+ Suggested
195+ </ Subheading >
182196
183- < div className = "flex flex-wrap gap-5 lg:px-28 px-4" >
184- { recentRepos . map ( ( repo ) => (
185- < Card key = { repo . url } href = { `/new#${ repo . url } ` } className = "border-[#D79A45] border" >
186- < div >
187- < CardTitle > { repo . configurationName || repo . repoName } </ CardTitle >
188- < CardDescription > { repo . url } </ CardDescription >
189- </ div >
190- </ Card >
191- ) ) }
192- </ div >
193-
194- < Modal
195- visible = { isVideoModalVisible }
196- onClose = { handleVideoModalClose }
197- containerClassName = "min-[576px]:max-w-[600px]"
198- >
199- < ModalHeader > Demo video</ ModalHeader >
200- < ModalBody >
201- < div className = "flex flex-row items-center justify-center" >
202- < VideoSection
203- metadataVideoTitle = "Gitpod demo"
204- playbackId = "m01BUvCkTz7HzQKFoIcQmK00Rx5laLLoMViWBstetmvLs"
205- poster = "https://i.ytimg.com/vi_webp/1ZBN-b2cIB8/maxresdefault.webp"
206- playerProps = { { onPlay : handlePlay , defaultHiddenCaptions : true } }
207- className = "w-[535px] rounded-xl"
208- />
209- </ div >
210- </ ModalBody >
211- < ModalBaseFooter >
212- < Button variant = "secondary" onClick = { handleVideoModalClose } >
213- Close
214- </ Button >
215- </ ModalBaseFooter >
216- </ Modal >
197+ < div className = "flex flex-wrap gap-5 lg:px-28 px-4" >
198+ { recentRepos . map ( ( repo ) => (
199+ < Card key = { repo . url } href = { `/new#${ repo . url } ` } className = "border-[#D79A45] border" >
200+ < div >
201+ < CardTitle > { repo . configurationName || repo . repoName } </ CardTitle >
202+ < CardDescription > { repo . url } </ CardDescription >
203+ </ div >
204+ </ Card >
205+ ) ) }
206+ </ div >
207+ </ >
208+ ) }
209+
210+ < Modal
211+ visible = { isVideoModalVisible }
212+ onClose = { handleVideoModalClose }
213+ containerClassName = "min-[576px]:max-w-[600px]"
214+ >
215+ < ModalHeader > Demo video</ ModalHeader >
216+ < ModalBody >
217+ < div className = "flex flex-row items-center justify-center" >
218+ < VideoSection
219+ metadataVideoTitle = "Gitpod demo"
220+ playbackId = "m01BUvCkTz7HzQKFoIcQmK00Rx5laLLoMViWBstetmvLs"
221+ poster = "https://i.ytimg.com/vi_webp/1ZBN-b2cIB8/maxresdefault.webp"
222+ playerProps = { { onPlay : handlePlay , defaultHiddenCaptions : true } }
223+ className = "w-[535px] rounded-xl"
224+ />
225+ </ div >
226+ </ ModalBody >
227+ < ModalBaseFooter >
228+ < Button variant = "secondary" onClick = { handleVideoModalClose } >
229+ Close
230+ </ Button >
231+ </ ModalBaseFooter >
232+ </ Modal >
233+ </ >
234+ ) }
217235
218236 { deleteModalVisible && (
219237 < ConfirmationModal
0 commit comments