chore: switch reference theme on settings from label to id (#285)

This commit is contained in:
Alessio Occhipinti 2018-11-16 21:25:18 +01:00 committed by Mattia Astorino
parent 10e8f932f3
commit d9ae6d0dca
3 changed files with 13 additions and 2 deletions

View file

@ -40,11 +40,11 @@ export function isAccent(accentName: string, defaults: IDefaults): boolean {
}
/**
* Determines if the passing theme label is a material theme
* Determines if the passing theme id is a material theme
*/
export function isMaterialTheme(themeName: string): boolean {
const packageJSON = getPackageJSON();
return Boolean(packageJSON.contributes.themes.find(contrib => contrib.label === themeName));
return Boolean(packageJSON.contributes.themes.find(contrib => contrib.id === themeName));
}
/**

View file

@ -24,6 +24,7 @@ export interface IPackageJSONCommand {
}
export interface IPackageJSONTheme {
id: string;
label: string;
path: string;
uiTheme: string;

View file

@ -122,51 +122,61 @@
},
"themes": [
{
"id": "eq-material-theme-default",
"label": "Material Theme",
"path": "./themes/Material-Theme-Default.json",
"uiTheme": "vs-dark"
},
{
"id": "eq-material-theme-default-high-contrast",
"label": "Material Theme High Contrast",
"path": "./themes/Material-Theme-Default-High-Contrast.json",
"uiTheme": "vs-dark"
},
{
"id": "eq-material-theme-darker",
"label": "Material Theme Darker",
"path": "./themes/Material-Theme-Darker.json",
"uiTheme": "vs-dark"
},
{
"id": "eq-material-theme-darker-high-contrast",
"label": "Material Theme Darker High Contrast",
"path": "./themes/Material-Theme-Darker-High-Contrast.json",
"uiTheme": "vs-dark"
},
{
"id": "eq-material-theme-palenight",
"label": "Material Theme Palenight",
"path": "./themes/Material-Theme-Palenight.json",
"uiTheme": "vs-dark"
},
{
"id": "eq-material-theme-palenight-high-contrast",
"label": "Material Theme Palenight High Contrast",
"path": "./themes/Material-Theme-Palenight-High-Contrast.json",
"uiTheme": "vs-dark"
},
{
"id": "eq-material-theme-ocean",
"label": "Material Theme Ocean",
"path": "./themes/Material-Theme-Ocean.json",
"uiTheme": "vs-dark"
},
{
"id": "eq-material-theme-ocean-high-contrast",
"label": "Material Theme Ocean High Contrast",
"path": "./themes/Material-Theme-Ocean-High-Contrast.json",
"uiTheme": "vs-dark"
},
{
"id": "eq-material-theme-lighter",
"label": "Material Theme Lighter",
"path": "./themes/Material-Theme-Lighter.json",
"uiTheme": "vs"
},
{
"id": "eq-material-theme-lighter-high-contrast",
"label": "Material Theme Lighter High Contrast",
"path": "./themes/Material-Theme-Lighter-High-Contrast.json",
"uiTheme": "vs"