- {localSettings.map(setting => {
- return (
-
- {setting.category === category && (
- {
- SettingsManager.updateSetting(setting);
- }}
- buttonText={setting.buttonText || undefined}
- buttonColor={setting.buttonColor || undefined}
- />
- )}
-
- );
- })}
+ public focusSearch(){
+ $('.left-pane-setting-section .session-search-input input').focus();
+ }
+
+ render() {
+ const category = String(this.props.category)
+
+ return (
+
+ {category[0].toUpperCase() + category.substr(1)} Settings
+
);
-
- ReactDOM.render(element, document.getElementById('main-view'));
}
}
+
export class SettingsManager {
public static updateSetting({ id, type, value }) {
if (type === SessionSettingType.Toggle) {
diff --git a/ts/components/session/LeftPaneSettingSection.tsx b/ts/components/session/LeftPaneSettingSection.tsx
index 340f498bd..d928399e8 100644
--- a/ts/components/session/LeftPaneSettingSection.tsx
+++ b/ts/components/session/LeftPaneSettingSection.tsx
@@ -15,6 +15,7 @@ import { SessionIcon, SessionIconSize, SessionIconType } from './icon';
import { SessionSearchInput } from './SessionSearchInput';
export enum SessionSettingCategory {
+ General = 'general',
Account = 'account',
Privacy = 'privacy',
Notifications = 'notifications',
@@ -33,7 +34,7 @@ export class LeftPaneSettingSection extends React.Component
{
super(props);
this.state = {
- settingCategory: SessionSettingCategory.Account,
+ settingCategory: SessionSettingCategory.General,
searchQuery: '',
};