UNPKG

matrix-react-sdk

Version:
80 lines (79 loc) 2.13 kB
import React from "react"; import { Room, RoomType, JoinRule } from "matrix-js-sdk/src/matrix"; import { IOpts } from "../../../createRoom"; interface IProps { type?: RoomType; defaultPublic?: boolean; defaultName?: string; parentSpace?: Room; defaultEncrypted?: boolean; onFinished(proceed?: false): void; onFinished(proceed: true, opts: IOpts): void; } interface IState { /** * The selected room join rule. */ joinRule: JoinRule; /** * Indicates whether the created room should have public visibility (ie, it should be * shown in the public room list). Only applicable if `joinRule` == `JoinRule.Knock`. */ isPublicKnockRoom: boolean; /** * Indicates whether end-to-end encryption is enabled for the room. */ isEncrypted: boolean; /** * The room name. */ name: string; /** * The room topic. */ topic: string; /** * The room alias. */ alias: string; /** * Indicates whether the details section is open. */ detailsOpen: boolean; /** * Indicates whether federation is disabled for the room. */ noFederate: boolean; /** * Indicates whether the room name is valid. */ nameIsValid: boolean; /** * Indicates whether the user can change encryption settings for the room. */ canChangeEncryption: boolean; } export default class CreateRoomDialog extends React.Component<IProps, IState> { private readonly askToJoinEnabled; private readonly supportsRestricted; private nameField; private aliasField; constructor(props: IProps); private roomCreateOptions; componentDidMount(): void; private onKeyDown; private onOk; private onCancel; private onNameChange; private onTopicChange; private onJoinRuleChange; private onEncryptedChange; private onAliasChange; private onDetailsToggled; private onNoFederateChange; private onNameValidate; private onIsPublicKnockRoomChange; private static validateRoomName; render(): React.ReactNode; } export {};