@page "/admin/users"
@using Iceshrimp.Backend.Components.Admin
@using Iceshrimp.Backend.Core.Configuration
@using Iceshrimp.Backend.Core.Database.Tables
@using Microsoft.EntityFrameworkCore
@using Microsoft.Extensions.Options
@inherits AdminComponentBase
Username | Status | Actions | @foreach (var user in _users) {
---|---|---|
@@@user.Username | @{ var text = "Active"; if (user.IsSuspended) text = "Suspended"; if (user.IsAdmin) text += ", Administrator"; if (user.IsModerator) text += ", Moderator"; } @text | @if (user.Id == AuthUser.Id) { It's you! } else { if (!user.IsSuspended) { Suspend } else { Unsuspend } | Purge | Delete } |
No users found.
} else {Listing @_count local users. @if (Options.Value.Registrations == Enums.Registrations.Invite) { Registrations are invite-only. Generate invite! } else if (Options.Value.Registrations == Enums.Registrations.Open) { Registrations are open. } else { Registrations are closed. }
} @if (Offset is > 0) { } else { } @if (_users.Length == 50) { } else { } @code { [Inject] public required IOptionsSnapshot