Rename general user settings to account (#12841)
* Rename general user settings to account Everything 'general' is now elsewhere, so this is ready for its new name. * Update snapshots * Rename & update playwright test * Rename class & remove unused CSS class * Change test ID * rethemendex * More tests!! * snapshots * Put the screenshots back in the new place * Fix tests with restoreAllMocks * More screenshot renaming * More test fixes & screenshot updates * More test fixes * un-skip * Typo Co-authored-by: Robin <robin@robin.town> --------- Co-authored-by: Robin <robin@robin.town>
This commit is contained in:
parent
1be4c12fd2
commit
4e4c5c7768
20 changed files with 172 additions and 54 deletions
|
@ -32,7 +32,7 @@ import HelpIcon from "@vector-im/compound-design-tokens/assets/web/icons/help";
|
|||
|
||||
import TabbedView, { Tab, useActiveTabWithDefault } from "../../structures/TabbedView";
|
||||
import { _t, _td } from "../../../languageHandler";
|
||||
import GeneralUserSettingsTab from "../settings/tabs/user/GeneralUserSettingsTab";
|
||||
import AccountUserSettingsTab from "../settings/tabs/user/AccountUserSettingsTab";
|
||||
import SettingsStore from "../../../settings/SettingsStore";
|
||||
import LabsUserSettingsTab, { showLabsFlags } from "../settings/tabs/user/LabsUserSettingsTab";
|
||||
import AppearanceUserSettingsTab from "../settings/tabs/user/AppearanceUserSettingsTab";
|
||||
|
@ -65,8 +65,8 @@ function titleForTabID(tabId: UserTab): React.ReactNode {
|
|||
strong: (sub: string) => <span className="mx_UserSettingsDialog_title_strong">{sub}</span>,
|
||||
};
|
||||
switch (tabId) {
|
||||
case UserTab.General:
|
||||
return _t("settings|general|dialog_title", undefined, subs);
|
||||
case UserTab.Account:
|
||||
return _t("settings|account|dialog_title", undefined, subs);
|
||||
case UserTab.SessionManager:
|
||||
return _t("settings|sessions|dialog_title", undefined, subs);
|
||||
case UserTab.Appearance:
|
||||
|
@ -103,10 +103,10 @@ export default function UserSettingsDialog(props: IProps): JSX.Element {
|
|||
|
||||
tabs.push(
|
||||
new Tab(
|
||||
UserTab.General,
|
||||
_td("common|general"),
|
||||
UserTab.Account,
|
||||
_td("settings|account|title"),
|
||||
<UserProfileIcon />,
|
||||
<GeneralUserSettingsTab closeSettingsFn={props.onFinished} />,
|
||||
<AccountUserSettingsTab closeSettingsFn={props.onFinished} />,
|
||||
"UserSettingsGeneral",
|
||||
),
|
||||
);
|
||||
|
@ -216,7 +216,7 @@ export default function UserSettingsDialog(props: IProps): JSX.Element {
|
|||
return tabs as NonEmptyArray<Tab<UserTab>>;
|
||||
};
|
||||
|
||||
const [activeTabId, _setActiveTabId] = useActiveTabWithDefault(getTabs(), UserTab.General, props.initialTabId);
|
||||
const [activeTabId, _setActiveTabId] = useActiveTabWithDefault(getTabs(), UserTab.Account, props.initialTabId);
|
||||
const setActiveTabId = (tabId: UserTab): void => {
|
||||
_setActiveTabId(tabId);
|
||||
// Clear this so switching away from the tab and back to it will not show the QR code again
|
||||
|
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
export enum UserTab {
|
||||
General = "USER_GENERAL_TAB",
|
||||
Account = "USER_ACCOUNT_TAB",
|
||||
Appearance = "USER_APPEARANCE_TAB",
|
||||
Notifications = "USER_NOTIFICATIONS_TAB",
|
||||
Preferences = "USER_PREFERENCES_TAB",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue