From 1c034bbc67362ab7f45f743cd968403780a4dcf1 Mon Sep 17 00:00:00 2001 From: MrLotU Date: Wed, 23 Oct 2024 02:37:51 +0200 Subject: [PATCH] Take game into account like civilized muppets --- .../website/dashboard/BroadcastCustomisation.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/src/components/website/dashboard/BroadcastCustomisation.vue b/website/src/components/website/dashboard/BroadcastCustomisation.vue index 7223f9a6..ef771cb9 100644 --- a/website/src/components/website/dashboard/BroadcastCustomisation.vue +++ b/website/src/components/website/dashboard/BroadcastCustomisation.vue @@ -220,9 +220,12 @@ export default { const heroes = (ReactiveRoot("Heroes", { "ids": ReactiveArray("ids") })?.ids || []); - return [ + return this.broadcast.event.game !== "Overwatch" ? [{ value: null, text: "No hero" }, ...heroes.filter(h => h.game === this.broadcast.event.game).map((h) => ({ + text: h.name, + value: h.id + }))] : [ { value: null, text: "No hero" }, - ...["DPS", "Tank", "Support", "Deadlock"].map(key => ({ + ...["DPS", "Tank", "Support"].map(key => ({ text: key, options: heroes.filter(h => h.role === key).sort((a,b) => sortAlpha(a?.name, b?.name)).map(h => ({ text: h.name,