From bf66a720546cbc549a74dddabc9e303e3d41e51f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 18 Jun 2021 10:05:46 +0100 Subject: [PATCH] Move JoinRule, GuestAccess, HistoryVisibility enums into the js-sdk --- .../tabs/room/SecurityRoomSettingsTab.tsx | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx index 02bbcfb751..e0add2cd05 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx @@ -15,39 +15,21 @@ limitations under the License. */ import React from 'react'; +import { JoinRule, GuestAccess, HistoryVisibility } from "matrix-js-sdk/src/@types/partials"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import {_t} from "../../../../../languageHandler"; -import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; + +import { _t } from "../../../../../languageHandler"; +import { MatrixClientPeg } from "../../../../../MatrixClientPeg"; import * as sdk from "../../../../.."; import LabelledToggleSwitch from "../../../elements/LabelledToggleSwitch"; import Modal from "../../../../../Modal"; import QuestionDialog from "../../../dialogs/QuestionDialog"; import StyledRadioGroup from '../../../elements/StyledRadioGroup'; -import {SettingLevel} from "../../../../../settings/SettingLevel"; +import { SettingLevel } from "../../../../../settings/SettingLevel"; import SettingsStore from "../../../../../settings/SettingsStore"; -import {UIFeature} from "../../../../../settings/UIFeature"; +import { UIFeature } from "../../../../../settings/UIFeature"; import { replaceableComponent } from "../../../../../utils/replaceableComponent"; -// Knock and private are reserved keywords which are not yet implemented. -enum JoinRule { - Public = "public", - Knock = "knock", - Invite = "invite", - Private = "private", -} - -enum GuestAccess { - CanJoin = "can_join", - Forbidden = "forbidden", -} - -enum HistoryVisibility { - Invited = "invited", - Joined = "joined", - Shared = "shared", - WorldReadable = "world_readable", -} - interface IProps { roomId: string; }