mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
feat: move health to right
This commit is contained in:
1 parent
38fa15ab97
commit
6223773c71
1 file changed
+56
-62
+56
-62
@@ -254,108 +254,102 @@ async function playerListing(
|
|||||||
<div
|
<div
|
||||||
key={player.entity_id}
|
key={player.entity_id}
|
||||||
style={{
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: 8,
|
||||||
backgroundColor: theme.colors[`appBackground2${blockAccent}`],
|
backgroundColor: theme.colors[`appBackground2${blockAccent}`],
|
||||||
padding: 8,
|
padding: 8,
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'column',
|
|
||||||
gap: 8,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
|
||||||
gap: 8,
|
gap: 8,
|
||||||
|
flex: 1,
|
||||||
|
overflow: 'hidden',
|
||||||
|
alignItems: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<img
|
||||||
|
src={await iconPng(tankIcon(tank.id))}
|
||||||
|
style={{
|
||||||
|
width: 32,
|
||||||
|
height: 32,
|
||||||
|
objectFit: 'contain',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
gap: 8,
|
flexDirection: 'column',
|
||||||
flex: 1,
|
// align
|
||||||
overflow: 'hidden',
|
|
||||||
alignItems: 'center',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<img
|
|
||||||
src={await iconPng(tankIcon(tank.id))}
|
|
||||||
style={{
|
|
||||||
width: 32,
|
|
||||||
height: 32,
|
|
||||||
objectFit: 'contain',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
gap: 4,
|
||||||
// align
|
alignItems: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
gap: 4,
|
|
||||||
alignItems: 'center',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
color: theme.colors[`textLowContrast${blockAccent}`],
|
|
||||||
fontSize: 12,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{TIER_ROMAN_NUMERALS[tank.tier]}
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
color: theme.colors[`textHighContrast${blockAccent}`],
|
|
||||||
fontSize: 16,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{tank.name}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span
|
<span
|
||||||
style={{
|
style={{
|
||||||
fontSize: 16,
|
|
||||||
color: theme.colors[`textLowContrast${blockAccent}`],
|
color: theme.colors[`textLowContrast${blockAccent}`],
|
||||||
whiteSpace: 'nowrap',
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{player.name}
|
{TIER_ROMAN_NUMERALS[tank.tier]}
|
||||||
{player.clan_tag ? ` [${player.clan_tag}]` : ''}
|
</span>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
color: theme.colors[`textHighContrast${blockAccent}`],
|
||||||
|
fontSize: 16,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{tank.name}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<span
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
fontSize: 16,
|
||||||
flex: 1,
|
color: theme.colors[`textLowContrast${blockAccent}`],
|
||||||
}}
|
whiteSpace: 'nowrap',
|
||||||
>
|
}}
|
||||||
{stat(player.damage_made.toLocaleString())}
|
>
|
||||||
{stat(wn8 === -1 ? '--' : Math.round(wn8).toLocaleString())}
|
{player.name}
|
||||||
{stat(player.exp.toLocaleString())}
|
{player.clan_tag ? ` [${player.clan_tag}]` : ''}
|
||||||
{stat(player.enemies_destroyed, 1)}
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
height: 4,
|
display: 'flex',
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{stat(player.damage_made.toLocaleString())}
|
||||||
|
{stat(wn8 === -1 ? '--' : Math.round(wn8).toLocaleString())}
|
||||||
|
{stat(player.exp.toLocaleString())}
|
||||||
|
{stat(player.enemies_destroyed, 1)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
borderRadius: 2,
|
borderRadius: 2,
|
||||||
backgroundColor: theme.colors[`componentInteractive${healthAccent}`],
|
backgroundColor: theme.colors[`componentInteractive${healthAccent}`],
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
width: 4,
|
||||||
|
height: '100%',
|
||||||
|
transform: 'scaleY(-1)',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: `${healthLeft * 100}%`,
|
width: '100%',
|
||||||
height: '100%',
|
height: `${healthLeft * 100}%`,
|
||||||
borderRadius: 2,
|
borderRadius: 2,
|
||||||
backgroundColor: theme.colors[`solidBackground${healthAccent}`],
|
backgroundColor: theme.colors[`solidBackground${healthAccent}`],
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in new issue
Block a user