From 93ac7145b2291a2749aef1e6a64095888b665b01 Mon Sep 17 00:00:00 2001 From: Steffen Date: Sat, 11 Apr 2020 23:02:04 +0200 Subject: [PATCH] refined controls --- src/App.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 4f92701..7800c1b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -49,10 +49,10 @@
  • Clear Roles
  • -
  • +
  • Select Edition
  • -
  • +
  • Select Roles
  • @@ -103,6 +103,8 @@ export default { } }, randomizeSeatings() { + this.isPublic = false; + this.isControlOpen = false; if (confirm("Are you sure you want to randomize seatings?")) { this.players = this.players .map(a => [Math.random(), a]) @@ -111,11 +113,13 @@ export default { } }, clearPlayers() { + this.isControlOpen = false; if (confirm("Are you sure you want to remove all players?")) { this.players = []; } }, clearRoles() { + this.isControlOpen = false; if (confirm("Are you sure you want to remove all player roles?")) { this.players.forEach(player => { player.role = {}; @@ -134,10 +138,20 @@ export default { .map(role => [role.id, role]) ); }, + showEditionModal() { + this.isEditionModalOpen = true; + this.isPublic = false; + this.isControlOpen = false; + }, setEdition(edition) { this.edition = edition; this.isEditionModalOpen = false; }, + showRoleModal() { + this.isRoleModalOpen = true; + this.isPublic = false; + this.isControlOpen = false; + }, keyup({ key }) { switch (key) { case "g":