2020-05-14 05:46:00 +03:00
|
|
|
/*
|
|
|
|
Copyright 2020 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Dispatcher actions also extend into any arbitrary string, so support that.
|
|
|
|
export type DispatcherAction = Action | string;
|
|
|
|
|
|
|
|
export enum Action {
|
|
|
|
// TODO: Populate with actual actions
|
2020-05-14 06:03:12 +03:00
|
|
|
// This is lazily generated as it also includes fixing a bunch of references. Work
|
|
|
|
// that we don't really want to take on in a giant chunk. We should always define
|
|
|
|
// new actions here, and ideally when we touch existing ones we take some time to
|
|
|
|
// define them correctly.
|
|
|
|
|
|
|
|
// When defining a new action, please use lower_scored_case with an optional class
|
|
|
|
// name prefix. For example, `RoomListStore.view_room` or `view_user_settings`.
|
|
|
|
// New definitions should also receive an accompanying interface in the payloads
|
|
|
|
// directory.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* View a user's profile. Should be used with a ViewUserPayload.
|
|
|
|
*/
|
|
|
|
ViewUser = "view_user",
|
2020-05-14 06:07:19 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Open the user settings. No additional payload information required.
|
2020-06-08 17:20:15 +03:00
|
|
|
* Optionally can include an OpenToTabPayload.
|
2020-05-14 06:07:19 +03:00
|
|
|
*/
|
|
|
|
ViewUserSettings = "view_user_settings",
|
2020-05-25 15:40:05 +03:00
|
|
|
|
2020-06-09 05:33:21 +03:00
|
|
|
/**
|
|
|
|
* Opens the room directory. No additional payload information required.
|
|
|
|
*/
|
|
|
|
ViewRoomDirectory = "view_room_directory",
|
|
|
|
|
2020-05-28 15:55:07 +03:00
|
|
|
/**
|
2020-05-29 20:24:45 +03:00
|
|
|
* Forces the theme to reload. No additional payload information required.
|
2020-05-28 15:55:07 +03:00
|
|
|
*/
|
|
|
|
RecheckTheme = "recheck_theme",
|
2020-05-29 20:24:45 +03:00
|
|
|
|
|
|
|
/**
|
2020-05-29 22:50:47 +03:00
|
|
|
* Provide status information for an ongoing update check. Should be used with a CheckUpdatesPayload.
|
2020-05-29 20:24:45 +03:00
|
|
|
*/
|
|
|
|
CheckUpdates = "check_updates",
|
2020-06-03 04:07:46 +03:00
|
|
|
|
|
|
|
/**
|
2021-07-08 18:33:49 +03:00
|
|
|
* Focuses the user's cursor to the send message composer. No additional payload information required.
|
2020-06-03 04:07:46 +03:00
|
|
|
*/
|
2021-07-08 18:37:39 +03:00
|
|
|
FocusSendMessageComposer = "focus_send_message_composer",
|
2020-06-08 07:06:41 +03:00
|
|
|
|
2021-07-08 18:33:49 +03:00
|
|
|
/**
|
|
|
|
* Focuses the user's cursor to the edit message composer. No additional payload information required.
|
|
|
|
*/
|
|
|
|
FocusEditMessageComposer = "focus_edit_message_composer",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Focuses the user's cursor to the edit message composer or send message
|
|
|
|
* composer based on the current edit state. No additional payload
|
|
|
|
* information required.
|
|
|
|
*/
|
|
|
|
FocusAComposer = "focus_a_composer",
|
|
|
|
|
2020-06-08 07:06:41 +03:00
|
|
|
/**
|
|
|
|
* Opens the user menu (previously known as the top left menu). No additional payload information required.
|
|
|
|
*/
|
|
|
|
ToggleUserMenu = "toggle_user_menu",
|
2020-06-15 17:33:52 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the apps root font size. Should be used with UpdateFontSizePayload
|
|
|
|
*/
|
2020-06-22 18:05:32 +03:00
|
|
|
UpdateFontSize = "update_font_size",
|
2020-06-15 17:33:52 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets a system font. Should be used with UpdateSystemFontPayload
|
|
|
|
*/
|
2020-06-22 18:05:32 +03:00
|
|
|
UpdateSystemFont = "update_system_font",
|
2020-07-06 19:57:40 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Changes room based on room list order and payload parameters. Should be used with ViewRoomDeltaPayload.
|
|
|
|
*/
|
|
|
|
ViewRoomDelta = "view_room_delta",
|
2020-07-18 14:04:48 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the phase for the right panel. Should be used with SetRightPanelPhasePayload.
|
|
|
|
*/
|
|
|
|
SetRightPanelPhase = "set_right_panel_phase",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Toggles the right panel. Should be used with ToggleRightPanelPayload.
|
|
|
|
*/
|
|
|
|
ToggleRightPanel = "toggle_right_panel",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Trigged after the phase of the right panel is set. Should be used with AfterRightPanelPhaseChangePayload.
|
|
|
|
*/
|
|
|
|
AfterRightPanelPhaseChange = "after_right_panel_phase_change",
|
2020-12-23 22:02:01 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Opens the modal dial pad
|
|
|
|
*/
|
|
|
|
OpenDialPad = "open_dial_pad",
|
|
|
|
|
2021-06-02 19:39:13 +03:00
|
|
|
/**
|
|
|
|
* Dial the phone number in the payload
|
2021-06-03 16:38:13 +03:00
|
|
|
* payload: DialNumberPayload
|
2021-06-02 19:39:13 +03:00
|
|
|
*/
|
|
|
|
DialNumber = "dial_number",
|
|
|
|
|
2021-07-15 11:55:58 +03:00
|
|
|
/**
|
|
|
|
* Start a call transfer to a Matrix ID
|
|
|
|
* payload: TransferCallPayload
|
|
|
|
*/
|
|
|
|
TransferCallToMatrixID = "transfer_call_to_matrix_id",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Start a call transfer to a phone number
|
|
|
|
* payload: TransferCallPayload
|
|
|
|
*/
|
|
|
|
TransferCallToPhoneNumber = "transfer_call_to_phone_number",
|
|
|
|
|
2020-12-23 22:02:01 +03:00
|
|
|
/**
|
|
|
|
* Fired when CallHandler has checked for PSTN protocol support
|
2021-01-04 14:54:10 +03:00
|
|
|
* payload: none
|
2020-12-23 22:02:01 +03:00
|
|
|
* XXX: Is an action the right thing for this?
|
|
|
|
*/
|
|
|
|
PstnSupportUpdated = "pstn_support_updated",
|
2021-02-12 23:55:54 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Similar to PstnSupportUpdated, fired when CallHandler has checked for virtual room support
|
|
|
|
* payload: none
|
|
|
|
* XXX: Ditto
|
|
|
|
*/
|
|
|
|
VirtualRoomSupportUpdated = "virtual_room_support_updated",
|
2021-03-05 23:20:50 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Fired when an upload has started. Should be used with UploadStartedPayload.
|
|
|
|
*/
|
|
|
|
UploadStarted = "upload_started",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fired when an upload makes progress. Should be used with UploadProgressPayload.
|
|
|
|
*/
|
|
|
|
UploadProgress = "upload_progress",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fired when an upload is completed. Should be used with UploadFinishedPayload.
|
|
|
|
*/
|
|
|
|
UploadFinished = "upload_finished",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fired when an upload fails. Should be used with UploadErrorPayload.
|
|
|
|
*/
|
|
|
|
UploadFailed = "upload_failed",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fired when an upload is cancelled by the user. Should be used with UploadCanceledPayload.
|
|
|
|
*/
|
|
|
|
UploadCanceled = "upload_canceled",
|
2021-05-24 20:23:04 +03:00
|
|
|
|
2021-05-24 16:34:06 +03:00
|
|
|
/**
|
|
|
|
* Fired when requesting to join a room
|
|
|
|
*/
|
|
|
|
JoinRoom = "join_room",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fired when successfully joining a room
|
|
|
|
*/
|
|
|
|
JoinRoomReady = "join_room_ready",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fired when joining a room failed
|
|
|
|
*/
|
2021-05-27 10:57:48 +03:00
|
|
|
JoinRoomError = "join_room_error",
|
2021-06-15 15:58:13 +03:00
|
|
|
|
2021-04-13 17:09:37 +03:00
|
|
|
/**
|
|
|
|
* Inserts content into the active composer. Should be used with ComposerInsertPayload
|
|
|
|
*/
|
|
|
|
ComposerInsert = "composer_insert",
|
2021-06-22 16:11:37 +03:00
|
|
|
|
2021-05-24 20:23:04 +03:00
|
|
|
/**
|
|
|
|
* Switches space. Should be used with SwitchSpacePayload.
|
|
|
|
*/
|
|
|
|
SwitchSpace = "switch_space",
|
2020-05-14 05:46:00 +03:00
|
|
|
}
|