-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Settings - Themes]: Implementing dropdown in settings to change them…
…es (#229) * First pass - not working * Working - needs tests * Adding tests * Removing Chromium themes and adding settings description * Remove experimental iframe flag * Creating ThemeString type and moving switch logic to toolsHost * Updating tests * Rebasing/conflict resolution
- Loading branch information
Michael Liao
authored
Oct 30, 2020
1 parent
92db863
commit 973927c
Showing
12 changed files
with
213 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
import * as vscode from "vscode"; | ||
import { SETTINGS_STORE_NAME } from "../utils"; | ||
import { ThemeString } from "./webviewEvents"; | ||
|
||
export class SettingsProvider { | ||
|
||
private static singletonInstance: SettingsProvider; | ||
|
||
public isNetworkEnabled(): boolean { | ||
const settings = vscode.workspace.getConfiguration(SETTINGS_STORE_NAME); | ||
const networkEnabled: boolean = settings.get("enableNetwork") || false; | ||
return networkEnabled; | ||
} | ||
|
||
public getThemeSettings(): ThemeString { | ||
const settings = vscode.workspace.getConfiguration(SETTINGS_STORE_NAME); | ||
const themeString: ThemeString = settings.get("themes") || "System preference"; | ||
return themeString; | ||
} | ||
|
||
public static get instance() { | ||
if (!SettingsProvider.singletonInstance) { | ||
SettingsProvider.singletonInstance = new SettingsProvider(); | ||
} | ||
|
||
return SettingsProvider.singletonInstance; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.