mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:20:47 +00:00
fix: add copy button for game ID in game history details (#3783)
Resolves #3755 ## Description: The game ID in the history details panel was displayed as plain unselectable text, making it difficult to copy. Replaced the static text div with the existing <copy-button> component in compact mode, which allows users to click the game ID to copy it to clipboard instantly. No screenshot provided — feature requires a logged-in account to access game history. The change replaces a static text div with the existing <copy-button compact> component on line 118 of GameList.ts. ## Please complete the following: - [ ] I have added screenshots for all UI updates - [ ] I process any text displayed to the user through translateText() and I've added it to the en.json file - [ ] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
This commit is contained in:
@@ -4,6 +4,7 @@ import { PlayerGame } from "../../../../core/ApiSchemas";
|
||||
import { GameMode } from "../../../../core/game/Game";
|
||||
import { GameInfoModal } from "../../../GameInfoModal";
|
||||
import { translateText } from "../../../Utils";
|
||||
import "../../CopyButton";
|
||||
|
||||
@customElement("game-list")
|
||||
export class GameList extends LitElement {
|
||||
@@ -115,7 +116,10 @@ export class GameList extends LitElement {
|
||||
>
|
||||
${translateText("game_list.game_id")}
|
||||
</div>
|
||||
<div class="text-white font-mono">${game.gameId}</div>
|
||||
<copy-button
|
||||
.copyText="${game.gameId}"
|
||||
compact
|
||||
></copy-button>
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user