feat: Component toggleability and add toggleable components to quick settings menu (#707)

* feat: toggleable extensions

* fix: return all themes for quick settings

* chore: bump snjs deps

* feat: Use Switch component for toggle in Quick Settings Menu

* feat: Add toggleableComponents to footer_view

* refactor: Change "components" to "toggleableComponents"

* feat: Add checked state to component toggle in quick settings menu
This commit is contained in:
Mo
2021-10-27 10:19:42 -05:00
committed by GitHub
parent 53ec0d4742
commit fd6d83655c
9 changed files with 151 additions and 58 deletions

View File

@@ -1,9 +1,11 @@
import { PreferenceId } from '@/preferences/PreferencesMenu';
import { action, computed, makeObservable, observable } from 'mobx';
const DEFAULT_PANE = 'account';
export class PreferencesState {
private _open = false;
currentPane: PreferenceId = 'account';
currentPane: PreferenceId = DEFAULT_PANE;
constructor() {
makeObservable<PreferencesState, '_open'>(this, {
@@ -26,7 +28,7 @@ export class PreferencesState {
closePreferences = (): void => {
this._open = false;
this.currentPane = 'account';
this.currentPane = DEFAULT_PANE;
};
get isOpen(): boolean {