From db1f1f9adb920605c7a16b060a7737e54636ee08 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Sat, 29 Feb 2020 13:42:46 +0100 Subject: [PATCH] Improvements - untested --- client/public/sounds/SOURCE | 3 +-- client/public/sounds/move.mp3 | 1 - client/public/sounds/newgame.mp3 | 1 - client/public/sounds/newgame.wav | 1 + client/public/sounds/undo.mp3 | 1 - client/src/components/BaseGame.vue | 4 --- client/src/components/Chat.vue | 6 +++++ client/src/components/GameList.vue | 13 ++++++---- client/src/components/Settings.vue | 14 +++++------ client/src/store.js | 11 ++++++--- client/src/translations/en.js | 5 ++-- client/src/translations/es.js | 5 ++-- client/src/translations/fr.js | 5 ++-- client/src/utils/gameStorage.js | 13 ++++++++-- client/src/views/Game.vue | 39 +++++++++++++++++++++--------- client/src/views/Hall.vue | 11 +++++++-- client/src/views/MyGames.vue | 35 +++++++++++++++++++++++++-- server/models/Game.js | 26 +++++++++++++++----- server/routes/games.js | 16 +++++++++++- server/sockets.js | 22 +++++++++++++++++ 20 files changed, 175 insertions(+), 57 deletions(-) delete mode 100644 client/public/sounds/move.mp3 delete mode 100644 client/public/sounds/newgame.mp3 create mode 100644 client/public/sounds/newgame.wav delete mode 100644 client/public/sounds/undo.mp3 diff --git a/client/public/sounds/SOURCE b/client/public/sounds/SOURCE index dd2e2865..1182b943 100644 --- a/client/public/sounds/SOURCE +++ b/client/public/sounds/SOURCE @@ -1,2 +1 @@ -https://audiojungle.net/item/chess-pieces-and-board/11657386 -http://freesound.org/search/?q=cancel + sword +http://soundbible.com/1531-Temple-Bell.html diff --git a/client/public/sounds/move.mp3 b/client/public/sounds/move.mp3 deleted file mode 100644 index 8586f77b..00000000 --- a/client/public/sounds/move.mp3 +++ /dev/null @@ -1 +0,0 @@ -#$# git-fat d9100d524f9bca2f601823d2422bd3c21ed1329c 18889 diff --git a/client/public/sounds/newgame.mp3 b/client/public/sounds/newgame.mp3 deleted file mode 100644 index 09dac630..00000000 --- a/client/public/sounds/newgame.mp3 +++ /dev/null @@ -1 +0,0 @@ -#$# git-fat fca619a21ac9647e2cf6888ecc78e84a3ca8011c 14194 diff --git a/client/public/sounds/newgame.wav b/client/public/sounds/newgame.wav new file mode 100644 index 00000000..f88939a0 --- /dev/null +++ b/client/public/sounds/newgame.wav @@ -0,0 +1 @@ +#$# git-fat 839f8d81e4e6bf135e3828be652483420d4118b8 917140 diff --git a/client/public/sounds/undo.mp3 b/client/public/sounds/undo.mp3 deleted file mode 100644 index d7673144..00000000 --- a/client/public/sounds/undo.mp3 +++ /dev/null @@ -1 +0,0 @@ -#$# git-fat 527d57bf4f0c83bbfdcfc18d2f9503c28b8e3cc5 8305 diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 2a54cbbe..9783c71f 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -355,8 +355,6 @@ export default { })(); }; const afterMove = (smove, initurn) => { - if (this.st.settings.sound == 2) - new Audio("/sounds/move.mp3").play().catch(() => {}); if (this.vr.turn != initurn) { // Turn has changed: move is complete if (!smove.fen) { @@ -440,8 +438,6 @@ export default { if (light) this.cursor--; else { this.positionCursorTo(this.cursor - 1); - if (this.st.settings.sound == 2) - new Audio("/sounds/undo.mp3").play().catch(() => {}); this.incheck = this.vr.getCheckSquares(this.vr.turn); this.emitFenIfAnalyze(); } diff --git a/client/src/components/Chat.vue b/client/src/components/Chat.vue index f1e1fad2..7f807676 100644 --- a/client/src/components/Chat.vue +++ b/client/src/components/Chat.vue @@ -1,5 +1,7 @@