Skip to content

Commit

Permalink
add snackbar to mention wip state of mini møder
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsPilgaard committed Mar 19, 2024
1 parent 0ddb085 commit 4cf2ff5
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions src/web/Jordnaer/Pages/Home/MainLandingPage.razor
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@page "/"

@inject ISnackbar Snackbar

@attribute [Layout(typeof(LandingPageLayout))]
@rendermode @(InteractiveServer)

<MetadataComponent Title="Mini Møder"
Description="Et online mødested for børnefamilier" />

<MudHidden Breakpoint="Breakpoint.SmAndDown">

<DesktopLandingPage />
Expand All @@ -16,3 +18,27 @@
<MobileLandingPage />

</MudHidden>

@code
{
protected override void OnInitialized()
{
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter;
Snackbar.Add("Mini Møder er under opbygning.\n" +
"Du kan godt begynde at bruge Mini Møder, men der mangler stadig nogle ting hist og her \ud83d\ude0a",
Severity.Info,
options =>
{
options.CloseAfterNavigation = true;
options.VisibleStateDuration = int.MaxValue;
options.SnackbarVariant = Variant.Filled;
options.ShowCloseIcon = true;
options.Onclick = snackbar =>
{
snackbar.Dispose();
Snackbar.Clear();
return Task.CompletedTask;
};
});
}
}

0 comments on commit 4cf2ff5

Please sign in to comment.