@using Netina.AdminPanel.PWA.Pages @using Radzen.Blazor @using Netina.AdminPanel.PWA.Models @inherits LayoutComponentBase @inject IPWAUpdaterService PwaUpdaterService @inject NavigationManager NavigationManager @inject IUserUtility UserUtility @inject IJSRuntime Js @_user?.FullName @_user?.PhoneNumber
@Body
@code { private string _updateText = "! نسخه جدید پنل ادمین رسید"; private ApplicationUserSDto? _user; bool open = false; void ToggleDrawer() => open = !open; private async Task LogoutAsync() { await UserUtility.LogoutAsync(); NavigationManager.NavigateTo("login", true, true); } protected override void OnInitialized() { string? version = typeof(Program)?.Assembly.GetName()?.Version?.ToString(); if (version != null) _updateText = $"نسخه جدید پنل ادمین رسید - {version}"; base.OnInitialized(); } protected override async Task OnInitializedAsync() { _user = await UserUtility.GetUserAsync(); await base.OnInitializedAsync(); } }