Move copy link button to button box

This commit is contained in:
sepia 2025-07-23 15:13:36 -05:00
parent 5385f7be04
commit 6ecf0388bb
2 changed files with 10 additions and 8 deletions

View File

@ -22,14 +22,7 @@
<div id="game-board"></div> <div id="game-board"></div>
<div id="button-box"></div> <div id="button-box"></div>
</div> </div>
<div id="game-link-container">
<button id="copy-link-button" onclick="copyGameLink()">
<svg class="icon" alt="Copy">
<use href="/icons/clipboard-copy.svg"></use>
</svg>
<span id="copy-link-text">Click to copy game link!</span>
</button>
</div>
<script src="scripts/display-ws-connection.js"></script> <script src="scripts/display-ws-connection.js"></script>
<script src="scripts/send-ws-messages.js"></script> <script src="scripts/send-ws-messages.js"></script>
<script src="scripts/copy-game-link.js"></script> <script src="scripts/copy-game-link.js"></script>

View File

@ -224,6 +224,15 @@ class GameServer {
</button>, </button>,
); );
} }
} else if (this.gomoku.status === 'waiting') {
buttons.push(
<button id="copy-link-button" onclick="copyGameLink()">
<svg class="icon" alt="Copy">
<use href="/icons/clipboard-copy.svg"></use>
</svg>
<span id="copy-link-text">Click to copy game link!</span>
</button>,
);
} }
conn.ws.send(<div id="button-box">{buttons}</div>); conn.ws.send(<div id="button-box">{buttons}</div>);