mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
feat: splash screen and dialog navigation event
This commit is contained in:
1 parent
38c631bc44
commit
2fba32b5b4
17 files changed
+138
-13
No files matched your search
@@ -1,6 +1,25 @@
|
||||
@page "/"
|
||||
@using MediatR
|
||||
@using WotBlitzStatisticsPro.Blazor.Messages
|
||||
@using WotBlitzStatisticsPro.Blazor.Model
|
||||
@inject IMediator Mediator
|
||||
<div class="splash">
|
||||
<div class="splash-content">
|
||||
<RadzenLabel Text="Welcome to WOT Blitz statistics application!" Style="margin: 30px 0px 100px 0px"></RadzenLabel>
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
<RadzenButton Click=@(async args => { await Mediator.Publish(new LoginToWgMessage()); })
|
||||
Icon="vpn_key"
|
||||
Text="Login with WG.net ID"
|
||||
Style="width: 250px; margin: 30px" />
|
||||
<RadzenButton Click=@(async args => { await Mediator.Publish(new OpenSearchDialogMessage(DialogType.FindPlayer)); })
|
||||
Icon="person_search"
|
||||
Text="Search player"
|
||||
Style="width: 250px; margin: 30px" />
|
||||
<RadzenButton Click=@(async args => { await Mediator.Publish(new OpenSearchDialogMessage(DialogType.FindClan)); })
|
||||
Icon="screen_search_desktop"
|
||||
Text="Search clan"
|
||||
Style="width: 250px; margin: 30px" />
|
||||
|
||||
Welcome to your new app.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
.splash {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.splash-content {
|
||||
background-image: url('/Berlin.png');
|
||||
background-repeat: no-repeat;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
width: 375px;
|
||||
height: 667px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
@page "/player/{AccountId:long}"
|
||||
@inherits PlayerInfoLayoutBase
|
||||
<h3>PlayerInfoLayout</h3>
|
||||
AccountId: @AccountId
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Pages
|
||||
{
|
||||
public class PlayerInfoLayoutBase: ComponentBase
|
||||
{
|
||||
[Parameter]
|
||||
public long AccountId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,4 @@
|
||||
@using WotBlitzStatisticsPro.Blazor.Model
|
||||
@inherits SearchDialogTypeBase
|
||||
<h3>SearchDialog</h3>
|
||||
@DialogType
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public DialogType DialogType { get; set; }
|
||||
}
|
||||
<RadzenButton Click=@(args => OnClick()) Text="Ok" Style="margin-bottom: 20px; width: 150px" />
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Threading.Tasks;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Radzen;
|
||||
using WotBlitzStatisticsPro.Blazor.Messages;
|
||||
using WotBlitzStatisticsPro.Blazor.Model;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Pages
|
||||
{
|
||||
public class SearchDialogTypeBase: ComponentBase
|
||||
{
|
||||
[Inject]
|
||||
private DialogService DialogService { get; set; }
|
||||
|
||||
[Inject]
|
||||
private IMediator Mediator { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public DialogType DialogType { get; set; }
|
||||
|
||||
public async Task OnClick()
|
||||
{
|
||||
await Mediator.Publish(new OpenPlayerInfoMessage(123456789, false));
|
||||
DialogService.Close(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user