diff --git a/cmd/frontend/public/characters/Aloy.png b/cmd/frontend/public/characters/Aloy.png new file mode 100644 index 0000000..014fbfe Binary files /dev/null and b/cmd/frontend/public/characters/Aloy.png differ diff --git a/cmd/frontend/public/characters/Kratos.png b/cmd/frontend/public/characters/Kratos.png new file mode 100644 index 0000000..62c75a2 Binary files /dev/null and b/cmd/frontend/public/characters/Kratos.png differ diff --git a/cmd/frontend/public/characters/PaperMario.png b/cmd/frontend/public/characters/PaperMario.png new file mode 100644 index 0000000..60606e3 Binary files /dev/null and b/cmd/frontend/public/characters/PaperMario.png differ diff --git a/cmd/frontend/public/characters/Raiden.png b/cmd/frontend/public/characters/Raiden.png new file mode 100644 index 0000000..954aea9 Binary files /dev/null and b/cmd/frontend/public/characters/Raiden.png differ diff --git a/cmd/frontend/public/characters/Sora.png b/cmd/frontend/public/characters/Sora.png new file mode 100644 index 0000000..eb3d20b Binary files /dev/null and b/cmd/frontend/public/characters/Sora.png differ diff --git a/cmd/frontend/src/components/items/InspirationWindow.vue b/cmd/frontend/src/components/items/InspirationWindow.vue index 46d3cb4..f52c9f1 100644 --- a/cmd/frontend/src/components/items/InspirationWindow.vue +++ b/cmd/frontend/src/components/items/InspirationWindow.vue @@ -18,6 +18,7 @@ diff --git a/cmd/frontend/src/components/items/characterModal.vue b/cmd/frontend/src/components/items/characterModal.vue index 4567c2b..a61dd0c 100644 --- a/cmd/frontend/src/components/items/characterModal.vue +++ b/cmd/frontend/src/components/items/characterModal.vue @@ -43,6 +43,26 @@ samus

Samus

+
+ kratos +

Kratos

+
+
+ aloy +

Aloy

+
+
+ sora +

Sora

+
+
+ raiden +

Raiden

+
+
+ paper mario +

Paper Mario

+
diff --git a/cmd/frontend/src/components/items/extraButtons.vue b/cmd/frontend/src/components/items/extraButtons.vue index 1c2e6a2..4f23296 100644 --- a/cmd/frontend/src/components/items/extraButtons.vue +++ b/cmd/frontend/src/components/items/extraButtons.vue @@ -2,6 +2,7 @@
+
@@ -16,7 +17,6 @@ export default { }, methods: { async resetPoints() { - /* await this.APIresetPlaylist(); */ this.$store.dispatch("resetPlayerScore"); this.$store.dispatch("resetPlayerWelcomed"); this.$store.dispatch("setRoundStarted", false); @@ -27,6 +27,17 @@ export default { this.$store.dispatch("setCurrentlyLoadingTrack", "N/A"); this.$store.dispatch("setCurrentTrackHidden", false); }, + async syncGames() { + await this.APIsyncGames(); + await this.APIresetPlaylist(); + this.$store.dispatch("resetPlayerScore"); + this.$store.dispatch("resetPlayerWelcomed"); + this.$store.dispatch("setRoundStarted", false); + this.$store.dispatch("updatePlaylistHistory", this.emptyPlaylist); + this.$store.dispatch("setCurrentlyLoadingTrack", "N/A"); + this.$store.dispatch("setCurrentTrackHidden", false); + this.$store.dispatch("reloadGamesList", true); + }, startSoundTest() { this.$emit("start-sound-test"); }, @@ -45,6 +56,21 @@ export default { }); }); }, + APIsyncGames() { + return new Promise((resolve, reject) => { + this.axios({ + method: "get", + url: `${arne.hostname}/sync`, + }) + .then(() => { + resolve(); + }) + .catch(function(error) { + console.log(error); + reject(); + }); + }); + }, }, }; diff --git a/cmd/frontend/src/main.js b/cmd/frontend/src/main.js index 9d2a5dd..9e651d0 100644 --- a/cmd/frontend/src/main.js +++ b/cmd/frontend/src/main.js @@ -15,6 +15,7 @@ const store = createStore({ someoneHasWon: false, winningScore: 20, roundStarted: false, + reloadGamesList: false, listOfPlayers: [], localPlaylist: [], playlistHistory: [ @@ -83,6 +84,9 @@ const store = createStore({ updateHowManyGames(state, payload) { state.howManyGames = payload; }, + reloadGamesList(state, payload) { + state.reloadGamesList = payload; + }, updateStopAfterCurrent(state, payload) { state.stopAfterCurrent = payload; }, @@ -190,6 +194,9 @@ const store = createStore({ updateHowManyGames(context, payload) { context.commit("updateHowManyGames", payload); }, + reloadGamesList(context, payload) { + context.commit("reloadGamesList", payload); + }, updateStopAfterCurrent(context, payload) { context.commit("updateStopAfterCurrent", payload); },