Add UIFeature to hide public space and room creation (#30708)
* Add settings to hide public room & space creation. * Add space changes. * Add room changes. * lint * Add playwright tests * don't specialcase 1 join rule * Ensure mocks get cleared * Fixup test * Add SpaceCreateMenu component unit-tests * Fixup create room test asserts * fix import
This commit is contained in:
@@ -1425,6 +1425,14 @@ export const SETTINGS: Settings = {
|
||||
supportedLevels: LEVELS_UI_FEATURE,
|
||||
default: true,
|
||||
},
|
||||
[UIFeature.AllowCreatingPublicSpaces]: {
|
||||
supportedLevels: LEVELS_UI_FEATURE,
|
||||
default: true,
|
||||
},
|
||||
[UIFeature.AllowCreatingPublicRooms]: {
|
||||
supportedLevels: LEVELS_UI_FEATURE,
|
||||
default: true,
|
||||
},
|
||||
|
||||
// Electron-specific settings, they are stored by Electron and set/read over an IPC.
|
||||
// We store them over there are they are necessary to know before the renderer process launches.
|
||||
|
||||
@@ -25,6 +25,8 @@ export const enum UIFeature {
|
||||
RoomHistorySettings = "UIFeature.roomHistorySettings",
|
||||
TimelineEnableRelativeDates = "UIFeature.timelineEnableRelativeDates",
|
||||
BulkUnverifiedSessionsReminder = "UIFeature.BulkUnverifiedSessionsReminder",
|
||||
AllowCreatingPublicRooms = "UIFeature.allowCreatingPublicRooms",
|
||||
AllowCreatingPublicSpaces = "UIFeature.allowCreatingPublicSpaces",
|
||||
}
|
||||
|
||||
export enum UIComponent {
|
||||
|
||||
Reference in New Issue
Block a user