Skip to content

Commit

Permalink
fix: disable unimplemented prefs sections
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Oct 21, 2021
1 parent 8d9b192 commit 7434a87
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions app/assets/javascripts/preferences/PreferencesMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
];

Expand All @@ -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(
Expand All @@ -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'
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand All @@ -26,7 +26,7 @@ export class PreferencesState {

closePreferences = (): void => {
this._open = false;
this.currentPane = 'general';
this.currentPane = 'account';
};

get isOpen() {
Expand Down

0 comments on commit 7434a87

Please sign in to comment.