@@ -14,7 +14,9 @@ import {
1414 Orientation ,
1515 PairCharacters ,
1616 ProcessAssembly ,
17+ Theme ,
1718} from './types' ;
19+ import { showThemeSelector } from './selectors' ;
1820
1921const MONACO_THEMES = [
2022 'vs' , 'vs-dark' , 'vscode-dark-plus' ,
@@ -24,17 +26,21 @@ const ConfigMenu: React.FC = () => {
2426 const keybinding = useAppSelector ( ( state ) => state . configuration . ace . keybinding ) ;
2527 const aceTheme = useAppSelector ( ( state ) => state . configuration . ace . theme ) ;
2628 const monacoTheme = useAppSelector ( ( state ) => state . configuration . monaco . theme ) ;
29+ const theme = useAppSelector ( ( state ) => state . configuration . theme ) ;
2730 const orientation = useAppSelector ( ( state ) => state . configuration . orientation ) ;
2831 const editorStyle = useAppSelector ( ( state ) => state . configuration . editor ) ;
2932 const pairCharacters = useAppSelector ( ( state ) => state . configuration . ace . pairCharacters ) ;
3033 const assemblyFlavor = useAppSelector ( ( state ) => state . configuration . assemblyFlavor ) ;
3134 const demangleAssembly = useAppSelector ( ( state ) => state . configuration . demangleAssembly ) ;
3235 const processAssembly = useAppSelector ( ( state ) => state . configuration . processAssembly ) ;
3336
37+ const showTheme = useAppSelector ( showThemeSelector ) ;
38+
3439 const dispatch = useAppDispatch ( ) ;
3540 const changeAceTheme = useCallback ( ( t : string ) => dispatch ( config . changeAceTheme ( t ) ) , [ dispatch ] ) ;
3641 const changeMonacoTheme = useCallback ( ( t : string ) => dispatch ( config . changeMonacoTheme ( t ) ) , [ dispatch ] ) ;
3742 const changeKeybinding = useCallback ( ( k : string ) => dispatch ( config . changeKeybinding ( k ) ) , [ dispatch ] ) ;
43+ const changeTheme = useCallback ( ( t : Theme ) => dispatch ( config . changeTheme ( t ) ) , [ dispatch ] ) ;
3844 const changeOrientation = useCallback ( ( o : Orientation ) => dispatch ( config . changeOrientation ( o ) ) , [ dispatch ] ) ;
3945 const changeEditorStyle = useCallback ( ( e : Editor ) => dispatch ( config . changeEditor ( e ) ) , [ dispatch ] ) ;
4046 const changeAssemblyFlavor =
@@ -98,6 +104,13 @@ const ConfigMenu: React.FC = () => {
98104 </ MenuGroup >
99105
100106 < MenuGroup title = "UI" >
107+ { showTheme && (
108+ < SelectConfig name = "Theme" value = { theme } onChange = { changeTheme } >
109+ { /* <option value={Theme.System}>System</option> */ }
110+ < option value = { Theme . Light } > Light</ option >
111+ < option value = { Theme . Dark } > Dark</ option >
112+ </ SelectConfig >
113+ ) }
101114 < SelectConfig
102115 name = "Orientation"
103116 value = { orientation }
0 commit comments