aboutsummaryrefslogtreecommitdiff
path: root/src/console/clients
diff options
context:
space:
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;
+ }
+}