Skip to content

Commit

Permalink
Bot list formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Dec 10, 2024
1 parent 2fc9ad0 commit 51e82f7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
11 changes: 11 additions & 0 deletions src/views/Play/QuickMatch.styl
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,17 @@
}

.computer-select {
.option-label {
display: flex;
justify-content: space-between;
gap: 0.5rem;

> span {
display: flex;
align-items: center;
gap: 0.5rem;
}
}

> div {
width: 100%;
Expand Down
23 changes: 14 additions & 9 deletions src/views/Play/QuickMatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,19 @@ const RenderBotOption = (props: {
className={"option" + (props.isFocused ? " focused" : "")}
>
<div className="option-label">
<PlayerIcon user={opt} size={32} style={{ width: "32px", height: "32px" }} />
{opt.username}
</div>
<div className="option-description">
{rankString(opt.ranking || 0)}
<a target="_blank" href={`/user/view/${opt.id}`} title={_("Selected AI profile")}>
<i className="fa fa-external-link" />
</a>
<span>
<PlayerIcon user={opt} size={32} style={{ width: "32px", height: "32px" }} />
{opt.username} ({rankString(opt.ranking || 0)})
</span>
<span>
<a
target="_blank"
href={`/user/view/${opt.id}`}
title={_("Selected AI profile")}
>
<i className="fa fa-external-link" />
</a>
</span>
</div>
</div>
);
Expand All @@ -173,7 +178,7 @@ const RenderBotValue = (props: any) => {
return (
<components.SingleValue {...props}>
<PlayerIcon user={opt} size={32} style={{ width: "32px", height: "32px" }} />
{opt.username}
{opt.username} ({rankString(opt.ranking || 0)})
</components.SingleValue>
);
};
Expand Down

0 comments on commit 51e82f7

Please sign in to comment.