9
9
Center ,
10
10
createStyles ,
11
11
Group ,
12
- Indicator ,
13
12
Paper ,
14
13
ScrollArea ,
15
14
Select ,
@@ -26,10 +25,10 @@ import {
26
25
mdiCancel ,
27
26
mdiCheck ,
28
27
mdiClose ,
29
- mdiCrown ,
30
28
mdiEmailOutline ,
31
29
mdiHelpCircleOutline ,
32
30
mdiPhoneOutline ,
31
+ mdiStar ,
33
32
} from '@mdi/js'
34
33
import { Icon } from '@mdi/react'
35
34
import { ActionIconWithConfirm } from '@Components/ActionIconWithConfirm'
@@ -102,7 +101,7 @@ interface MemberItemProps {
102
101
}
103
102
104
103
const iconProps = {
105
- size : 0.8 ,
104
+ size : 0.9 ,
106
105
color : 'gray' ,
107
106
}
108
107
@@ -113,25 +112,7 @@ const MemberItem: FC<MemberItemProps> = (props) => {
113
112
return (
114
113
< Group spacing = "xl" position = "apart" >
115
114
< Group style = { { width : 'calc(100% - 10rem)' } } >
116
- { isCaptain ? (
117
- < Indicator
118
- inline
119
- size = { 16 }
120
- label = { < Icon path = { mdiCrown } size = { 0.8 } color = { theme . colors . yellow [ 4 ] } /> }
121
- styles = { {
122
- indicator : {
123
- backgroundColor : 'transparent' ,
124
- marginTop : '-0.8rem' ,
125
- marginRight : '1.5rem' ,
126
- transform : 'rotate(-30deg)' ,
127
- } ,
128
- } }
129
- >
130
- < Avatar src = { user . avatar } />
131
- </ Indicator >
132
- ) : (
133
- < Avatar src = { user . avatar } />
134
- ) }
115
+ < Avatar src = { user . avatar } />
135
116
< Group noWrap >
136
117
< Stack spacing = { 2 } style = { { width : '15rem' } } >
137
118
< Group noWrap spacing = "xs" >
@@ -158,9 +139,19 @@ const MemberItem: FC<MemberItemProps> = (props) => {
158
139
</ Stack >
159
140
</ Group >
160
141
</ Group >
161
- < Text size = "sm" weight = { 500 } color = { isRegistered ? 'teal' : 'yellow' } >
162
- { isRegistered ? '已报名' : '未报名' }
163
- </ Text >
142
+ < Group position = "right" >
143
+ { isCaptain && (
144
+ < Group spacing = { 0 } >
145
+ < Icon path = { mdiStar } color = { theme . colors . yellow [ 4 ] } size = { 0.9 } />
146
+ < Text size = "sm" weight = { 500 } color = "yellow" >
147
+ 队长
148
+ </ Text >
149
+ </ Group >
150
+ ) }
151
+ < Text size = "sm" weight = { 700 } color = { isRegistered ? 'teal' : 'orange' } >
152
+ { isRegistered ? '已报名' : '未报名' }
153
+ </ Text >
154
+ </ Group >
164
155
</ Group >
165
156
)
166
157
}
@@ -225,14 +216,18 @@ const ParticipationItem: FC<ParticipationItemProps> = (props) => {
225
216
</ Group >
226
217
</ Box >
227
218
< Accordion . Panel >
228
- { participation . team ?. members ?. map ( ( user ) => (
229
- < MemberItem
230
- key = { user . userId }
231
- user = { user }
232
- isRegistered = { participation . registeredMembers ?. some ( ( u ) => u === user . userId ) ?? false }
233
- isCaptain = { participation . team ?. captainId === user . userId }
234
- />
235
- ) ) }
219
+ < Stack >
220
+ { participation . team ?. members ?. map ( ( user ) => (
221
+ < MemberItem
222
+ key = { user . userId }
223
+ user = { user }
224
+ isRegistered = {
225
+ participation . registeredMembers ?. some ( ( u ) => u === user . userId ) ?? false
226
+ }
227
+ isCaptain = { participation . team ?. captainId === user . userId }
228
+ />
229
+ ) ) }
230
+ </ Stack >
236
231
</ Accordion . Panel >
237
232
</ Accordion . Item >
238
233
)
0 commit comments