mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-24 03:40:07 +02:00
feat: saving logged-in user to local storage + tests
This commit is contained in:
1 parent
07cda06fea
commit
6cbb809f44
8 files changed
+264
-13
No files matched your search
@@ -15,7 +15,7 @@
|
||||
<RadzenLabel Text=@Localize["Region"] />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<RadzenDropDown @bind-Value=@_currentRealmType
|
||||
<RadzenDropDown @bind-Value=@CurrentRealmType
|
||||
Data=@_realms
|
||||
ValueProperty="RealmType"
|
||||
Style="margin-bottom: 10px; width: 87px"
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
RealmType _currentRealmType = RealmType.Eu;
|
||||
public RealmType CurrentRealmType { get; set; } = RealmType.Eu;
|
||||
|
||||
readonly List<RealmSelector> _realms = new()
|
||||
{
|
||||
@@ -47,7 +47,7 @@
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var settings = await LocalStorageService.ReadSettings();
|
||||
_currentRealmType = settings.RealmType;
|
||||
CurrentRealmType = settings.RealmType;
|
||||
}
|
||||
|
||||
public async Task OnRealmChanged(object value)
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
public async Task RedirectToWg()
|
||||
{
|
||||
await Mediator.Publish(new RedirectToWgLoginMessage(_currentRealmType));
|
||||
await Mediator.Publish(new RedirectToWgLoginMessage(CurrentRealmType));
|
||||
|
||||
DialogService.Close(true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user