From 871f660483467227aba04ccacb2e9fb0f066b2b9 Mon Sep 17 00:00:00 2001 From: Ryan Raposo Date: Sat, 28 May 2022 00:50:07 -0400 Subject: [PATCH] v0.3.3 Hotfix for #44 * fix customization issue * update version to v0.3.3 in package.json, readme, * add details to changelog --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- package.json | 2 +- src/configuration.ts | 20 ++++++++++++++------ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8a3f2b..e3b4f04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.3.3] + +- Fixed issue where customizations would only apply if there was an existing entry for "workbench.colorCustomizations" in settings. + ## [0.3.2] - Fixed elements not showing full names in Palette view. diff --git a/README.md b/README.md index ae0bd11..139d4c6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Customize your color theme for VS Code. - [![Version](https://img.shields.io/badge/version-0.3.2-red)]() + [![Version](https://img.shields.io/badge/version-0.3.3-red)]() [![License](https://img.shields.io/badge/license-MIT-blue.svg)]() [![LoveIt;ShipIt](https://gitlab.com/ryanraposo/LoveItShipIt/-/raw/master/sticker/loveitshipit.svg)](http://github.com/ryanraposo/LoveItShipIt) @@ -59,7 +59,7 @@ The recommended method for installing CodeUI is via the Extension Marketplace, a Alternatively, you can download the VSIX from [releases](https://github.com/ryanraposo/codeui/releases) and install using the terminal with command: ``` -code --install-extension codeui-0.3.2.vsix +code --install-extension codeui-0.3.3.vsix ``` *Note: it may be necessary to reload vscode if installing via the terminal.* diff --git a/package.json b/package.json index 5aac77d..3288292 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "SEE LICENSE IN LICENSE.md", "description": "Customize your color theme for VS Code.", "icon": "resources/marketplace/codeui-128.png", - "version": "0.3.2", + "version": "0.3.3", "preview": true, "galleryBanner": { "color": "#18191e", diff --git a/src/configuration.ts b/src/configuration.ts index f7a0a9c..242cfd7 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -13,13 +13,21 @@ class Config { } getWorkbenchColorCustomizations(scope: vscode.ConfigurationTarget) { - const customizations = this.config.inspect('workbench.colorCustomizations'); - if (customizations) { - return scope == vscode.ConfigurationTarget.Global - ? customizations.globalValue - : customizations.workspaceValue; + const customizationSettingsObj = this.config.inspect('workbench.colorCustomizations'); + let workbenchColorCustomizations : any = {}; + + if (customizationSettingsObj) { + if (scope === vscode.ConfigurationTarget.Global) { + workbenchColorCustomizations = customizationSettingsObj.globalValue; + } + if (scope === vscode.ConfigurationTarget.Workspace) { + workbenchColorCustomizations = customizationSettingsObj.workspaceValue; + } } - return {}; + if (workbenchColorCustomizations === undefined) { + return {}; + } + return workbenchColorCustomizations; } getWorkspaceRootFolder(): vscode.WorkspaceFolder | undefined {