Move copy link button to button box
This commit is contained in:
parent
5385f7be04
commit
6ecf0388bb
|
@ -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>
|
||||||
|
|
|
@ -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>);
|
||||||
|
|
Loading…
Reference in New Issue