Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions frontend/src/components/HistoryRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ function HistoryRow(props: {
</TableRow>
<TableRow>
<TableCell sx={{ px: 0, mx: 0 }} colSpan={2}>
<Button component={Link} sx={{ marginLeft: "5px" }} to={``}>
<Button
component={Link}
sx={{
marginLeft: "5px",
justifyContent: "flex-start",
minWidth: "auto",
}}
to={``}
>
{item.opponent_name}
</Button>
</TableCell>
Expand Down Expand Up @@ -116,7 +124,11 @@ function HistoryRow(props: {
<TableRow>
<TableCell sx={{ px: 0, mx: 0, maxWidth: "120px" }}>
<Button
sx={{ marginLeft: "5px" }}
sx={{
marginLeft: "5px",
justifyContent: "flex-start",
minWidth: "auto",
}}
component={Link}
to={`/player/${item.opponent_id}/${item.matches[0].opponent_character_short}`}
>
Expand Down Expand Up @@ -250,7 +262,11 @@ function HistoryRow(props: {
</TableCell>
<TableCell align="right"></TableCell>
<TableCell>
<Button component={Link} to={``}>
<Button
component={Link}
sx={{ justifyContent: "flex-start", minWidth: "auto" }}
to={``}
>
{item.opponent_name}
</Button>
</TableCell>
Expand Down Expand Up @@ -279,6 +295,7 @@ function HistoryRow(props: {
<TableCell>
<Button
component={Link}
sx={{ justifyContent: "flex-start", minWidth: "auto" }}
to={`/player/${item.opponent_id}/${item.matches[0].opponent_character_short}`}
>
{item.opponent_name}
Expand Down
10 changes: 9 additions & 1 deletion frontend/src/pages/Legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,14 @@ const Legend = () => {
sx={{ position: "absolute", top: "-1px", color: "white" }}
/>
) : null}
<Box sx={{ minHeight: 100, paddingTop: "30px" }}>
<Box
sx={{
minHeight: 100,
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<Typography align="center" variant="pageHeader">
Legend Players
</Typography>
Expand Down Expand Up @@ -154,6 +161,7 @@ const Legend = () => {
<TableCell>
<Button
component={Link}
sx={{ justifyContent: "flex-start", minWidth: "auto" }}
to={`/player/${player.id}/${player.char_short}`}
>
{player.name}
Expand Down
15 changes: 12 additions & 3 deletions frontend/src/pages/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function PlayerHeader({
const playerInfo = player ? (
<>
{player.tags && player.tags.length > 0 && (
<Box>
<Box sx={{ flexBasis: "100%" }}>
{player.tags.map((e) => (
<Tag key={e.tag} style={JSON.parse(e.style)}>
{e.tag}
Expand Down Expand Up @@ -139,7 +139,16 @@ function PlayerHeader({
variant="pageHeader"
sx={{ fontSize: 30, marginTop: { xs: 2, lg: 0 } }}
>
{playerInfo}
<Box
sx={{
display: "inline-flex",
alignItems: "center",
flexWrap: "wrap",
justifyContent: "center",
}}
>
{playerInfo}
</Box>
</Typography>
{aliasSection}
</Box>
Expand Down Expand Up @@ -289,7 +298,7 @@ function MatchHistory({
</Table>
</TableContainer>
</Box>
<Box sx={{ mx: { xs: 1, lg: 3 } }}>
<Box sx={{ mx: { xs: 1, lg: 3 }, mt: 2 }}>
<Button onClick={onPrev}>Prev</Button>
<Button style={showNext ? {} : { display: "none" }} onClick={onNext}>
Next
Expand Down
10 changes: 9 additions & 1 deletion frontend/src/pages/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const SearchResults = ({ resultsPromise }: SearchResultsProps) => {
<TableCell>
<Button
component={Link}
sx={{ justifyContent: "flex-start", minWidth: "auto" }}
to={`/player/${player.id}/${player.char_short}`}
>
{player.name}
Expand Down Expand Up @@ -122,7 +123,14 @@ const Search = () => {
style={{ backgroundImage: "none" }}
sx={{ backgroundColor: "secondary.main" }}
>
<Box sx={{ minHeight: 100, paddingTop: "30px" }}>
<Box
sx={{
minHeight: 100,
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<Typography align="center" variant="pageHeader">
Search Results
</Typography>
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/pages/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,14 @@ const Stats = () => {
style={{ backgroundImage: "none" }}
sx={{ backgroundColor: "secondary.main" }}
>
<Box sx={{ minHeight: 100, paddingTop: "30px" }}>
<Box
sx={{
minHeight: 100,
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<Typography align="center" variant="pageHeader">
Stats
</Typography>
Expand Down
14 changes: 11 additions & 3 deletions frontend/src/pages/TopGlobal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,14 @@ const TopGlobal = () => {
sx={{ position: "absolute", top: "-1px", color: "white" }}
/>
) : null}
<Box sx={{ minHeight: 100, paddingTop: "30px" }}>
<Box
sx={{
minHeight: 100,
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<Typography align="center" variant="pageHeader">
Top Players
</Typography>
Expand All @@ -202,7 +209,7 @@ const TopGlobal = () => {
: "Updating..."}
</Typography>
)}
<Box sx={{ display: "inline-block" }}>
<Box sx={{ display: "inline-block", mb: 2 }}>
<Button onClick={(event) => onPrev(event)}>Prev</Button>
<Button
style={showNext ? {} : { display: "none" }}
Expand Down Expand Up @@ -240,6 +247,7 @@ const TopGlobal = () => {
<TableCell>
<Button
component={Link}
sx={{ justifyContent: "flex-start", minWidth: "auto" }}
to={`/player/${player.id}/${player.char_short}`}
>
{player.name}
Expand Down Expand Up @@ -279,7 +287,7 @@ const TopGlobal = () => {
</TableBody>
</Table>
</TableContainer>
<Box sx={{ display: "inline-block" }}>
<Box sx={{ display: "inline-block", mt: 2 }}>
<Button onClick={(event) => onPrev(event)}>Prev</Button>
<Button
style={showNext ? {} : { display: "none" }}
Expand Down
14 changes: 11 additions & 3 deletions frontend/src/pages/TopPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,14 @@ const TopPlayer = () => {
sx={{ position: "absolute", top: "-1px", color: "white" }}
/>
) : null}
<Box sx={{ minHeight: 100, paddingTop: "30px" }}>
<Box
sx={{
minHeight: 100,
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<Typography align="center" variant="pageHeader">
{charLong} Leaderboard
</Typography>
Expand All @@ -195,7 +202,7 @@ const TopPlayer = () => {
: "Updating..."}
</Typography>
)}
<Box sx={{ mx: 3, display: "inline-block" }}>
<Box sx={{ mx: 3, display: "inline-block", mb: 2 }}>
<Button onClick={() => onPrev()}>Prev</Button>
<Button
style={showNext ? {} : { display: "none" }}
Expand Down Expand Up @@ -233,6 +240,7 @@ const TopPlayer = () => {
<TableCell>
<Button
component={Link}
sx={{ justifyContent: "flex-start", minWidth: "auto" }}
to={`/player/${player.id}/${player.char_short}`}
>
{player.name}
Expand Down Expand Up @@ -272,7 +280,7 @@ const TopPlayer = () => {
</TableBody>
</Table>
</TableContainer>
<Box sx={{ mx: 3, display: "inline-block" }}>
<Box sx={{ mx: 3, display: "inline-block", mt: 2 }}>
<Button onClick={() => onPrev()}>Prev</Button>
<Button
style={showNext ? {} : { display: "none" }}
Expand Down
7 changes: 1 addition & 6 deletions frontend/src/utils/Themes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ function createCharacterTheme(config: CharacterThemeConfig): Theme {
padding: "8px 10px",
display: "inline-block",
marginLeft: "8px",
top: "-4px",
position: "relative",
},
},
{
Expand All @@ -94,8 +92,7 @@ function createCharacterTheme(config: CharacterThemeConfig): Theme {
padding: "8px 10px",
display: "inline-block",
marginLeft: "8px",
top: "-4px",
position: "relative",
verticalAlign: "middle",
},
},
{
Expand All @@ -109,8 +106,6 @@ function createCharacterTheme(config: CharacterThemeConfig): Theme {
padding: "8px 10px",
display: "inline-block",
marginLeft: "8px",
top: "-4px",
position: "relative",
},
},
],
Expand Down
Loading