Skip to content

Commit

Permalink
Add handicap to game history table
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Casal authored and Andrew Casal committed Jun 8, 2024
1 parent 7770a26 commit 243183c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/views/User/GameHistoryTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ interface GroomedGame {
result: JSX.Element;
flags?: { [flag_key: string]: number | string | boolean };
rengo_vs_text?: `${number} vs. ${number}`;
handicap: number;
}

export function GameHistoryTable(props: GameHistoryProps) {
Expand Down Expand Up @@ -190,6 +191,8 @@ export function GameHistoryTable(props: GameHistoryProps) {

item.name = r.name;

item.handicap = r.handicap;

if (item.name && item.name.trim() === "") {
item.name = item.href;
}
Expand Down Expand Up @@ -393,6 +396,12 @@ export function GameHistoryTable(props: GameHistoryProps) {
"board_size" + (X && X.annulled ? " annulled" : ""),
render: (X) => `${X.width}x${X.height}`,
},
{
header: _("Hd"),
className: (X) =>

Check failure on line 401 in src/views/User/GameHistoryTable.tsx

View workflow job for this annotation

GitHub Actions / build

Delete `⏎···································`
"handicap" + (X && X.annulled ? " annulled" : ""),
render: (X) => X.handicap,
},
{
header: _("Name"),
className: (X) =>
Expand Down
13 changes: 12 additions & 1 deletion src/views/User/User.styl
Original file line number Diff line number Diff line change
Expand Up @@ -492,13 +492,20 @@
themed color strong-loss
}

.board_size {
padding-right: 0.5em;
}

.handicap {
padding-right: 0.5em;
}

.game_name {
a {
color: unset;
}
max-width: 15rem;
overflow: hidden;
padding-left: 0.5em;
text-overflow: ellipsis;
}

Expand Down Expand Up @@ -526,6 +533,10 @@
.annulled {
themed opacity annul-opacity;
}

th {
padding-right: 0.5em;
}
}


Expand Down

0 comments on commit 243183c

Please sign in to comment.