@page "/Users/{baid:int}/AccessCode" @inject HttpClient Client @inject IDialogService DialogService @inject AuthService AuthService @inject NavigationManager NavigationManager @inject Utilities.StringUtil StringUtil; @if (AuthService.LoginRequired && (!AuthService.IsLoggedIn || (AuthService.GetLoggedInBaid() != Baid && !AuthService.IsAdmin))) { NavigationManager.NavigateTo(!AuthService.IsLoggedIn ? "/Login" : "/"); } else if (User is null) { // Loading ... } else { @Localizer["Access Codes"] @Localizer["Add Access Code"] @Localizer["Add"] @Localizer["Access Code"] @for (var idx = 0; idx < User.AccessCodes.Count; idx++) { var accessCode = User.AccessCodes[idx]; var localIdx = idx + 1; @foreach (var digitGroup in StringUtil.SplitIntoGroups(accessCode, 4)) { @digitGroup } @Localizer["Delete"] } }
@foreach (var digitGroup in StringUtil.SplitIntoGroups(accessCode, 4)) { @digitGroup }