diff --git a/website/src/router/shared-routes.js b/website/src/router/shared-routes.js index d760836d..e0165e75 100644 --- a/website/src/router/shared-routes.js +++ b/website/src/router/shared-routes.js @@ -16,6 +16,7 @@ import News from "@/views/News"; import DetailedMatch from "@/views/DetailedMatch"; import MatchVOD from "@/views/sub-views/MatchVOD"; import MatchHistory from "@/views/sub-views/MatchHistory"; +import TeamComposition from "@/views/sub-views/TeamComposition"; export default [ { @@ -27,7 +28,8 @@ export default [ { path: "", component: TeamMain }, { path: "matches", component: TeamMatches }, { path: "theme", component: TeamTheme }, - { path: "details", component: TeamDetails } + { path: "details", component: TeamDetails }, + { path: "composition", component: TeamComposition } ] }, { diff --git a/website/src/views/Team.vue b/website/src/views/Team.vue index 6a5e8da3..0d4938b9 100644 --- a/website/src/views/Team.vue +++ b/website/src/views/Team.vue @@ -4,6 +4,7 @@ + @@ -81,6 +82,17 @@ export default { }) }) }); + }, + eventSettings() { + if (!this.team?.event?.blocks) return null; + try { + return JSON.parse(this.team?.event.blocks); + } catch (e) { + return null; + } + }, + useTeamCompositions() { + return this.eventSettings?.composition?.use && (this.team?.players || []).some(p => p.composition_tank_sr || p.composition_dps_sr || p.composition_support_sr); } } }; diff --git a/website/src/views/sub-views/TeamComposition.vue b/website/src/views/sub-views/TeamComposition.vue new file mode 100644 index 00000000..30692bb7 --- /dev/null +++ b/website/src/views/sub-views/TeamComposition.vue @@ -0,0 +1,81 @@ + + + + +