@using BTCPayServer.Abstractions.Models @model UsersViewModel @{ ViewData.SetActivePage(ServerNavPages.Users); var nextUserEmailSortOrder = (string)ViewData["NextUserEmailSortOrder"]; var userEmailSortOrder = nextUserEmailSortOrder switch { "asc" => "desc", "desc" => "asc", _ => null }; const string sortByDesc = "Sort by email descending..."; const string sortByAsc = "Sort by email ascending..."; }
@foreach (var user in Model.Users) { var status = user switch { { Disabled: true } => ("Disabled", "danger"), { Approved: false } => ("Pending Approval", "warning"), { EmailConfirmed: false } => ("Pending Email Verification", "warning"), { InvitationUrl: not null } => ("Pending Invitation", "warning"), _ => ("Active", "success") }; var detailsId = $"user_details_{user.Id}"; }
Email Stores Created Status
@user.Email @foreach (var role in user.Roles) { @Model.Roles[role] }
@user.Stores.Count() Store@(user.Stores.Count() == 1 ? "" : "s") @user.Created?.ToBrowserDate() @status.Item1
@if (user is { EmailConfirmed: false, Disabled: false }) { Resend email } @if (user is { Approved: false, Disabled: false }) { Approve } Edit @if (status.Item2 != "warning") { @(user.Disabled ? "Enable" : "Disable") } Password Reset Remove
@if (!string.IsNullOrEmpty(user.InvitationUrl)) {
} else if (user.Stores.Any()) {
    @foreach (var store in user.Stores) {
  • @store.StoreData.StoreName @store.StoreRoleId @if (store.StoreData.Archived) { archived }
  • }
} else { No stores }