Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
1 change: 0 additions & 1 deletion MW-GC.EventManager.Shared/MW-GC.EventManager.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

<ItemGroup>
<PackageReference Include="Azure.Data.Tables" Version="12.11.0" />
<PackageReference Include="System.Text.Json" Version="10.0.9" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions MW-GC.EventManager.Web/MW-GC.EventManager.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.9" PrivateAssets="all" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.14.2" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.14.2" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.14.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.14.3" />
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 12 additions & 8 deletions MW-GC.EventManager.Web/Pages/Activities.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<FluentStack Orientation="Orientation.Vertical" VerticalGap="24">
@if (_activities is null)
{
<FluentCard>
<FluentCard AreaRestricted="false">
<div style="align-items: center; display: flex; gap: 12px; justify-content: center; min-height: 200px;">
<FluentProgressRing />
<FluentLabel>Loading activities...</FluentLabel>
Expand All @@ -19,7 +19,7 @@
}
else
{
<FluentCard Style="overflow: visible;">
<FluentCard Style="overflow: visible;" AreaRestricted="false">
<FluentStack Orientation="Orientation.Horizontal"
HorizontalAlignment="HorizontalAlignment.SpaceBetween"
VerticalAlignment="VerticalAlignment.Center"
Expand All @@ -43,9 +43,10 @@

<FluentDataGrid Items="@Filtered" TGridItem="ActivityEntity" Virtualize="true" ItemSize="44">
<PropertyColumn Property="@(a => a.Name)" Title="Name" Sortable="true" />
<TemplateColumn Title="Game" Sortable="true">
@{ var game = _games?.FirstOrDefault(g => g.Id == context.GameId); }
@(game?.Name ?? "—")
<TemplateColumn Title="Game"
Sortable="true"
SortBy="@(GridSort<ActivityEntity>.ByAscending(a => GameName(a.GameId)).ThenAscending(a => a.Name))">
@GameName(context.GameId)
</TemplateColumn>
<TemplateColumn Title="Tags">
<FluentStack Orientation="Orientation.Horizontal" HorizontalGap="4" Wrap="true">
Expand Down Expand Up @@ -93,7 +94,7 @@
</FluentStack>
<FluentStack Orientation="Orientation.Horizontal" VerticalAlignment="VerticalAlignment.Center" HorizontalGap="6" Style="margin-bottom: 16px;">
<FluentIcon Value="@(new Size16.XboxController())" Color="Color.Neutral" />
<FluentLabel Style="color: var(--neutral-foreground-hint);">@(_games?.FirstOrDefault(g => g.Id == _detailActivity.GameId)?.Name ?? "—")</FluentLabel>
<FluentLabel Style="color: var(--neutral-foreground-hint);">@GameName(_detailActivity.GameId)</FluentLabel>
</FluentStack>

@if (_detailActivity.ThemeIds.Count > 0 || _detailActivity.HolidayIds.Count > 0)
Expand Down Expand Up @@ -195,7 +196,7 @@
@* Side-by-side theme/holiday multi-select *@
<FluentGrid Spacing="3">
<FluentGridItem xs="12" sm="6">
<FluentCard Style="padding: 12px;">
<FluentCard Style="padding: 12px;" AreaRestricted="false">
<FluentLabel Weight="FontWeight.Bold" Style="margin-bottom: 4px;">Themes</FluentLabel>
<FluentLabel Typo="Typography.Body" Style="color: var(--neutral-foreground-hint); margin-bottom: 8px; font-size: 0.8rem;">Select applicable themes</FluentLabel>
@if (_themes is not null)
Expand All @@ -210,7 +211,7 @@
</FluentCard>
</FluentGridItem>
<FluentGridItem xs="12" sm="6">
<FluentCard Style="padding: 12px;">
<FluentCard Style="padding: 12px;" AreaRestricted="false">
<FluentLabel Weight="FontWeight.Bold" Style="margin-bottom: 4px;">Holidays</FluentLabel>
<FluentLabel Typo="Typography.Body" Style="color: var(--neutral-foreground-hint); margin-bottom: 8px; font-size: 0.8rem;">Select applicable holidays</FluentLabel>
@if (_holidays is not null)
Expand Down Expand Up @@ -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<Guid> list, Guid id, bool add)
{
if (add && !list.Contains(id)) list.Add(id);
Expand Down
14 changes: 7 additions & 7 deletions MW-GC.EventManager.Web/Pages/Events.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<FluentStack Orientation="Orientation.Vertical" VerticalGap="24">
@if (_events is null)
{
<FluentCard>
<FluentCard AreaRestricted="false">
<div style="align-items: center; display: flex; gap: 12px; justify-content: center; min-height: 200px;">
<FluentProgressRing />
<FluentLabel>Loading events...</FluentLabel>
Expand All @@ -21,7 +21,7 @@
}
else
{
<FluentCard Style="overflow: visible;">
<FluentCard Style="overflow: visible;" AreaRestricted="false">
<FluentStack Orientation="Orientation.Horizontal"
HorizontalAlignment="HorizontalAlignment.SpaceBetween"
VerticalAlignment="VerticalAlignment.Center"
Expand Down Expand Up @@ -106,14 +106,14 @@
</FluentGrid>

@* Themed-only toggle *@
<FluentCard Style="padding: 12px;">
<FluentCard Style="padding: 12px;" AreaRestricted="false">
<FluentSwitch @bind-Value="_custThemedOnly" Label="Themed Activities Only" />
</FluentCard>

@* Theme / Holiday filters *@
<FluentGrid Spacing="3">
<FluentGridItem xs="12" sm="6">
<FluentCard Style="padding: 12px;">
<FluentCard Style="padding: 12px;" AreaRestricted="false">
<FluentLabel Weight="FontWeight.Bold" Style="margin-bottom: 4px;">Filter by Themes</FluentLabel>
<FluentLabel Typo="Typography.Body" Style="color: var(--neutral-foreground-hint); margin-bottom: 8px; font-size: 0.8rem;">Select specific themes</FluentLabel>
@if (_themes is not null)
Expand All @@ -128,7 +128,7 @@
</FluentCard>
</FluentGridItem>
<FluentGridItem xs="12" sm="6">
<FluentCard Style="padding: 12px;">
<FluentCard Style="padding: 12px;" AreaRestricted="false">
<FluentLabel Weight="FontWeight.Bold" Style="margin-bottom: 4px;">Filter by Holidays</FluentLabel>
<FluentLabel Typo="Typography.Body" Style="color: var(--neutral-foreground-hint); margin-bottom: 8px; font-size: 0.8rem;">Select specific holidays</FluentLabel>
@if (_holidays is not null)
Expand Down Expand Up @@ -170,7 +170,7 @@
{
var idx = i;
var sel = _custSelections[idx];
<FluentCard Style="padding: 12px;">
<FluentCard Style="padding: 12px;" AreaRestricted="false">
<FluentGrid Spacing="3">
<FluentGridItem xs="12" sm="5">
<FluentLabel Typo="Typography.Body" Style="color: var(--neutral-foreground-hint); font-size: 0.75rem; margin-bottom: 4px;">
Expand Down Expand Up @@ -258,7 +258,7 @@
@foreach (var selection in _detailEvent.Selections)
{
var isWinner = _detailEvent.WinnerActivityId.HasValue && _detailEvent.WinnerActivityId.Value == selection.Activity.Id;
<FluentCard Style="@(isWinner ? "border: 2px solid var(--accent-fill-rest); background: color-mix(in srgb, var(--accent-fill-rest) 5%, transparent);" : "")">
<FluentCard Style="@(isWinner ? "border: 2px solid var(--accent-fill-rest); background: color-mix(in srgb, var(--accent-fill-rest) 5%, transparent);" : "")" AreaRestricted="false">
<FluentStack Orientation="Orientation.Vertical" VerticalGap="12" Style="padding: 8px;">
@* Header: game + activity + winner *@
<FluentStack Orientation="Orientation.Horizontal"
Expand Down
6 changes: 3 additions & 3 deletions MW-GC.EventManager.Web/Pages/Games.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<FluentStack Orientation="Orientation.Vertical" VerticalGap="24">
@if (_games is null)
{
<FluentCard>
<FluentCard AreaRestricted="false">
<div style="align-items: center; display: flex; gap: 12px; justify-content: center; min-height: 200px;">
<FluentProgressRing />
<FluentLabel>Loading games...</FluentLabel>
Expand All @@ -19,7 +19,7 @@
}
else
{
<FluentCard Style="overflow: visible;">
<FluentCard Style="overflow: visible;" AreaRestricted="false">
<FluentStack Orientation="Orientation.Horizontal"
HorizontalAlignment="HorizontalAlignment.SpaceBetween"
VerticalAlignment="VerticalAlignment.Center"
Expand Down Expand Up @@ -88,7 +88,7 @@
@foreach (var game in Filtered)
{
<FluentGridItem xs="12" sm="6" md="4" lg="3">
<FluentCard Style="height: 100%;">
<FluentCard Style="height: 100%;" AreaRestricted="false">
<FluentStack Orientation="Orientation.Vertical" VerticalGap="12" Style="height: 100%;">
<FluentStack Orientation="Orientation.Horizontal" VerticalAlignment="VerticalAlignment.Center" HorizontalGap="10">
@if (!string.IsNullOrWhiteSpace(game.IconUrl))
Expand Down
6 changes: 3 additions & 3 deletions MW-GC.EventManager.Web/Pages/Holidays.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<FluentStack Orientation="Orientation.Vertical" VerticalGap="24">
@if (_holidays is null)
{
<FluentCard>
<FluentCard AreaRestricted="false">
<div style="align-items: center; display: flex; gap: 12px; justify-content: center; min-height: 200px;">
<FluentProgressRing />
<FluentLabel>Loading holidays...</FluentLabel>
Expand All @@ -16,7 +16,7 @@
}
else
{
<FluentCard Style="overflow: visible;">
<FluentCard Style="overflow: visible;" AreaRestricted="false">
<FluentStack Orientation="Orientation.Horizontal"
HorizontalAlignment="HorizontalAlignment.SpaceBetween"
VerticalAlignment="VerticalAlignment.Center"
Expand Down Expand Up @@ -56,7 +56,7 @@
@foreach (var holiday in Filtered)
{
<FluentGridItem xs="6" sm="4" md="3" lg="2">
<FluentCard Style="text-align: center; padding: 16px;">
<FluentCard Style="text-align: center; padding: 16px;" AreaRestricted="false">
<FluentIcon Value="@(new Size24.CalendarStar())" Color="Color.Accent" Style="margin-bottom: 8px;" />
<FluentLabel Weight="FontWeight.Bold">@holiday.Name</FluentLabel>
<FluentStack Orientation="Orientation.Horizontal" HorizontalAlignment="HorizontalAlignment.Center" HorizontalGap="4" Style="margin-top: 8px;">
Expand Down
4 changes: 2 additions & 2 deletions MW-GC.EventManager.Web/Pages/Import.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</FluentMessageBar>
}

<FluentCard>
<FluentCard AreaRestricted="false">
<FluentStack Orientation="Orientation.Vertical" VerticalGap="16">
@foreach (var box in _boxes)
{
Expand Down Expand Up @@ -45,7 +45,7 @@

@if (_lastSummary is not null)
{
<FluentCard>
<FluentCard AreaRestricted="false">
<FluentLabel Weight="FontWeight.Bold" Style="margin-bottom: 8px;">Last import</FluentLabel>
<FluentStack Orientation="Orientation.Horizontal" HorizontalGap="8" Wrap="true">
<FluentBadge Appearance="Appearance.Neutral">Games: @_lastSummary.Games</FluentBadge>
Expand Down
6 changes: 3 additions & 3 deletions MW-GC.EventManager.Web/Pages/Themes.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<FluentStack Orientation="Orientation.Vertical" VerticalGap="24">
@if (_themes is null)
{
<FluentCard>
<FluentCard AreaRestricted="false">
<div style="align-items: center; display: flex; gap: 12px; justify-content: center; min-height: 200px;">
<FluentProgressRing />
<FluentLabel>Loading themes...</FluentLabel>
Expand All @@ -16,7 +16,7 @@
}
else
{
<FluentCard Style="overflow: visible;">
<FluentCard Style="overflow: visible;" AreaRestricted="false">
<FluentStack Orientation="Orientation.Horizontal"
HorizontalAlignment="HorizontalAlignment.SpaceBetween"
VerticalAlignment="VerticalAlignment.Center"
Expand Down Expand Up @@ -56,7 +56,7 @@
@foreach (var theme in Filtered)
{
<FluentGridItem xs="6" sm="4" md="3" lg="2">
<FluentCard Style="text-align: center; padding: 16px;">
<FluentCard Style="text-align: center; padding: 16px;" AreaRestricted="false">
<FluentIcon Value="@(new Size24.Color())" Color="Color.Accent" Style="margin-bottom: 8px;" />
<FluentLabel Weight="FontWeight.Bold">@theme.Name</FluentLabel>
<FluentStack Orientation="Orientation.Horizontal" HorizontalAlignment="HorizontalAlignment.Center" HorizontalGap="4" Style="margin-top: 8px;">
Expand Down
22 changes: 1 addition & 21 deletions MW-GC.EventManager.Web/staticwebapp.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
],
Expand Down
Binary file modified MW-GC.EventManager.Web/wwwroot/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MW-GC.EventManager.Web/wwwroot/icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MW-GC.EventManager.Web/wwwroot/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion MW-GC.EventManager.Web/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<a href="." class="reload">Reload</a>
<span class="dismiss">🗙</span>
</div>
<script src="_framework/blazor.webassembly#[.{fingerprint}].js"></script>
<script src="_framework/blazor.webassembly.js"></script>
<script>navigator.serviceWorker.register('service-worker.js', { updateViaCache: 'none' });</script>
</body>

Expand Down
4 changes: 2 additions & 2 deletions MW-GC.EventManager.Web/wwwroot/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading