diff --git a/packages/app/src/components/Settings/index.jsx b/packages/app/src/components/Settings/index.jsx index 951163ea..0887d213 100644 --- a/packages/app/src/components/Settings/index.jsx +++ b/packages/app/src/components/Settings/index.jsx @@ -7,9 +7,7 @@ import classnames from "classnames" import config from "config" import { Icons, createIconRender } from "components/Icons" -import AppSettings from "schemas/settings/app" -import AccountSettings from "schemas/settings/account" - +import SettingsList from "schemas/settings" import groupsDecorator from "schemas/settingsGroupsDecorator.json" import { AboutApp } from ".." @@ -326,6 +324,22 @@ export default class SettingsMenu extends React.PureComponent { }) } + generateSettingsTabs = () => { + return Object.keys(SettingsList).map((key) => { + return + {createIconRender(SettingsList[key].icon)} + {SettingsList[key].label} + + } + > + {this.generateSettingsGroups(SettingsList[key].settings)} + + }) + } + render() { const isDevMode = window.__evite?.env?.NODE_ENV !== "production" @@ -337,72 +351,31 @@ export default class SettingsMenu extends React.PureComponent { destroyInactiveTabPane onTabClick={this.handlePageTransition} > - - - App - - } - > - {this.generateSettingsGroups(AppSettings)} -
-
-
{config.app?.siteName}
-
- - v{window.app.version} - -
-
- - {isDevMode ? : } - {isDevMode ? "development" : "stable"} - -
-
-
- AboutApp.openModal()}> - - {t => t("about")} - - -
-
-
- - - Account - - } - > - {this.generateSettingsGroups(AccountSettings)} - - - - Security - - } - > - - - - Privacy - - } - > - + {this.generateSettingsTabs()} +
+
+
{config.app?.siteName}
+
+ + v{window.app.version} + +
+
+ + {isDevMode ? : } + {isDevMode ? "development" : "stable"} + +
+
+
+ AboutApp.openModal()}> + + {t => t("about")} + + +
+
) }