diff --git a/.gitattributes b/.gitattributes index 1ff0c42..6c89470 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,6 +3,12 @@ ############################################################################### * text=auto +############################################################################### +# Set language detection and syntax highlighting. +############################################################################### +*.razor linguist-language=C# +*.cshtml linguist-language=C# + ############################################################################### # Set default behavior for command prompt diff. # diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..907da0e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "nuget" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + target-branch: "dev" diff --git a/MW-GC.EventManager.Shared/MW-GC.EventManager.Shared.csproj b/MW-GC.EventManager.Shared/MW-GC.EventManager.Shared.csproj index 2105fea..5426630 100644 --- a/MW-GC.EventManager.Shared/MW-GC.EventManager.Shared.csproj +++ b/MW-GC.EventManager.Shared/MW-GC.EventManager.Shared.csproj @@ -9,7 +9,6 @@ - diff --git a/MW-GC.EventManager.Web/MW-GC.EventManager.Web.csproj b/MW-GC.EventManager.Web/MW-GC.EventManager.Web.csproj index 75efa81..24c5844 100644 --- a/MW-GC.EventManager.Web/MW-GC.EventManager.Web.csproj +++ b/MW-GC.EventManager.Web/MW-GC.EventManager.Web.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/MW-GC.EventManager.Web/Pages/Activities.razor b/MW-GC.EventManager.Web/Pages/Activities.razor index 0d212eb..01019bf 100644 --- a/MW-GC.EventManager.Web/Pages/Activities.razor +++ b/MW-GC.EventManager.Web/Pages/Activities.razor @@ -10,7 +10,7 @@ @if (_activities is null) { - +
Loading activities... @@ -19,7 +19,7 @@ } else { - + - - @{ var game = _games?.FirstOrDefault(g => g.Id == context.GameId); } - @(game?.Name ?? "—") + + @GameName(context.GameId) @@ -93,7 +94,7 @@ - @(_games?.FirstOrDefault(g => g.Id == _detailActivity.GameId)?.Name ?? "—") + @GameName(_detailActivity.GameId) @if (_detailActivity.ThemeIds.Count > 0 || _detailActivity.HolidayIds.Count > 0) @@ -195,7 +196,7 @@ @* Side-by-side theme/holiday multi-select *@ - + Themes Select applicable themes @if (_themes is not null) @@ -210,7 +211,7 @@ - + Holidays Select applicable holidays @if (_holidays is not null) @@ -274,6 +275,9 @@ ? ((dynamic)match).Name : id.ToString()[..8]; + private string GameName(Guid gameId) => + _games?.FirstOrDefault(g => g.Id == gameId)?.Name ?? "—"; + private static void ToggleId(List list, Guid id, bool add) { if (add && !list.Contains(id)) list.Add(id); diff --git a/MW-GC.EventManager.Web/Pages/Events.razor b/MW-GC.EventManager.Web/Pages/Events.razor index 2453108..7f00517 100644 --- a/MW-GC.EventManager.Web/Pages/Events.razor +++ b/MW-GC.EventManager.Web/Pages/Events.razor @@ -12,7 +12,7 @@ @if (_events is null) { - +
Loading events... @@ -21,7 +21,7 @@ } else { - + @* Themed-only toggle *@ - + @* Theme / Holiday filters *@ - + Filter by Themes Select specific themes @if (_themes is not null) @@ -128,7 +128,7 @@ - + Filter by Holidays Select specific holidays @if (_holidays is not null) @@ -170,7 +170,7 @@ { var idx = i; var sel = _custSelections[idx]; - + @@ -258,7 +258,7 @@ @foreach (var selection in _detailEvent.Selections) { var isWinner = _detailEvent.WinnerActivityId.HasValue && _detailEvent.WinnerActivityId.Value == selection.Activity.Id; - + @* Header: game + activity + winner *@ @if (_games is null) { - +
Loading games... @@ -19,7 +19,7 @@ } else { - + - + @if (!string.IsNullOrWhiteSpace(game.IconUrl)) diff --git a/MW-GC.EventManager.Web/Pages/Holidays.razor b/MW-GC.EventManager.Web/Pages/Holidays.razor index 44fad25..2337d6f 100644 --- a/MW-GC.EventManager.Web/Pages/Holidays.razor +++ b/MW-GC.EventManager.Web/Pages/Holidays.razor @@ -7,7 +7,7 @@ @if (_holidays is null) { - +
Loading holidays... @@ -16,7 +16,7 @@ } else { - + - + @holiday.Name diff --git a/MW-GC.EventManager.Web/Pages/Import.razor b/MW-GC.EventManager.Web/Pages/Import.razor index bd10142..4e8089a 100644 --- a/MW-GC.EventManager.Web/Pages/Import.razor +++ b/MW-GC.EventManager.Web/Pages/Import.razor @@ -14,7 +14,7 @@ } - + @foreach (var box in _boxes) { @@ -45,7 +45,7 @@ @if (_lastSummary is not null) { - + Last import Games: @_lastSummary.Games diff --git a/MW-GC.EventManager.Web/Pages/Themes.razor b/MW-GC.EventManager.Web/Pages/Themes.razor index d7dcddb..31efb01 100644 --- a/MW-GC.EventManager.Web/Pages/Themes.razor +++ b/MW-GC.EventManager.Web/Pages/Themes.razor @@ -7,7 +7,7 @@ @if (_themes is null) { - +
Loading themes... @@ -16,7 +16,7 @@ } else { - + - + @theme.Name diff --git a/MW-GC.EventManager.Web/staticwebapp.config.json b/MW-GC.EventManager.Web/staticwebapp.config.json index c4aac66..20c0548 100644 --- a/MW-GC.EventManager.Web/staticwebapp.config.json +++ b/MW-GC.EventManager.Web/staticwebapp.config.json @@ -16,32 +16,12 @@ "route": "/manifest.webmanifest", "allowedRoles": [ "anonymous" ] }, - { - "route": "/service-worker.js", - "allowedRoles": [ "anonymous" ] - }, - { - "route": "/service-worker.published.js", - "allowedRoles": [ "anonymous" ] - }, - { - "route": "/service-worker-assets.js", - "allowedRoles": [ "anonymous" ] - }, - { - "route": "/favicon.ico", - "allowedRoles": [ "anonymous" ] - }, - { - "route": "/icon-*.png", - "allowedRoles": [ "anonymous" ] - }, { "route": "/api/*", "allowedRoles": [ "admin" ] }, { - "route": "/*", + "route": "*", "allowedRoles": [ "admin" ] } ], diff --git a/MW-GC.EventManager.Web/wwwroot/favicon.png b/MW-GC.EventManager.Web/wwwroot/favicon.png index 8422b59..fbc10af 100644 Binary files a/MW-GC.EventManager.Web/wwwroot/favicon.png and b/MW-GC.EventManager.Web/wwwroot/favicon.png differ diff --git a/MW-GC.EventManager.Web/wwwroot/icon-192.png b/MW-GC.EventManager.Web/wwwroot/icon-192.png index 166f56d..0480aa3 100644 Binary files a/MW-GC.EventManager.Web/wwwroot/icon-192.png and b/MW-GC.EventManager.Web/wwwroot/icon-192.png differ diff --git a/MW-GC.EventManager.Web/wwwroot/icon-512.png b/MW-GC.EventManager.Web/wwwroot/icon-512.png index c2dd484..ed0d010 100644 Binary files a/MW-GC.EventManager.Web/wwwroot/icon-512.png and b/MW-GC.EventManager.Web/wwwroot/icon-512.png differ diff --git a/MW-GC.EventManager.Web/wwwroot/index.html b/MW-GC.EventManager.Web/wwwroot/index.html index 0140c58..9363fac 100644 --- a/MW-GC.EventManager.Web/wwwroot/index.html +++ b/MW-GC.EventManager.Web/wwwroot/index.html @@ -31,7 +31,7 @@ Reload 🗙
- + diff --git a/MW-GC.EventManager.Web/wwwroot/manifest.webmanifest b/MW-GC.EventManager.Web/wwwroot/manifest.webmanifest index 8ab83b7..ad90839 100644 --- a/MW-GC.EventManager.Web/wwwroot/manifest.webmanifest +++ b/MW-GC.EventManager.Web/wwwroot/manifest.webmanifest @@ -1,6 +1,6 @@ { - "name": "MW-GC.EventManager.Web", - "short_name": "MW-GC.EventManager.Web", + "name": "MWG - Event Manager", + "short_name": "Event Manager", "id": "./", "start_url": "./", "display": "standalone",