Step 8.5: Move some space settings dialog construction
This commit is contained in:
parent
c8582c7199
commit
528482f74d
6 changed files with 106 additions and 16 deletions
|
@ -292,4 +292,14 @@ export enum Action {
|
|||
* No payload.
|
||||
*/
|
||||
TriggerLogout = "trigger_logout",
|
||||
|
||||
/**
|
||||
* Opens the user's preferences for the given space. Used with a OpenSpacePreferencesPayload.
|
||||
*/
|
||||
OpenSpacePreferences = "open_space_preferences",
|
||||
|
||||
/**
|
||||
* Opens the settings for the given space. Used with a OpenSpaceSettingsPayload.
|
||||
*/
|
||||
OpenSpaceSettings = "open_space_settings",
|
||||
}
|
||||
|
|
38
src/dispatcher/payloads/OpenSpacePreferencesPayload.ts
Normal file
38
src/dispatcher/payloads/OpenSpacePreferencesPayload.ts
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
|
||||
import { ActionPayload } from "../payloads";
|
||||
import { Action } from "../actions";
|
||||
|
||||
export enum SpacePreferenceTab {
|
||||
Appearance = "SPACE_PREFERENCE_APPEARANCE_TAB",
|
||||
}
|
||||
|
||||
export interface OpenSpacePreferencesPayload extends ActionPayload {
|
||||
action: Action.OpenSpacePreferences;
|
||||
|
||||
/**
|
||||
* The space to open preferences for.
|
||||
*/
|
||||
space: Room;
|
||||
|
||||
/**
|
||||
* Optional tab to open specifically, otherwise the dialog's internal default.
|
||||
*/
|
||||
initialTabId?: SpacePreferenceTab;
|
||||
}
|
29
src/dispatcher/payloads/OpenSpaceSettingsPayload.ts
Normal file
29
src/dispatcher/payloads/OpenSpaceSettingsPayload.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
|
||||
import { ActionPayload } from "../payloads";
|
||||
import { Action } from "../actions";
|
||||
|
||||
export interface OpenSpaceSettingsPayload extends ActionPayload {
|
||||
action: Action.OpenSpaceSettings;
|
||||
|
||||
/**
|
||||
* The space to open settings for.
|
||||
*/
|
||||
space: Room;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue