Skip to content

Commit e5d3b23

Browse files
committed
feat: space creation disabled
Signed-off-by: subhod-i <subhod.ibettu@gmail.com>
1 parent 7c8438e commit e5d3b23

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/customisations/ComponentVisibility.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
Copyright 2025 Keypair Establishment.
23
Copyright 2024 New Vector Ltd.
34
Copyright 2021 The Matrix.org Foundation C.I.C.
45
@@ -13,10 +14,17 @@ Please see LICENSE files in the repository root for full details.
1314
// Populate this class with the details of your customisations when copying it.
1415

1516
import { type ComponentVisibilityCustomisations as IComponentVisibilityCustomisations } from "@element-hq/element-web-module-api";
17+
import { UIComponent } from "../settings/UIFeature";
1618

1719
// A real customisation module will define and export one or more of the
1820
// customisation points that make up the interface above.
1921
export const ComponentVisibilityCustomisations: IComponentVisibilityCustomisations = {
2022
// while we don't specify the functions here, their defaults are described
2123
// in their pseudo-implementations above.
24+
shouldShowComponent(component) {
25+
switch(component) {
26+
case UIComponent.CreateSpaces: return false;
27+
default: return true;
28+
}
29+
},
2230
};

0 commit comments

Comments
 (0)