Skip to content

Commit

Permalink
Safe area fixes, show update alert fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey85 committed Nov 22, 2024
1 parent 686a827 commit 398048a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Pkmds.Web/App.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
}

[JSInvokable]
public void ShowUpdateMessage() => AppState.UpdateAvailable = true;
public void ShowUpdateMessage()
{
AppState.UpdateAvailable = true;
RefreshService.Refresh();
}
}
3 changes: 2 additions & 1 deletion Pkmds.Web/Components/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
Variant="@Variant.Outlined" />
</MudStack>
</MudAppBar>
<MudDrawer @bind-Open="@AppService.IsDrawerOpen">
<MudDrawer @bind-Open="@AppService.IsDrawerOpen"
Class="menu-container">
<MudStack Spacing="3"
Class="my-3">
<MudButton OnClick="@ShowLoadSaveFileDialog"
Expand Down
6 changes: 6 additions & 0 deletions Pkmds.Web/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ body, html {
box-sizing: border-box;
}

.menu-container {
padding-bottom: env(safe-area-inset-bottom, 16px); /* Fallback to 16px */
padding-left: env(safe-area-inset-left, 8px); /* Fallback to 8px */
box-sizing: border-box;
}

pkm-sprite {
object-fit: contain;
align-self: center;
Expand Down

0 comments on commit 398048a

Please sign in to comment.