mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-25 10:24:39 +00:00
add confirmation dialog before exiting the game
This commit is contained in:
@@ -52,7 +52,11 @@ export class OptionsMenu extends LitElement implements Layer {
|
||||
private hasWinner = false;
|
||||
|
||||
private onExitButtonClick() {
|
||||
window.location.reload();
|
||||
const isConfirmed = confirm("Are you sure you want to exit the game?");
|
||||
|
||||
if (isConfirmed) {
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
createRenderRoot() {
|
||||
|
||||
Reference in New Issue
Block a user