aboutsummaryrefslogtreecommitdiff
path: root/src/console/clients
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/clients
parent49addd75b76f185c9dad5d74e44e39cbea360510 (diff)
parent44ff8e449dba0de32500da3c3f17fc1361449717 (diff)
Merge pull request #751 from ueokande/dark-mode
Supports dark mode
Diffstat (limited to 'src/console/clients')
-rw-r--r--src/console/clients/CompletionClient.ts4
-rw-r--r--src/console/clients/SettingClient.ts13
2 files changed, 15 insertions, 2 deletions
diff --git a/src/console/clients/CompletionClient.ts b/src/console/clients/CompletionClient.ts
index 64119e8..a80918b 100644
--- a/src/console/clients/CompletionClient.ts
+++ b/src/console/clients/CompletionClient.ts
@@ -5,7 +5,7 @@ import {
ConsoleRequestBookmarksResponse,
ConsoleRequestHistoryResponse,
ConsoleRequestSearchEnginesResponse,
- ConsoleRequesttabsResponse,
+ ConsoleRequestTabsResponse,
} from "../../shared/messages";
import CompletionType from "../../shared/CompletionType";
import TabFlag from "../../shared/TabFlag";
@@ -74,7 +74,7 @@ export default class CompletionClient {
type: messages.CONSOLE_REQUEST_TABS,
query,
excludePinned,
- })) as ConsoleRequesttabsResponse;
+ })) as ConsoleRequestTabsResponse;
return resp;
}
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;
+ }
+}