diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-05-04 16:18:12 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-05-04 16:41:51 +0900 |
commit | 65fedca9dfc4b85acce85b9eb3272cfc76d112a7 (patch) | |
tree | 7a0d8a7fbb0a053fb39dc67ef78166ab3c252a98 /src/console/reducers/index.ts | |
parent | 614778f6ad2633d90deffe6ef3d373c44967b10c (diff) |
Allow to change color scheme by "colorscheme" property
Diffstat (limited to 'src/console/reducers/index.ts')
-rw-r--r-- | src/console/reducers/index.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/console/reducers/index.ts b/src/console/reducers/index.ts index f2ffed7..752dfd9 100644 --- a/src/console/reducers/index.ts +++ b/src/console/reducers/index.ts @@ -1,6 +1,7 @@ import * as actions from "../actions"; import Completions from "../Completions"; import CompletionType from "../../shared/CompletionType"; +import ColorScheme from "../../shared/ColorScheme"; export interface State { mode: string; @@ -11,6 +12,7 @@ export interface State { completions: Completions; select: number; viewIndex: number; + colorscheme: ColorScheme; } const defaultState = { @@ -22,6 +24,7 @@ const defaultState = { completions: [], select: -1, viewIndex: 0, + colorscheme: ColorScheme.System, }; const nextSelection = (state: State): number => { @@ -122,6 +125,11 @@ export default function reducer( ), }; } + case actions.CONSOLE_SET_COLORSCHEME: + return { + ...state, + colorscheme: action.colorscheme, + }; default: return state; } |