);
diff --git a/src/dispatcher/actions.ts b/src/dispatcher/actions.ts
index 71493d6e44..c9b5d9e3ad 100644
--- a/src/dispatcher/actions.ts
+++ b/src/dispatcher/actions.ts
@@ -36,6 +36,7 @@ export enum Action {
/**
* Open the user settings. No additional payload information required.
+ * Optionally can include an OpenToTabPayload.
*/
ViewUserSettings = "view_user_settings",
@@ -58,4 +59,9 @@ export enum Action {
* Focuses the user's cursor to the composer. No additional payload information required.
*/
FocusComposer = "focus_composer",
+
+ /**
+ * Opens the user menu (previously known as the top left menu). No additional payload information required.
+ */
+ ToggleUserMenu = "toggle_user_menu",
}
diff --git a/src/dispatcher/payloads/OpenToTabPayload.ts b/src/dispatcher/payloads/OpenToTabPayload.ts
new file mode 100644
index 0000000000..2877ee053e
--- /dev/null
+++ b/src/dispatcher/payloads/OpenToTabPayload.ts
@@ -0,0 +1,27 @@
+/*
+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.
+*/
+
+import { ActionPayload } from "../payloads";
+import { Action } from "../actions";
+
+export interface OpenToTabPayload extends ActionPayload {
+ action: Action.ViewUserSettings | string, // TODO: Add room settings action
+
+ /**
+ * The tab ID to open in the settings view to start, if possible.
+ */
+ initialTabId?: string;
+}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 75caf5b593..22f7c1dd6f 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -2043,6 +2043,14 @@
"Uploading %(filename)s and %(count)s others|other": "Uploading %(filename)s and %(count)s others",
"Uploading %(filename)s and %(count)s others|zero": "Uploading %(filename)s",
"Uploading %(filename)s and %(count)s others|one": "Uploading %(filename)s and %(count)s other",
+ "Switch to light mode": "Switch to light mode",
+ "Switch to dark mode": "Switch to dark mode",
+ "Switch theme": "Switch theme",
+ "Security & privacy": "Security & privacy",
+ "All settings": "All settings",
+ "Archived rooms": "Archived rooms",
+ "Feedback": "Feedback",
+ "Account settings": "Account settings",
"Could not load user profile": "Could not load user profile",
"Verify this login": "Verify this login",
"Session verified": "Session verified",
diff --git a/src/theme.js b/src/theme.js
index ccb753d601..6ed0657bbc 100644
--- a/src/theme.js
+++ b/src/theme.js
@@ -62,7 +62,7 @@ function setCustomThemeVars(customTheme) {
}
}
-function getCustomTheme(themeName) {
+export function getCustomTheme(themeName) {
// set css variables
const customThemes = SettingsStore.getValue("custom_themes");
if (!customThemes) {