From ae0d5ee4ada0b4699b01b308766dd9014c99282d Mon Sep 17 00:00:00 2001 From: Solomon Cammack Date: Sat, 15 Oct 2022 20:16:01 +0100 Subject: [PATCH] Add multi standings overlay and add option to go full-width on the generic overlay --- website/src/apps/BroadcastApp.vue | 4 +- website/src/apps/ClientApp.vue | 4 +- .../src/components/broadcast/Standings.vue | 9 ++- .../components/broadcast/StandingsTeam.vue | 7 +- .../broadcast/roots/GenericOverlay.vue | 7 +- .../broadcast/roots/MultiStandingsOverlay.vue | 72 +++++++++++++++++++ .../broadcast/roots/StandingsOverlay.vue | 2 +- website/src/router/broadcast.js | 13 +++- website/src/router/default.js | 6 +- 9 files changed, 108 insertions(+), 16 deletions(-) create mode 100644 website/src/components/broadcast/roots/MultiStandingsOverlay.vue diff --git a/website/src/apps/BroadcastApp.vue b/website/src/apps/BroadcastApp.vue index fc1ecf55..53200048 100644 --- a/website/src/apps/BroadcastApp.vue +++ b/website/src/apps/BroadcastApp.vue @@ -3,7 +3,7 @@
+ :animation-active="animationActive" :full="full"/> {{ broadcast.event.broadcast_css }} @@ -21,7 +21,7 @@ import StingerWrap from "@/components/broadcast/StingerWrap"; export default { name: "BroadcastApp", - props: ["id", "title", "top", "code", "client", "noAnimation", "noStinger", "bodyClass"], + props: ["id", "title", "top", "code", "client", "noAnimation", "noStinger", "bodyClass", "full"], components: { StingerWrap }, diff --git a/website/src/apps/ClientApp.vue b/website/src/apps/ClientApp.vue index 53d3ccdd..eb30e5e6 100644 --- a/website/src/apps/ClientApp.vue +++ b/website/src/apps/ClientApp.vue @@ -1,6 +1,6 @@ + + diff --git a/website/src/components/broadcast/roots/StandingsOverlay.vue b/website/src/components/broadcast/roots/StandingsOverlay.vue index 47f51ac8..6eb2106b 100644 --- a/website/src/components/broadcast/roots/StandingsOverlay.vue +++ b/website/src/components/broadcast/roots/StandingsOverlay.vue @@ -39,7 +39,7 @@ export default { return (this.blocks?.standings || []).find(s => s.group === this._stage); }, stageTitle() { - return this.standingsSettings?.title || this._stage; + return this.standingsSettings?.short || this.standingsSettings?.title || this._stage; } }, metaInfo() { diff --git a/website/src/router/broadcast.js b/website/src/router/broadcast.js index ec30f9cc..3b0be96e 100644 --- a/website/src/router/broadcast.js +++ b/website/src/router/broadcast.js @@ -1,4 +1,5 @@ -import MVPOverlay from "@/components/broadcast/roots/MVPOverlay"; +const MVPOverlay = () => import("@/components/broadcast/roots/MVPOverlay"); +const MultiStandingsOverlay = () => import("@/components/broadcast/roots/MultiStandingsOverlay"); const IngameOverlay = () => import("@/components/broadcast/roots/IngameOverlay"); const BreakOverlay = () => import("@/components/broadcast/break/BreakOverlay"); @@ -96,6 +97,16 @@ export default [ { path: "schedule", component: ScheduleOverlay, props: route => ({ secondary: !!route.query.secondary }) }, { path: "iframe", component: IframeOverlay, props: route => ({ url: route.query.url }) }, { path: "standings", component: StandingsOverlay, props: route => ({ stage: route.query.stage || route.query.group }) }, + { + path: "multi-standings", + component: MultiStandingsOverlay, + props: route => ({ + stageCodes: (route.query.stage || route.query.group || route.query.stages || route.query.groups || "").split(",").filter(t => t), + useCodes: !!route.query.codes, + showColumns: (route.query.columns || route.query.show || "").split(",").filter(t => t) + }) + }, + { path: "multistandings", redirect: "multi-standings" }, { path: "roster", redirect: "rosters" }, { path: "rosters", diff --git a/website/src/router/default.js b/website/src/router/default.js index 3bc04926..bded175b 100644 --- a/website/src/router/default.js +++ b/website/src/router/default.js @@ -71,7 +71,8 @@ export default [ top: route.query.top, 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 + bodyClass: route.query.class || route.query.bodyClass, + full: !!route.query.full }), children: BroadcastRoutes }, @@ -83,7 +84,8 @@ export default [ title: route.query.title, 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 + bodyClass: route.query.class || route.query.bodyClass, + full: !!route.query.full }), children: BroadcastRoutes }