From 7f8bbe383b0e281407edeb080b83d8e45aaee74c Mon Sep 17 00:00:00 2001 From: Tobias Messner Date: Sun, 3 Sep 2023 22:09:28 +0200 Subject: [PATCH 1/2] Add confetti and champions overlays --- website/package.json | 1 + website/src/apps/BroadcastApp.vue | 7 +- website/src/apps/ClientApp.vue | 4 +- .../src/components/broadcast/StingerWrap.vue | 4 ++ .../broadcast/roots/ChampionsOverlay.vue | 54 +++++++++++++++ .../broadcast/roots/ConfettiOverlay.vue | 67 +++++++++++++++++++ website/src/router/broadcast.js | 14 ++++ website/src/router/default.js | 2 + 8 files changed, 149 insertions(+), 4 deletions(-) create mode 100644 website/src/components/broadcast/roots/ChampionsOverlay.vue create mode 100644 website/src/components/broadcast/roots/ConfettiOverlay.vue diff --git a/website/package.json b/website/package.json index 786701dd..4b01caf0 100644 --- a/website/package.json +++ b/website/package.json @@ -23,6 +23,7 @@ "spacetime-informal": "^0.6.1", "timesync": "^1.0.11", "vue": "^2.7", + "vue-confetti": "^2.3.0", "vue-cookies": "^1.8.1", "vue-meta": "^2.4.0", "vue-router": "^3.2.0", diff --git a/website/src/apps/BroadcastApp.vue b/website/src/apps/BroadcastApp.vue index 618abfe5..34355936 100644 --- a/website/src/apps/BroadcastApp.vue +++ b/website/src/apps/BroadcastApp.vue @@ -1,5 +1,5 @@ diff --git a/website/src/components/broadcast/roots/ConfettiOverlay.vue b/website/src/components/broadcast/roots/ConfettiOverlay.vue new file mode 100644 index 00000000..00807a3a --- /dev/null +++ b/website/src/components/broadcast/roots/ConfettiOverlay.vue @@ -0,0 +1,67 @@ + + + diff --git a/website/src/router/broadcast.js b/website/src/router/broadcast.js index d3e47552..d7e84660 100644 --- a/website/src/router/broadcast.js +++ b/website/src/router/broadcast.js @@ -221,6 +221,20 @@ export default [ index: parseInt(route.params.index) || parseInt(route.query.index ?? route.query.number) || 1 }) }, + { + path: "confetti", + component: () => import("@/components/broadcast/roots/ConfettiOverlay.vue"), + props: route => ({ + themeId: route.query.theme || route.query.themeId || route.query.themeid || route.query.themeID + }) + }, + { + path: "champions", + component: () => import("@/components/broadcast/roots/ChampionsOverlay.vue"), + props: route => ({ + stingerText: route.query.stingerText + }) + }, /* Production staff stuff */ { path: "clock", component: () => import("@/components/broadcast/roots/MediaClock.vue") }, diff --git a/website/src/router/default.js b/website/src/router/default.js index c32c123c..992a9e7e 100644 --- a/website/src/router/default.js +++ b/website/src/router/default.js @@ -72,6 +72,7 @@ export default [ code: route.params.broadcastCode, title: route.query.title, stingerText: route.query.stingerText, + stingerThemeOverride: route.query.stingerThemeOverride || route.query.stingerTheme, top: route.query.top, noAnimation: (route.query.noAnimate || route.query.dontAnimate || route.query.noAnimation), noStinger: (route.query.noStinger || route.query.stinger === "false"), @@ -88,6 +89,7 @@ export default [ client: route.params.clientID, title: route.query.title, stingerText: route.query.stingerText, + stingerThemeOverride: route.query.stingerThemeOverride || route.query.stingerTheme, noAnimation: (route.query.noAnimate || route.query.dontAnimate || route.query.noAnimation), noStinger: (route.query.noStinger || route.query.stinger === "false"), bodyClass: route.query.class || route.query.bodyClass, From a9b7432d34f6f9effb6841a54f213bcd12e51160 Mon Sep 17 00:00:00 2001 From: Solomon Cammack Date: Sun, 3 Sep 2023 22:00:14 +0100 Subject: [PATCH 2/2] Add animation logic and some other bits --- .../src/components/broadcast/StingerWrap.vue | 7 +- .../broadcast/roots/ChampionsOverlay.vue | 12 ++- .../broadcast/roots/ConfettiOverlay.vue | 87 +++++++++++++------ 3 files changed, 77 insertions(+), 29 deletions(-) diff --git a/website/src/components/broadcast/StingerWrap.vue b/website/src/components/broadcast/StingerWrap.vue index 7856c501..f34e6561 100644 --- a/website/src/components/broadcast/StingerWrap.vue +++ b/website/src/components/broadcast/StingerWrap.vue @@ -25,7 +25,8 @@ export default { data: () => ({ showStinger: null, customTheme: null, - customText: null + customText: null, + hideText: false }), watch: { active(isActive) { @@ -45,6 +46,7 @@ export default { return logoBackground(this.useTheme); }, stingerText() { + if (this.hideText) return; return this.customText || this.text; } }, @@ -56,6 +58,9 @@ export default { updateText(text) { this.customText = text; console.log("custom stinger text", text); + }, + setTextVisibility(visibility) { + this.hideText = !visibility; } } }; diff --git a/website/src/components/broadcast/roots/ChampionsOverlay.vue b/website/src/components/broadcast/roots/ChampionsOverlay.vue index 03a24efe..55753155 100644 --- a/website/src/components/broadcast/roots/ChampionsOverlay.vue +++ b/website/src/components/broadcast/roots/ChampionsOverlay.vue @@ -1,5 +1,5 @@