Skip to content

Commit 69d3ef5

Browse files
committed
style: game review
1 parent 1a03601 commit 69d3ef5

File tree

1 file changed

+28
-33
lines changed
  • GZCTF/ClientApp/src/pages/admin/games/[id]

1 file changed

+28
-33
lines changed

GZCTF/ClientApp/src/pages/admin/games/[id]/Review.tsx

+28-33
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
Center,
1010
createStyles,
1111
Group,
12-
Indicator,
1312
Paper,
1413
ScrollArea,
1514
Select,
@@ -26,10 +25,10 @@ import {
2625
mdiCancel,
2726
mdiCheck,
2827
mdiClose,
29-
mdiCrown,
3028
mdiEmailOutline,
3129
mdiHelpCircleOutline,
3230
mdiPhoneOutline,
31+
mdiStar,
3332
} from '@mdi/js'
3433
import { Icon } from '@mdi/react'
3534
import { ActionIconWithConfirm } from '@Components/ActionIconWithConfirm'
@@ -102,7 +101,7 @@ interface MemberItemProps {
102101
}
103102

104103
const iconProps = {
105-
size: 0.8,
104+
size: 0.9,
106105
color: 'gray',
107106
}
108107

@@ -113,25 +112,7 @@ const MemberItem: FC<MemberItemProps> = (props) => {
113112
return (
114113
<Group spacing="xl" position="apart">
115114
<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} />
135116
<Group noWrap>
136117
<Stack spacing={2} style={{ width: '15rem' }}>
137118
<Group noWrap spacing="xs">
@@ -158,9 +139,19 @@ const MemberItem: FC<MemberItemProps> = (props) => {
158139
</Stack>
159140
</Group>
160141
</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>
164155
</Group>
165156
)
166157
}
@@ -225,14 +216,18 @@ const ParticipationItem: FC<ParticipationItemProps> = (props) => {
225216
</Group>
226217
</Box>
227218
<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>
236231
</Accordion.Panel>
237232
</Accordion.Item>
238233
)

0 commit comments

Comments
 (0)