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/clients | |
parent | 614778f6ad2633d90deffe6ef3d373c44967b10c (diff) |
Allow to change color scheme by "colorscheme" property
Diffstat (limited to 'src/console/clients')
-rw-r--r-- | src/console/clients/SettingClient.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/console/clients/SettingClient.ts b/src/console/clients/SettingClient.ts new file mode 100644 index 0000000..f75517a --- /dev/null +++ b/src/console/clients/SettingClient.ts @@ -0,0 +1,13 @@ +import Settings from "../../shared/settings/Settings"; +import * as messages from "../../shared/messages"; +import ColorScheme from "../../shared/ColorScheme"; + +export default class SettingClient { + async getColorScheme(): Promise<ColorScheme> { + const json = await browser.runtime.sendMessage({ + type: messages.SETTINGS_QUERY, + }); + const settings = Settings.fromJSON(json); + return settings.properties.colorscheme; + } +} |