From d9ae6d0dca7b86986fdb020685f6a44fa3460213 Mon Sep 17 00:00:00 2001 From: Alessio Occhipinti Date: Fri, 16 Nov 2018 21:25:18 +0100 Subject: [PATCH 1/2] chore: switch reference theme on settings from label to id (#285) --- extensions/helpers/settings.ts | 4 ++-- extensions/interfaces/ipackage.json.ts | 1 + package.json | 10 ++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/extensions/helpers/settings.ts b/extensions/helpers/settings.ts index 15e4ba8..da1a811 100644 --- a/extensions/helpers/settings.ts +++ b/extensions/helpers/settings.ts @@ -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)); } /** diff --git a/extensions/interfaces/ipackage.json.ts b/extensions/interfaces/ipackage.json.ts index edd732a..0c1b572 100644 --- a/extensions/interfaces/ipackage.json.ts +++ b/extensions/interfaces/ipackage.json.ts @@ -24,6 +24,7 @@ export interface IPackageJSONCommand { } export interface IPackageJSONTheme { + id: string; label: string; path: string; uiTheme: string; diff --git a/package.json b/package.json index cb38e63..913f2ae 100644 --- a/package.json +++ b/package.json @@ -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" From bdbeee80f81a4e53d6192377b79a10219c5bf5b3 Mon Sep 17 00:00:00 2001 From: Mattia Astorino Date: Mon, 19 Nov 2018 17:55:10 +0100 Subject: [PATCH 2/2] Update README Close #286 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b77b11..500d8d1 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,11 @@ Launch *Quick Open* Paste the following command and press `Enter`: ```shell -ext install vsc-material-theme +ext install material theme ``` +And pick the one by **Mattia Astorino** (me) as author. + #### Packaged VSIX Extension [Download the latest .vsix release](https://marketplace.visualstudio.com/_apis/public/gallery/publishers/Equinusocio/vsextensions/vsc-material-theme/latest/vspackage) file from the marketplace and install it from the command line