@page "/Rooms/Create" @using MatrixRoomUtils.Core.Responses @using System.Text.Json @using System.Reflection @using MatrixRoomUtils.Core.Helpers @using MatrixRoomUtils.Core.StateEventTypes @using MatrixRoomUtils.Core.StateEventTypes.Spec @using MatrixRoomUtils.Web.Classes.RoomCreationTemplates @* @* ReSharper disable once RedundantUsingDirective - Must not remove this, Rider marks this as "unused" when it's not */ *@ @using MatrixRoomUtils.Web.Shared.SimpleComponents
@JsonString*@
Preset: |
|
||||
Room name: |
|
||||
Room alias (localpart): |
|
||||
Room type: |
|
||||
History visibility: |
@{
var historyVisibility = creationEvent["m.room.history_visibility"].TypedContent as HistoryVisibilityEventData;
}
|
||||
Guest access: |
@{
var guestAccessEvent = creationEvent["m.room.guest_access"].TypedContent as GuestAccessEventData;
}
|
||||
Room icon: |
@{
var roomAvatarEvent = creationEvent["m.room.avatar"].TypedContent as RoomAvatarEventData;
}
|
||||
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: |
@{
var serverAcl = creationEvent["m.room.server_acls"].TypedContent as ServerACLEventData;
}
@((creationEvent["m.room.server_acls"].TypedContent as ServerACLEventData).Allow.Count) allow rules@(creationEvent["m.room.server_acls"].TypedContent as ServerACLEventData).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()