aboutsummaryrefslogtreecommitdiff
path: root/src/console/reducers
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-05-04 17:50:42 +0900
committerGitHub <noreply@github.com>2020-05-04 17:50:42 +0900
commit69b6894b1997a773678709a7cd591afddc15c8ce (patch)
tree07e4c665829236e733316ae6f2684fe03b0a6781 /src/console/reducers
parent49addd75b76f185c9dad5d74e44e39cbea360510 (diff)
parent44ff8e449dba0de32500da3c3f17fc1361449717 (diff)
Merge pull request #751 from ueokande/dark-mode
Supports dark mode
Diffstat (limited to 'src/console/reducers')
-rw-r--r--src/console/reducers/index.ts8
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;
}