From b39210aad5ee03aef27b95a469ae69d8a476bd15 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Wed, 15 Apr 2026 16:05:24 +0200 Subject: [PATCH] feat: add custom sections data to Settings --- apps/web/src/settings/Settings.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/apps/web/src/settings/Settings.tsx b/apps/web/src/settings/Settings.tsx index b70095125f..4b05f7320c 100644 --- a/apps/web/src/settings/Settings.tsx +++ b/apps/web/src/settings/Settings.tsx @@ -52,6 +52,7 @@ import InviteRulesConfigController from "./controllers/InviteRulesConfigControll import { type ComputedInviteConfig } from "../@types/invite-rules.ts"; import BlockInvitesConfigController from "./controllers/BlockInvitesConfigController.ts"; import RequiresSettingsController from "./controllers/RequiresSettingsController.ts"; +import { type OrderedCustomSections, type CustomSectionsData } from "../stores/room-list-v3/section.ts"; export const defaultWatchManager = new WatchManager(); @@ -373,6 +374,8 @@ export interface Settings { "inviteRules": IBaseSetting; "blockInvites": IBaseSetting; "Developer.elementCallUrl": IBaseSetting; + "RoomList.CustomSectionData": IBaseSetting; + "RoomList.OrderedCustomSections": IBaseSetting; } export type SettingKey = keyof Settings; @@ -1371,6 +1374,22 @@ export const SETTINGS: Settings = { supportedLevels: LEVELS_ACCOUNT_SETTINGS, default: {}, }, + /** + * Managed by the {@link RoomListStoreV3} + * Store the custom section data for the room list + */ + "RoomList.CustomSectionData": { + supportedLevels: LEVELS_ACCOUNT_SETTINGS, + default: {}, + }, + /** + * Managed by the {@link RoomListStoreV3} + * Store the ordering of the custom sections for the room list + */ + "RoomList.OrderedCustomSections": { + supportedLevels: LEVELS_ACCOUNT_SETTINGS, + default: [], + }, [UIFeature.RoomHistorySettings]: { supportedLevels: LEVELS_UI_FEATURE, default: true,