This repository was archived by the owner on Oct 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6969 line-height : 25px ;
7070}
7171
72- .online- users-grid {
72+ .users-grid {
7373 width : 100% !important ;
7474 margin-bottom : 20px !important ;
7575}
7676
77- .online- users-grid-item {
77+ .users-grid-item {
7878 display : flex;
7979 align-items : flex-start;
8080 position : relative;
8181}
8282
83- .online -status {
83+ .user -status {
8484 width : 10px ;
8585 height : 10px ;
8686 z-index : 2 ;
8787 position : absolute;
8888}
8989
90- .online- user-avatar {
90+ .user-avatar {
9191 width : 30px ;
9292 z-index : 1 ;
9393 margin-left : 5px ;
Original file line number Diff line number Diff line change @@ -181,25 +181,55 @@ export default function RoomInfo(props) {
181181 < div className = "roominfo-wrapper" >
182182 { ! isNotAccessible ? (
183183 < >
184- < Grid container spacing = { 2 } className = "online- users-grid" >
184+ < Grid container spacing = { 2 } className = "users-grid" >
185185 { roomMembers
186186 . filter (
187- ( user , index ) => user . status === "online" && index <= 25
187+ ( user , index ) =>
188+ ( user . status === "online" || user . status === "away" ) &&
189+ index <= 25
188190 )
191+ . sort ( ( a , b ) => {
192+ // Sorts first by status and then alphabetically
193+ return (
194+ - a . status . localeCompare ( b . status ) ||
195+ a . name . localeCompare ( b . name )
196+ ) ;
197+ } )
189198 . map ( ( user ) => {
190199 return (
191200 < Grid
192201 key = { user . username }
193202 item
194203 xs = { 2 }
195- className = "online- users-grid-item"
204+ className = "users-grid-item"
196205 >
197- < img className = "online-status" src = "/online.png" alt = "online" />
198- < img
199- className = "online-user-avatar"
200- src = { `${ rcApiDomain } /avatar/${ user . username } ` }
201- alt = { user . username }
202- />
206+ { user . status === "online" ? (
207+ < >
208+ < img
209+ className = "user-status"
210+ src = "/online.png"
211+ alt = "online"
212+ />
213+ < img
214+ className = "user-avatar"
215+ src = { `${ rcApiDomain } /avatar/${ user . username } ` }
216+ alt = { user . username }
217+ />
218+ </ >
219+ ) : (
220+ < >
221+ < img
222+ className = "user-status"
223+ src = "/away.png"
224+ alt = "away"
225+ />
226+ < img
227+ className = "user-avatar"
228+ src = { `${ rcApiDomain } /avatar/${ user . username } ` }
229+ alt = { user . username }
230+ />
231+ </ >
232+ ) }
203233 </ Grid >
204234 ) ;
205235 } ) }
You can’t perform that action at this time.
0 commit comments