@page "/Rooms/Create" @using System.Text.Json @using System.Reflection @using ArcaneLibs.Extensions @using LibMatrix @using LibMatrix.Extensions @using LibMatrix.Helpers @using LibMatrix.Homeservers @using LibMatrix.Responses @using LibMatrix.StateEventTypes.Spec @using MatrixRoomUtils.Web.Classes.RoomCreationTemplates @* @* ReSharper disable once RedundantUsingDirective - Must not remove this, Rider marks this as "unused" when it's not */ *@
@JsonString*@
Preset: |
@if (Presets is null) {
Presets is null! } else { |
||||
Room name: |
@if (creationEvent.Name is null) {
creationEvent.Name is null! } else {(# |
||||
Room type: |
@if (creationEvent._creationContentBaseType is null) {
creationEvent._creationContentBaseType is null! } else { |
||||
History visibility: |
|
||||
Guest access: |
|
||||
Room icon: |
|
||||
Permissions: | |||||
|
{ creationEvent.PowerLevelContentOverride.Events[_event] = int.Parse(val.Value.ToString()); }" @onfocusout="() => { creationEvent.PowerLevelContentOverride.Events = creationEvent.PowerLevelContentOverride.Events.OrderByDescending(x => x.Value).ThenBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value); }"/> | ||||
{ creationEvent.PowerLevelContentOverride.Users[_user] = int.Parse(val.Value.ToString()); }"/> | |||||
Server ACLs: |
@if (serverAcl?.Allow is null) {
No allow rules exist! } else {@((creationEvent["m.room.server_acls"].TypedContent as ServerACLEventContent).Allow.Count) allow rules@*No deny rules exist! } else {@((creationEvent["m.room.server_acls"].TypedContent as ServerACLEventContent).Deny.Count) deny rules@* |
||||
Invited members: |
@creationEvent.InitialState.Count(x => x.Type == "m.room.member") members@* *@ @foreach (var member in creationEvent.InitialState.Where(x => x.Type == "m.room.member" && x.StateKey != HomeServer.UserId)) { |
||||
Initial states: |
@code
{
private static readonly string[] ImplementedStates = { "m.room.avatar", "m.room.history_visibility", "m.room.guest_access", "m.room.server_acl" };
}
@creationEvent.InitialState.Count(x => !ImplementedStates.Contains(x.Type)) custom states
@creationEvent.InitialState.Count initial states
|
@creationEvent.ToJson(ignoreNull: true)
@creationEvent.ToJson()
@_matrixException.Message