@@ -44,6 +44,7 @@ import CustomRoomTagStore from "../../../stores/CustomRoomTagStore";
44
44
import { arrayFastClone , arrayHasDiff } from "../../../utils/arrays" ;
45
45
import { objectShallowClone , objectWithOnly } from "../../../utils/objects" ;
46
46
import { IconizedContextMenuOption , IconizedContextMenuOptionList } from "../context_menus/IconizedContextMenu" ;
47
+ import AccessibleButton from "../elements/AccessibleButton" ;
47
48
48
49
interface IProps {
49
50
onKeyDown : ( ev : React . KeyboardEvent ) => void ;
@@ -278,6 +279,10 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
278
279
}
279
280
} ;
280
281
282
+ private onExplore = ( ) => {
283
+ dis . fire ( Action . ViewRoomDirectory ) ;
284
+ } ;
285
+
281
286
private renderCommunityInvites ( ) : TemporaryTile [ ] {
282
287
// TODO: Put community invites in a more sensible place (not in the room list)
283
288
// See https://github.com/vector-im/element-web/issues/14456
@@ -359,6 +364,16 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
359
364
}
360
365
361
366
public render ( ) {
367
+ let explorePrompt : JSX . Element ;
368
+ if ( RoomListStore . instance . getFirstNameFilterCondition ( ) ) {
369
+ explorePrompt = < div className = "mx_RoomList_explorePrompt" >
370
+ < div > { _t ( "Can't see what you’re looking for?" ) } </ div >
371
+ < AccessibleButton kind = "link" onClick = { this . onExplore } >
372
+ { _t ( "Explore all public rooms" ) }
373
+ </ AccessibleButton >
374
+ </ div > ;
375
+ }
376
+
362
377
const sublists = this . renderSublists ( ) ;
363
378
return (
364
379
< RovingTabIndexProvider handleHomeEnd = { true } onKeyDown = { this . props . onKeyDown } >
@@ -370,7 +385,10 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
370
385
className = "mx_RoomList"
371
386
role = "tree"
372
387
aria-label = { _t ( "Rooms" ) }
373
- > { sublists } </ div >
388
+ >
389
+ { sublists }
390
+ { explorePrompt }
391
+ </ div >
374
392
) }
375
393
</ RovingTabIndexProvider >
376
394
) ;
0 commit comments