feat: media query added

This commit is contained in:
Michael Shabanov committed 2021-10-25 18:34:55 +03:00
1 parent bebb5ee692
commit d3e1e52e19
7 files changed
+45

No files matched your search

@@ -4,6 +4,7 @@
<RadzenProgressBar Value="100" ShowValue="false" Mode="ProgressBarMode.Indeterminate"
Visible="@(AccountInfo == null)"
Style="width: 100%; margin-top: 10px;" />
SmallScreen = @SmallScreen
@if (AccountInfo != null)
{
<h1>
@@ -22,6 +22,9 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
[Inject]
public INotificationsService Notifications { get; set; }
[Inject]
public IMediaQueriesService MediaQueriesService { get; set; }
[Parameter]
public long AccountId { get; set; }
@@ -32,12 +35,16 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
public IReadOnlyList<ISection> AchievementsBySection { get; set; }
public bool SmallScreen { get; set; }
protected override async Task OnInitializedAsync()
{
var loggedInInfo = await LocalStorageService.GetItemAsync<LoginInfo>(Constants.LoginInfoLocalStorageKey);
var settings = await LocalStorageService.ReadSettings();
CurrentRealmType = settings.RealmType;
SmallScreen = await MediaQueriesService.IsScreenWidthLessThen(1000);
try
{
// Maybe add refresh button instead of calling mutation each time