From 71ffca1c37b846ece37dbd815fc33f1c75a0daa3 Mon Sep 17 00:00:00 2001 From: Evan Strat <5790137+evan10s@users.noreply.github.com> Date: Sun, 29 Oct 2023 02:30:35 -0400 Subject: [PATCH] feat(frc_events): Add FRC Events as an alternative match data source (#60) Co-authored-by: Evan Strat --- .../components/alerts/FrcEventsWarning.vue | 25 +++ client/src/components/alerts/GlobalAlerts.vue | 2 + .../components/alerts/NoPlaylistMappings.vue | 1 + .../src/components/alerts/PrivateUploads.vue | 1 + .../components/alerts/SandboxModeAlert.vue | 1 + .../alerts/YouTubeAuthIncompleteAlert.vue | 1 + .../matches/MatchDataAttribution.vue | 19 ++ .../src/components/matches/MatchSelector.vue | 13 +- client/src/types/IObfuscatedSecrets.ts | 1 + client/src/types/ISettings.ts | 1 + client/src/views/Settings.vue | 57 +++++- server/settings/secrets.example.json | 3 +- server/settings/settings.example.json | 3 +- server/src/models/CompLevel.ts | 32 +++ server/src/models/Settings.ts | 2 + server/src/models/frcEvents/frcScoredMatch.ts | 191 ++++++++++++++++++ .../frcEvents/frcScoredMatchesResponse.ts | 5 + server/src/models/frcEvents/frcTeam.ts | 5 + .../models/frcEvents/frcTournamentLevel.ts | 2 + .../src/models/theBlueAlliance/tbaAlliance.ts | 2 +- server/src/repos/FrcEventsRepo.ts | 121 +++++++++++ server/src/routes/matches.ts | 8 +- server/src/services/MatchesService.ts | 82 +++++++- server/src/services/SettingsService.ts | 1 + 24 files changed, 566 insertions(+), 13 deletions(-) create mode 100644 client/src/components/alerts/FrcEventsWarning.vue create mode 100644 client/src/components/matches/MatchDataAttribution.vue create mode 100644 server/src/models/frcEvents/frcScoredMatch.ts create mode 100644 server/src/models/frcEvents/frcScoredMatchesResponse.ts create mode 100644 server/src/models/frcEvents/frcTeam.ts create mode 100644 server/src/models/frcEvents/frcTournamentLevel.ts create mode 100644 server/src/repos/FrcEventsRepo.ts diff --git a/client/src/components/alerts/FrcEventsWarning.vue b/client/src/components/alerts/FrcEventsWarning.vue new file mode 100644 index 0000000..4c94267 --- /dev/null +++ b/client/src/components/alerts/FrcEventsWarning.vue @@ -0,0 +1,25 @@ + + diff --git a/client/src/components/alerts/GlobalAlerts.vue b/client/src/components/alerts/GlobalAlerts.vue index b28e244..e9506a7 100644 --- a/client/src/components/alerts/GlobalAlerts.vue +++ b/client/src/components/alerts/GlobalAlerts.vue @@ -4,6 +4,7 @@ + @@ -12,4 +13,5 @@ import SandboxModeAlert from "@/components/alerts/SandboxModeAlert.vue"; import YouTubeAuthIncompleteAlert from "@/components/alerts/YouTubeAuthIncompleteAlert.vue"; import NoPlaylistMappings from "@/components/alerts/NoPlaylistMappings.vue"; import PrivateUploads from "@/components/alerts/PrivateUploads.vue"; +import FrcEventsWarning from "@/components/alerts/FrcEventsWarning.vue"; diff --git a/client/src/components/alerts/NoPlaylistMappings.vue b/client/src/components/alerts/NoPlaylistMappings.vue index 687c784..f8d6049 100644 --- a/client/src/components/alerts/NoPlaylistMappings.vue +++ b/client/src/components/alerts/NoPlaylistMappings.vue @@ -2,6 +2,7 @@ diff --git a/client/src/components/alerts/PrivateUploads.vue b/client/src/components/alerts/PrivateUploads.vue index 08c7926..8e861f5 100644 --- a/client/src/components/alerts/PrivateUploads.vue +++ b/client/src/components/alerts/PrivateUploads.vue @@ -2,6 +2,7 @@ diff --git a/client/src/components/alerts/SandboxModeAlert.vue b/client/src/components/alerts/SandboxModeAlert.vue index bfc72cc..100ad7b 100644 --- a/client/src/components/alerts/SandboxModeAlert.vue +++ b/client/src/components/alerts/SandboxModeAlert.vue @@ -2,6 +2,7 @@ diff --git a/client/src/components/alerts/YouTubeAuthIncompleteAlert.vue b/client/src/components/alerts/YouTubeAuthIncompleteAlert.vue index 6368438..190cd65 100644 --- a/client/src/components/alerts/YouTubeAuthIncompleteAlert.vue +++ b/client/src/components/alerts/YouTubeAuthIncompleteAlert.vue @@ -3,6 +3,7 @@ color="error" variant="tonal" :rounded="0" + density="comfortable" icon="mdi-alert-circle" >