@@ -40,11 +40,11 @@ import { getDisplayStatus } from "../../util/workspace"
40
40
dayjs . extend ( relativeTime )
41
41
42
42
export const Language = {
43
- createButton : "Create workspace" ,
44
- emptyMessage : "Create your first workspace" ,
45
- emptyDescription : "Start editing your source code and building your software" ,
46
- filterName : "Filters" ,
47
43
createWorkspaceButton : "Create workspace" ,
44
+ emptyCreateWorkspaceMessage : "Create your first workspace" ,
45
+ emptyCreateWorkspaceDescription : "Start editing your source code and building your software" ,
46
+ emptyResultsMessage : "No results matched your search" ,
47
+ filterName : "Filters" ,
48
48
yourWorkspacesButton : "Your workspaces" ,
49
49
allWorkspacesButton : "All workspaces" ,
50
50
workspaceTooltipTitle : "What is workspace?" ,
@@ -200,19 +200,31 @@ export const WorkspacesPageView: FC<WorkspacesPageViewProps> = ({ loading, works
200
200
< TableBody >
201
201
{ ! workspaces && loading && < TableLoader /> }
202
202
{ workspaces && workspaces . length === 0 && (
203
- < TableRow >
204
- < TableCell colSpan = { 999 } >
205
- < EmptyState
206
- message = { Language . emptyMessage }
207
- description = { Language . emptyDescription }
208
- cta = {
209
- < Link underline = "none" component = { RouterLink } to = "/workspaces/new" >
210
- < Button startIcon = { < AddCircleOutline /> } > { Language . createButton } </ Button >
211
- </ Link >
212
- }
213
- />
214
- </ TableCell >
215
- </ TableRow >
203
+ < >
204
+ { filter === "owner:me" || filter === "" ? (
205
+ < TableRow >
206
+ < TableCell colSpan = { 999 } >
207
+ < EmptyState
208
+ message = { Language . emptyCreateWorkspaceMessage }
209
+ description = { Language . emptyCreateWorkspaceDescription }
210
+ cta = {
211
+ < Link underline = "none" component = { RouterLink } to = "/workspaces/new" >
212
+ < Button startIcon = { < AddCircleOutline /> } > { Language . createWorkspaceButton } </ Button >
213
+ </ Link >
214
+ }
215
+ />
216
+ </ TableCell >
217
+ </ TableRow >
218
+ ) : (
219
+ < TableRow >
220
+ < TableCell colSpan = { 999 } >
221
+ < EmptyState
222
+ message = { Language . emptyResultsMessage }
223
+ />
224
+ </ TableCell >
225
+ </ TableRow >
226
+ ) }
227
+ </ >
216
228
) }
217
229
{ workspaces &&
218
230
workspaces . map ( ( workspace ) => {
0 commit comments