From 4c9a9f2ea7e55bedc8d53fa3caf026b1da12126c Mon Sep 17 00:00:00 2001 From: MrLotU Date: Sat, 26 Aug 2023 20:21:05 +0200 Subject: [PATCH 1/6] chore: Fix missing maptype icon --- .../components/broadcast/MatchScoreboard.vue | 145 +++++++++++------- 1 file changed, 87 insertions(+), 58 deletions(-) diff --git a/website/src/components/broadcast/MatchScoreboard.vue b/website/src/components/broadcast/MatchScoreboard.vue index 9804d48a..7f7471d1 100644 --- a/website/src/components/broadcast/MatchScoreboard.vue +++ b/website/src/components/broadcast/MatchScoreboard.vue @@ -3,29 +3,31 @@
-
+
- +
-
+ :class="{ 'map-won': cleanID(map.winner?.[0]) === team.id }">
{{ !map.showNumbers ? "-" : (map[`score_${ti + 1}`] || 0) }}
-
-
-
{{ match[`score_${ti + 1}`] || 0 }}
-
-
-
- + +
+
{{ match[`score_${ti + 1}`] || 0 }}
+
+ +
+ + +.team-row .map~.map:before { + content: ""; + position: absolute; + background-color: rgba(0, 0, 0, 0.1); + right: 100%; + width: 2px; + height: 60%; +} From 93acb8ae8645c71a688d3b5bebac0c0602579ba8 Mon Sep 17 00:00:00 2001 From: Tobias Messner Date: Sat, 26 Aug 2023 20:24:40 +0200 Subject: [PATCH 2/6] Formatting --- .../components/broadcast/MatchScoreboard.vue | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/website/src/components/broadcast/MatchScoreboard.vue b/website/src/components/broadcast/MatchScoreboard.vue index 7f7471d1..5784adc2 100644 --- a/website/src/components/broadcast/MatchScoreboard.vue +++ b/website/src/components/broadcast/MatchScoreboard.vue @@ -4,25 +4,25 @@
+ :style="bg(mapTypeIcon(map))">
+ :key="team.id" :theme="team?.theme" :border-width="6" border="x">
-
+ :class="{ 'map-won': cleanID(map.winner?.[0]) === team.id }">
{{ !map.showNumbers ? "-" : (map[`score_${ti + 1}`] || 0) }}
+ :style="match[`score_${ti + 1}`] === match.first_to ? themeBackground1(team) : {}">
{{ match[`score_${ti + 1}`] || 0 }}
@@ -41,15 +41,22 @@ import { bg } from "@/utils/images"; export default { name: "MatchScoreboard", - components: { ThemeTransition, Squeezable, ThemeLogo }, + components: { + ThemeTransition, + Squeezable, + ThemeLogo + }, methods: { - themeBackground1, logoBackground1, cleanID, bg, + themeBackground1, + logoBackground1, + cleanID, + bg, mapTypeIcon(map) { if (map.map) return MapTypeIcons[map.map.type]; if (!this.match?.first_to || !this.mapTypes) return null; const mapIndex = this.maps.indexOf(map); return MapTypeIcons[this.mapTypes[mapIndex]]; - }, + } }, props: ["match", "active", "broadcast", "animateOnMount"], data: () => ({ @@ -225,7 +232,7 @@ export default { position: relative; } -.team-row .map~.map:before { +.team-row .map ~ .map:before { content: ""; position: absolute; background-color: rgba(0, 0, 0, 0.1); From 958c716088f1374a6b207cbcf84df46282287c73 Mon Sep 17 00:00:00 2001 From: MrLotU Date: Sat, 26 Aug 2023 20:56:06 +0200 Subject: [PATCH 3/6] chore: Also fix the thing knock wanted fixed --- website/src/components/broadcast/MapStatsSegment.vue | 2 +- .../src/components/broadcast/roots/MapStatsOverlay.vue | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/website/src/components/broadcast/MapStatsSegment.vue b/website/src/components/broadcast/MapStatsSegment.vue index 4c5153a7..96ad01f1 100644 --- a/website/src/components/broadcast/MapStatsSegment.vue +++ b/website/src/components/broadcast/MapStatsSegment.vue @@ -50,7 +50,7 @@ export default { }, mapGroup() { if (!this.map || !this.mapGroups.length) return null; - const group = this.mapGroups.find(group => group.name === this.map.type?.[0]); + const group = this.mapGroups.find(group => group.name === this.map.map?.type?.[0]); if (!group) return null; if (!this.map.dummy) { group.maps = group.maps.sort((a, b) => a.name === this.map.name?.[0] ? -1 : (b.name === this.map.name?.[0] ? 1 : 0)); diff --git a/website/src/components/broadcast/roots/MapStatsOverlay.vue b/website/src/components/broadcast/roots/MapStatsOverlay.vue index 7a221362..7e0ee3d0 100644 --- a/website/src/components/broadcast/roots/MapStatsOverlay.vue +++ b/website/src/components/broadcast/roots/MapStatsOverlay.vue @@ -77,9 +77,11 @@ export default { maps.push({ dummy: true, ...(this.mapTypes ? { - name: [this.mapTypes && this.mapTypes[num]], - type: [this.mapTypes && this.mapTypes[num]], - image: [{ url: DefaultMapImages[this.mapTypes[num]] }] + map: { + name: [this.mapTypes && this.mapTypes[num]], + type: [this.mapTypes && this.mapTypes[num]], + image: [{ url: DefaultMapImages[this.mapTypes[num]] }] + } } : {}) }); } From 88fb6c69da3771e38b15039a5f9ca3d86e326d81 Mon Sep 17 00:00:00 2001 From: Solomon Cammack Date: Sat, 26 Aug 2023 20:01:16 +0100 Subject: [PATCH 4/6] Minor changes --- website/src/components/broadcast/MatchScoreboard.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/website/src/components/broadcast/MatchScoreboard.vue b/website/src/components/broadcast/MatchScoreboard.vue index 5784adc2..fc3c4daa 100644 --- a/website/src/components/broadcast/MatchScoreboard.vue +++ b/website/src/components/broadcast/MatchScoreboard.vue @@ -52,7 +52,7 @@ export default { cleanID, bg, mapTypeIcon(map) { - if (map.map) return MapTypeIcons[map.map.type]; + if (map.map?.type) return MapTypeIcons[map.map.type]; if (!this.match?.first_to || !this.mapTypes) return null; const mapIndex = this.maps.indexOf(map); return MapTypeIcons[this.mapTypes[mapIndex]]; @@ -69,9 +69,6 @@ export default { } return this.active; }, - MapTypeIcons() { - return MapTypeIcons; - }, maps() { const maps = (ReactiveRoot(this.match.id, { maps: ReactiveArray("maps", { From 622cb426406a98ae6714e1e9e155ac35100553c5 Mon Sep 17 00:00:00 2001 From: MrLotU Date: Sat, 26 Aug 2023 21:08:05 +0200 Subject: [PATCH 5/6] chore: Fix knock bug fr fr --- website/src/components/broadcast/MapStatsSegment.vue | 2 +- website/src/components/broadcast/roots/MapStatsOverlay.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/components/broadcast/MapStatsSegment.vue b/website/src/components/broadcast/MapStatsSegment.vue index 96ad01f1..9284b717 100644 --- a/website/src/components/broadcast/MapStatsSegment.vue +++ b/website/src/components/broadcast/MapStatsSegment.vue @@ -50,7 +50,7 @@ export default { }, mapGroup() { if (!this.map || !this.mapGroups.length) return null; - const group = this.mapGroups.find(group => group.name === this.map.map?.type?.[0]); + const group = this.mapGroups.find(group => group.name === this.map.map?.type); if (!group) return null; if (!this.map.dummy) { group.maps = group.maps.sort((a, b) => a.name === this.map.name?.[0] ? -1 : (b.name === this.map.name?.[0] ? 1 : 0)); diff --git a/website/src/components/broadcast/roots/MapStatsOverlay.vue b/website/src/components/broadcast/roots/MapStatsOverlay.vue index 7e0ee3d0..1a3efa7c 100644 --- a/website/src/components/broadcast/roots/MapStatsOverlay.vue +++ b/website/src/components/broadcast/roots/MapStatsOverlay.vue @@ -78,8 +78,8 @@ export default { dummy: true, ...(this.mapTypes ? { map: { - name: [this.mapTypes && this.mapTypes[num]], - type: [this.mapTypes && this.mapTypes[num]], + name: this.mapTypes && this.mapTypes[num], + type: this.mapTypes && this.mapTypes[num], image: [{ url: DefaultMapImages[this.mapTypes[num]] }] } } : {}) From 20bd6147072ea790a46a924d47ef3713dbd2ad98 Mon Sep 17 00:00:00 2001 From: Solomon Cammack Date: Sat, 26 Aug 2023 20:12:41 +0100 Subject: [PATCH 6/6] Remove first_to check on match scoreboard icon --- website/src/components/broadcast/MatchScoreboard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/components/broadcast/MatchScoreboard.vue b/website/src/components/broadcast/MatchScoreboard.vue index fc3c4daa..b5677350 100644 --- a/website/src/components/broadcast/MatchScoreboard.vue +++ b/website/src/components/broadcast/MatchScoreboard.vue @@ -53,7 +53,7 @@ export default { bg, mapTypeIcon(map) { if (map.map?.type) return MapTypeIcons[map.map.type]; - if (!this.match?.first_to || !this.mapTypes) return null; + if (!this.mapTypes) return null; const mapIndex = this.maps.indexOf(map); return MapTypeIcons[this.mapTypes[mapIndex]]; }