From 57e2fad45dcc46daa9b4e02fc48fbfcd31e2e9dd Mon Sep 17 00:00:00 2001 From: Valentin Kaelin Date: Sat, 23 Nov 2019 13:38:35 +0100 Subject: [PATCH] feat: add switch button to toggle stats in match details --- client/src/App.vue | 9 ++ client/src/assets/css/main.css | 1 + client/src/assets/css/match.css | 23 ++++ client/src/components/Match/DetailedMatch.vue | 8 +- .../components/Match/DetailedMatchTeam.vue | 114 ++++++++---------- client/src/components/Match/Match.vue | 33 +---- client/src/components/Match/MatchItems.vue | 2 +- client/src/components/SwitchToggle.vue | 86 +++++++++++++ client/src/store/index.js | 2 + client/src/store/modules/settings.js | 22 ++++ 10 files changed, 204 insertions(+), 96 deletions(-) create mode 100644 client/src/assets/css/match.css create mode 100644 client/src/components/SwitchToggle.vue create mode 100644 client/src/store/modules/settings.js diff --git a/client/src/App.vue b/client/src/App.vue index c250ddb..83d0232 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -9,6 +9,7 @@ diff --git a/client/src/assets/css/main.css b/client/src/assets/css/main.css index 6d611e1..47e9dc6 100644 --- a/client/src/assets/css/main.css +++ b/client/src/assets/css/main.css @@ -1,3 +1,4 @@ @import 'tailwind.css'; @import 'base.css'; @import 'transition.css'; +@import 'match.css'; diff --git a/client/src/assets/css/match.css b/client/src/assets/css/match.css new file mode 100644 index 0000000..22f2845 --- /dev/null +++ b/client/src/assets/css/match.css @@ -0,0 +1,23 @@ +.Win { + background-image: linear-gradient( + 90deg, + rgba(1, 97, 28, 0.3) 0%, + rgba(44, 82, 130, 0) 45% + ); +} + +.Fail { + background-image: linear-gradient( + 90deg, + rgba(140, 0, 0, 0.3) 0%, + rgba(44, 82, 130, 0) 45% + ); +} + +.Remake { + background-image: linear-gradient( + 90deg, + rgba(233, 169, 75, 0.3) 0%, + rgba(44, 82, 130, 0) 45% + ); +} diff --git a/client/src/components/Match/DetailedMatch.vue b/client/src/components/Match/DetailedMatch.vue index c095bd9..2a65022 100644 --- a/client/src/components/Match/DetailedMatch.vue +++ b/client/src/components/Match/DetailedMatch.vue @@ -3,8 +3,9 @@
-
+
+
@@ -20,10 +21,13 @@ import { mapGetters } from 'vuex' import DetailedMatchGlobalStats from '@/components/Match/DetailedMatchGlobalStats.vue' import DetailedMatchTeam from '@/components/Match/DetailedMatchTeam.vue' +import SwitchToggle from '@/components/SwitchToggle.vue' + export default { components: { DetailedMatchGlobalStats, - DetailedMatchTeam + DetailedMatchTeam, + SwitchToggle, }, props: { data: { diff --git a/client/src/components/Match/DetailedMatchTeam.vue b/client/src/components/Match/DetailedMatchTeam.vue index fc0f430..d179524 100644 --- a/client/src/components/Match/DetailedMatchTeam.vue +++ b/client/src/components/Match/DetailedMatchTeam.vue @@ -1,8 +1,8 @@