@page "/Rooms/Create" @using System.Text.Json @using System.Reflection @using ArcaneLibs.Extensions @using LibMatrix @using LibMatrix.EventTypes.Spec.State @using LibMatrix.EventTypes.Spec.State.RoomInfo @using LibMatrix.Responses @using MatrixUtils.Web.Classes.RoomCreationTemplates @using Microsoft.AspNetCore.Components.Forms @* @* 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 RoomServerACLEventContent).Allow.Count) allow rules@*No deny rules exist! } else {@((creationEvent["m.room.server_acls"].TypedContent as RoomServerACLEventContent).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