1
0

Some style tweaks

This commit is contained in:
James Ketr 2025-10-14 11:00:09 -07:00
parent c4985162ce
commit a0e4942680
4 changed files with 11 additions and 6 deletions

View File

@ -4,7 +4,6 @@
padding: 0.5em; padding: 0.5em;
user-select: none; user-select: none;
flex-direction: column; flex-direction: column;
margin: 0.25rem 0.25rem 0.25rem 0;
} }
.PlayerList .Name { .PlayerList .Name {
@ -53,6 +52,7 @@
gap: 0.25rem; gap: 0.25rem;
flex-direction: row; flex-direction: row;
align-items: start; align-items: start;
width: 100%;
} }
.PlayerList .PlayerSelector.MuiList-padding { .PlayerList .PlayerSelector.MuiList-padding {

View File

@ -162,7 +162,8 @@ const PlayerList: React.FC = () => {
sx={{ sx={{
maxWidth: { xs: '100%', sm: 500 }, maxWidth: { xs: '100%', sm: 500 },
p: { xs: 1, sm: 2 }, p: { xs: 1, sm: 2 },
m: { xs: 0, sm: 2 }, mt: 0.5,
mb: 0.5,
}} }}
> >
<MediaAgent {...{ session, peers, setPeers }} /> <MediaAgent {...{ session, peers, setPeers }} />

View File

@ -28,7 +28,7 @@
font-weight: bold; font-weight: bold;
} }
.Trade .PlayerList { .Trade .TradeList {
padding: 0; padding: 0;
background-color:rgba(224, 224, 224); background-color:rgba(224, 224, 224);
margin: 0.25rem 0; margin: 0.25rem 0;
@ -188,7 +188,10 @@
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
flex: 1; flex: 1;
padding: 0.25rem;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
min-height: fit-content;
box-sizing: border-box;
} }
.Trade .TradeLine:last-child { .Trade .TradeLine:last-child {

View File

@ -12,6 +12,7 @@ import { GlobalContext } from './GlobalContext';
import { assetsPath } from './Common'; import { assetsPath } from './Common';
import './Trade.css'; import './Trade.css';
import { Box } from '@mui/material';
interface Resources { interface Resources {
wheat: number; wheat: number;
@ -601,7 +602,7 @@ const Trade: React.FC = () => {
} }
return ( return (
<div className="TradeLine" key={`player-${item.name}-${index}`}> <Box className="TradeLine" key={`player-${item.name}-${index}`}>
<PlayerColor color={item.color} /> <PlayerColor color={item.color} />
<div className="TradeText"> <div className="TradeText">
{item.self && !isObserver && ( {item.self && !isObserver && (
@ -717,13 +718,13 @@ const Trade: React.FC = () => {
</Button> </Button>
)} )}
</div> </div>
</div> </Box>
); );
}); });
return ( return (
<Paper className="Trade"> <Paper className="Trade">
<div className="PlayerList">{tradeElements}</div> <div className="TradeList">{tradeElements}</div>
{!priv && ( {!priv && (
<div style={{ padding: '0.5rem' }}> <div style={{ padding: '0.5rem' }}>
<b>Read-only: observers can view offers but cannot participate in trades.</b> <b>Read-only: observers can view offers but cannot participate in trades.</b>