mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-31 02:44:50 +01:00 
			
		
		
		
	Add user list component + snap to user functionality (#1749)
This commit is contained in:
		| @@ -16,6 +16,7 @@ import { RoomDialog } from "./RoomDialog"; | ||||
| import { SCROLLBAR_WIDTH, SCROLLBAR_MARGIN } from "../scene/scrollbars"; | ||||
| import { LockIcon } from "./LockIcon"; | ||||
| import { LoadingMessage } from "./LoadingMessage"; | ||||
| import { UserList } from "./UserList"; | ||||
|  | ||||
| type MobileMenuProps = { | ||||
|   appState: AppState; | ||||
| @@ -105,6 +106,22 @@ export const MobileMenu = ({ | ||||
|                     }} | ||||
|                   /> | ||||
|                 </fieldset> | ||||
|                 <fieldset> | ||||
|                   <legend>{t("labels.collaborators")}</legend> | ||||
|                   <UserList mobile> | ||||
|                     {Array.from(appState.collaborators) | ||||
|                       // Collaborator is either not initialized or is actually the current user. | ||||
|                       .filter(([_, client]) => Object.keys(client).length !== 0) | ||||
|                       .map(([clientId, client]) => ( | ||||
|                         <React.Fragment key={clientId}> | ||||
|                           {actionManager.renderAction( | ||||
|                             "goToCollaborator", | ||||
|                             clientId, | ||||
|                           )} | ||||
|                         </React.Fragment> | ||||
|                       ))} | ||||
|                   </UserList> | ||||
|                 </fieldset> | ||||
|               </Stack.Col> | ||||
|             </div> | ||||
|           </Section> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Oliver Benns
					Oliver Benns