@@ -7,6 +7,7 @@ import { t } from '../utils/locale';
7
7
export const MatchTableColumns = [
8
8
'TEAM_A' ,
9
9
'TEAM_B' ,
10
+ 'ONLINE_PLAYER_COUNT' ,
10
11
'AGE' ,
11
12
'BEST_OF' ,
12
13
'MATCH_STATE' ,
@@ -20,6 +21,7 @@ export const MatchTableColumns = [
20
21
export const MatchTableColumnLabels : Record < TMatchTableColumns , string > = {
21
22
TEAM_A : t ( 'Team A' ) ,
22
23
TEAM_B : t ( 'Team B' ) ,
24
+ ONLINE_PLAYER_COUNT : t ( 'Online Players' ) ,
23
25
AGE : t ( 'Age' ) ,
24
26
BEST_OF : t ( 'Best of' ) ,
25
27
MATCH_STATE : t ( 'Match State' ) ,
@@ -52,6 +54,9 @@ export const MatchList: Component<{ matches: IMatchResponse[]; columnsToShow: TC
52
54
< th > { t ( '#' ) } </ th >
53
55
{ cts ( ) . TEAM_A && < th > { MatchTableColumnLabels . TEAM_A } </ th > }
54
56
{ cts ( ) . TEAM_B && < th > { MatchTableColumnLabels . TEAM_B } </ th > }
57
+ { cts ( ) . ONLINE_PLAYER_COUNT && (
58
+ < th > { MatchTableColumnLabels . ONLINE_PLAYER_COUNT } </ th >
59
+ ) }
55
60
{ cts ( ) . AGE && < th > { MatchTableColumnLabels . AGE } </ th > }
56
61
{ cts ( ) . BEST_OF && < th > { MatchTableColumnLabels . BEST_OF } </ th > }
57
62
{ cts ( ) . MATCH_STATE && < th > { MatchTableColumnLabels . MATCH_STATE } </ th > }
@@ -69,6 +74,13 @@ export const MatchList: Component<{ matches: IMatchResponse[]; columnsToShow: TC
69
74
< td > { i ( ) + 1 } </ td >
70
75
{ cts ( ) . TEAM_A && < td > { match . teamA . name } </ td > }
71
76
{ cts ( ) . TEAM_B && < td > { match . teamB . name } </ td > }
77
+ { cts ( ) . ONLINE_PLAYER_COUNT && (
78
+ < td >
79
+ { match . isStopped || match . state === 'FINISHED'
80
+ ? ''
81
+ : match . players . filter ( ( player ) => player . online ) . length }
82
+ </ td >
83
+ ) }
72
84
{ cts ( ) . AGE && < td > { diffString ( match . createdAt ) } </ td > }
73
85
{ cts ( ) . BEST_OF && < td > { getTotalNumberOfMaps ( match . electionSteps ) } </ td > }
74
86
{ cts ( ) . MATCH_STATE && < td > { match . state } </ td > }
0 commit comments