fix: disable unimplemented prefs sections

This commit is contained in:
Mo Bitar
2021-10-21 14:48:34 -05:00
parent 8d9b192b81
commit 7434a870bd
2 changed files with 9 additions and 9 deletions

View File

@@ -25,15 +25,15 @@ interface PreferencesMenuItem {
* Items are in order of appearance
*/
const PREFERENCES_MENU_ITEMS: PreferencesMenuItem[] = [
{ id: 'general', label: 'General', icon: 'settings' },
{ id: 'account', label: 'Account', icon: 'user' },
{ id: 'appearance', label: 'Appearance', icon: 'themes' },
{ id: 'general', label: 'General', icon: 'settings' },
// { id: 'appearance', label: 'Appearance', icon: 'themes' },
{ id: 'security', label: 'Security', icon: 'security' },
{ id: 'extensions', label: 'Extensions', icon: 'tune' },
{ id: 'listed', label: 'Listed', icon: 'listed' },
{ id: 'shortcuts', label: 'Shortcuts', icon: 'keyboard' },
{ id: 'accessibility', label: 'Accessibility', icon: 'accessibility' },
{ id: 'get-free-month', label: 'Get a free month', icon: 'star' },
// { id: 'shortcuts', label: 'Shortcuts', icon: 'keyboard' },
// { id: 'accessibility', label: 'Accessibility', icon: 'accessibility' },
// { id: 'get-free-month', label: 'Get a free month', icon: 'star' },
{ id: 'help-feedback', label: 'Help & feedback', icon: 'help' },
];
@@ -46,7 +46,7 @@ const READY_PREFERENCES_MENU_ITEMS: PreferencesMenuItem[] = [
];
export class PreferencesMenu {
private _selectedPane: PreferenceId = 'general';
private _selectedPane: PreferenceId = 'account';
private _menu: PreferencesMenuItem[];
constructor(
@@ -73,7 +73,7 @@ export class PreferencesMenu {
get selectedPaneId(): PreferenceId {
return (
this._menu.find((item) => item.id === this._selectedPane)?.id ?? 'general'
this._menu.find((item) => item.id === this._selectedPane)?.id ?? 'account'
);
}

View File

@@ -3,7 +3,7 @@ import { action, computed, makeObservable, observable } from 'mobx';
export class PreferencesState {
private _open = false;
currentPane: PreferenceId = 'general';
currentPane: PreferenceId = 'account';
constructor() {
makeObservable<PreferencesState, '_open'>(this, {
@@ -26,7 +26,7 @@ export class PreferencesState {
closePreferences = (): void => {
this._open = false;
this.currentPane = 'general';
this.currentPane = 'account';
};
get isOpen() {