From 0ecb7ff06690df9360d316d42616611ccac1a983 Mon Sep 17 00:00:00 2001 From: LasaleFamine Date: Sun, 12 Aug 2018 11:37:25 +0200 Subject: [PATCH 01/10] chore: check on installation type now as single module --- extensions/helpers/check-installation.ts | 34 ++++++++++++++++++++ extensions/helpers/should-show-changelog.ts | 35 --------------------- extensions/helpers/write-changelog.ts | 16 ++++++++++ extensions/interfaces/iinstallation-type.ts | 4 +++ extensions/material.theme.config.ts | 15 ++++----- 5 files changed, 62 insertions(+), 42 deletions(-) create mode 100644 extensions/helpers/check-installation.ts delete mode 100644 extensions/helpers/should-show-changelog.ts create mode 100644 extensions/helpers/write-changelog.ts create mode 100644 extensions/interfaces/iinstallation-type.ts diff --git a/extensions/helpers/check-installation.ts b/extensions/helpers/check-installation.ts new file mode 100644 index 0000000..fc52488 --- /dev/null +++ b/extensions/helpers/check-installation.ts @@ -0,0 +1,34 @@ +import {getDefaultValues, getPackageJSON} from './fs'; +import {IInstallationType} from '../interfaces/iinstallation-type'; + +const splitVersion = (input: string): {major: number; minor: number; patch: number} => { + const [major, minor, patch] = input.split('.').map(i => parseInt(i, 10)); + return {major, minor, patch}; +}; + +export default (): IInstallationType => { + const out: IInstallationType = { + isUpdate: false, + isFirstInstall: false + }; + + const defaults = getDefaultValues(); + const packageJSON = getPackageJSON(); + + const isFirstInstall = defaults.changelog === undefined || + (defaults.changelog !== undefined && typeof defaults.changelog.lastversion !== 'string'); + + if (isFirstInstall) { + return {...out, isFirstInstall}; + } + + const versionCurrent = splitVersion(packageJSON.version); + const versionOld = isFirstInstall ? null : splitVersion(defaults.changelog.lastversion); + + const isUpdate = !versionOld || + versionCurrent.major > versionOld.major || + versionCurrent.minor > versionOld.minor || + versionCurrent.patch > versionOld.patch; + + return {...out, isUpdate}; +}; diff --git a/extensions/helpers/should-show-changelog.ts b/extensions/helpers/should-show-changelog.ts deleted file mode 100644 index f05b780..0000000 --- a/extensions/helpers/should-show-changelog.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as path from 'path'; - -import {IDefaults} from './../interfaces/idefaults'; - -import {getDefaultValues, getPackageJSON, writeFile} from './fs'; - -const splitVersion = (input: string): {major: number; minor: number; patch: number} => { - const [major, minor, patch] = input.split('.').map(i => parseInt(i, 10)); - return {major, minor, patch}; -}; - -const writeDefaults = (defaults: IDefaults) => - writeFile(path.join('./extensions/defaults.json'), JSON.stringify(defaults, null, 2)); - -export default (): boolean => { - const defaults = getDefaultValues(); - const packageJSON = getPackageJSON(); - - const defaultsNotPresent = defaults.changelog === undefined || - (defaults.changelog !== undefined && typeof defaults.changelog.lastversion !== 'string'); - - const versionCurrent = splitVersion(packageJSON.version); - const versionOld = defaultsNotPresent ? null : splitVersion(defaults.changelog.lastversion); - - const out = !versionOld || - versionCurrent.major > versionOld.major || - versionCurrent.minor > versionOld.minor || - versionCurrent.patch > versionOld.patch; - - const newChangelog = {...defaults.changelog, lastversion: packageJSON.version}; - const newDefaults = {...defaults, changelog: newChangelog}; - writeDefaults(newDefaults); - - return out; -}; diff --git a/extensions/helpers/write-changelog.ts b/extensions/helpers/write-changelog.ts new file mode 100644 index 0000000..53fa129 --- /dev/null +++ b/extensions/helpers/write-changelog.ts @@ -0,0 +1,16 @@ +import * as path from 'path'; +import {getDefaultValues, getPackageJSON, writeFile} from './fs'; + +import {IDefaults} from './../interfaces/idefaults'; + +const writeDefaults = (defaults: IDefaults) => + writeFile(path.join('./extensions/defaults.json'), JSON.stringify(defaults, null, 2)); + +export default (): void => { + const defaults = getDefaultValues(); + const packageJSON = getPackageJSON(); + + const newChangelog = {...defaults.changelog, lastversion: packageJSON.version}; + const newDefaults = {...defaults, changelog: newChangelog}; + writeDefaults(newDefaults); +}; diff --git a/extensions/interfaces/iinstallation-type.ts b/extensions/interfaces/iinstallation-type.ts new file mode 100644 index 0000000..b3d6325 --- /dev/null +++ b/extensions/interfaces/iinstallation-type.ts @@ -0,0 +1,4 @@ +export interface IInstallationType { + isUpdate: boolean; + isFirstInstall: boolean; +} diff --git a/extensions/material.theme.config.ts b/extensions/material.theme.config.ts index e3086e9..b603979 100644 --- a/extensions/material.theme.config.ts +++ b/extensions/material.theme.config.ts @@ -7,10 +7,14 @@ import * as ThemeCommands from './commands'; import {isAutoApplyEnable} from './helpers/settings'; import {onChangeConfiguration} from './helpers/configuration-change'; import {infoMessage, changelogMessage} from './helpers/messages'; -import shouldShowChangelog from './helpers/should-show-changelog'; +import checkInstallation from './helpers/check-installation'; +import writeChangelog from './helpers/write-changelog'; export async function activate() { const config = Workspace.getConfiguration(); + const installationType = checkInstallation(); + + writeChangelog(); // Listen on set theme: when the theme is Material Theme, just adjust icon and accent. Workspace.onDidChangeConfiguration(onChangeConfiguration); @@ -20,17 +24,14 @@ export async function activate() { config.update('materialTheme.cache.workbench', undefined, true); } - if (shouldShowChangelog()) { - const show = await changelogMessage(); - if (show) { - ThemeCommands.showChangelog(); - } + const shouldShowChangelog = (installationType.isFirstInstall || installationType.isUpdate) && await changelogMessage(); + if (shouldShowChangelog) { + ThemeCommands.showChangelog(); } // Registering commands Commands.registerCommand('materialTheme.setAccent', async () => { const wasSet = await ThemeCommands.accentsSetter(); - if (wasSet) { return isAutoApplyEnable() ? ThemeCommands.fixIcons() : infoMessage(); } From a42b3a0f86136495b6bba9078d75a21b711907c6 Mon Sep 17 00:00:00 2001 From: LasaleFamine Date: Sun, 12 Aug 2018 11:52:58 +0200 Subject: [PATCH 02/10] feat(Reload notification): added support for after-install notification --- extensions/helpers/messages.ts | 20 ++++++++++++++++++-- extensions/material.theme.config.ts | 11 +++++++++-- package.json | 7 ++++++- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/extensions/helpers/messages.ts b/extensions/helpers/messages.ts index c68c9d8..a9bfc54 100644 --- a/extensions/helpers/messages.ts +++ b/extensions/helpers/messages.ts @@ -12,14 +12,30 @@ const MESSAGES = { CHANGELOG: { message: 'Material Theme was updated. Check the release notes for more details.', options: {ok: 'Show me', cancel: 'Maybe later'} + }, + INSTALLATION: { + message: 'Thank you for installing Material Theme! Would you like to enable the auto-application (with window reload when needed) of the Material Theme icons?', + options: {ok: 'Sure!', cancel: 'Nope :('} } }; export const infoMessage = async () => { - if (await Window.showInformationMessage(MESSAGES.INFO.message, MESSAGES.INFO.options.ok, MESSAGES.INFO.options.cancel) === MESSAGES.INFO.options.ok) { + if (await Window.showInformationMessage( + MESSAGES.INFO.message, + ...MESSAGES.INFO.options as any + ) === MESSAGES.INFO.options.ok) { ThemeCommands.fixIcons(); } }; export const changelogMessage = async () => - await Window.showInformationMessage(MESSAGES.CHANGELOG.message, MESSAGES.CHANGELOG.options.ok, MESSAGES.CHANGELOG.options.cancel) === MESSAGES.CHANGELOG.options.ok; + await Window.showInformationMessage( + MESSAGES.CHANGELOG.message, + ...MESSAGES.CHANGELOG.options as any + ) === MESSAGES.CHANGELOG.options.ok; + +export const installationMessage = async () => + await Window.showInformationMessage( + MESSAGES.INSTALLATION.message, + ...MESSAGES.INSTALLATION.options as any + ) === MESSAGES.INSTALLATION.options.ok; diff --git a/extensions/material.theme.config.ts b/extensions/material.theme.config.ts index b603979..f13f22d 100644 --- a/extensions/material.theme.config.ts +++ b/extensions/material.theme.config.ts @@ -4,9 +4,9 @@ import { } from 'vscode'; import * as ThemeCommands from './commands'; -import {isAutoApplyEnable} from './helpers/settings'; +import {isAutoApplyEnable, setCustomSetting} from './helpers/settings'; import {onChangeConfiguration} from './helpers/configuration-change'; -import {infoMessage, changelogMessage} from './helpers/messages'; +import {infoMessage, changelogMessage, installationMessage} from './helpers/messages'; import checkInstallation from './helpers/check-installation'; import writeChangelog from './helpers/write-changelog'; @@ -24,6 +24,13 @@ export async function activate() { config.update('materialTheme.cache.workbench', undefined, true); } + if (installationType.isFirstInstall) { + const enableAutoApply = await installationMessage(); + await setCustomSetting('autoApplyIcons', enableAutoApply); + // Set true always on new installation + await setCustomSetting('showReloadNotification', true); + } + const shouldShowChangelog = (installationType.isFirstInstall || installationType.isUpdate) && await changelogMessage(); if (shouldShowChangelog) { ThemeCommands.showChangelog(); diff --git a/package.json b/package.json index 8e58291..9aa89e6 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,12 @@ }, "materialTheme.autoApplyIcons": { "type": "boolean", - "description": "Enable/disable auto-apply of Material Theme icons", + "description": "Enable/disable auto-apply of Material Theme icons with window reload when needed", + "default": false + }, + "materialTheme.showReloadNotification": { + "type": "boolean", + "description": "Useful when autoApplyIcons is false and you want to be asked to reload the window when needed", "default": true }, "materialTheme.fixIconsRunning": { From 440c1049cf8324d89434f26738e7b40bce3d38da Mon Sep 17 00:00:00 2001 From: LasaleFamine Date: Sun, 12 Aug 2018 12:48:23 +0200 Subject: [PATCH 03/10] feat(Reload notification): added support never show again notification --- extensions/helpers/configuration-change.ts | 24 +++++------------ extensions/helpers/handle-autoapply.ts | 31 ++++++++++++++++++++++ extensions/helpers/messages.ts | 30 ++++++++++++++------- extensions/helpers/settings.ts | 9 ++++++- extensions/material.theme.config.ts | 9 +++---- 5 files changed, 70 insertions(+), 33 deletions(-) create mode 100644 extensions/helpers/handle-autoapply.ts diff --git a/extensions/helpers/configuration-change.ts b/extensions/helpers/configuration-change.ts index ef1e1aa..2ce4074 100644 --- a/extensions/helpers/configuration-change.ts +++ b/extensions/helpers/configuration-change.ts @@ -1,13 +1,10 @@ import { ConfigurationChangeEvent } from 'vscode'; -import {getCustomSettings, isMaterialThemeIcons, isAutoApplyEnable, isMaterialTheme} from './settings'; +import {getCustomSettings, isMaterialThemeIcons, isMaterialTheme} from './settings'; import {getCurrentThemeIconsID, getCurrentThemeID} from './vscode'; -import * as ThemeCommands from './../commands'; -import {infoMessage} from './messages'; - -const icons = () => isAutoApplyEnable() ? ThemeCommands.fixIcons() : infoMessage(); +import handleAutoapply from './handle-autoapply'; const onIconsChanged = () => { const customSettings = getCustomSettings(); @@ -16,27 +13,18 @@ const onIconsChanged = () => { } const currentIconsTheme = getCurrentThemeIconsID(); - if (isMaterialThemeIcons(currentIconsTheme)) { - return icons(); - } + return handleAutoapply(isMaterialThemeIcons(currentIconsTheme)); }; const onThemeChanged = () => { const currentTheme = getCurrentThemeID(); - if (isMaterialTheme(currentTheme)) { - return icons(); - } + return handleAutoapply(isMaterialTheme(currentTheme)); }; export const onChangeConfiguration = (event: ConfigurationChangeEvent) => { const isColorTheme = event.affectsConfiguration('workbench.colorTheme'); const isIconTheme = event.affectsConfiguration('workbench.iconTheme'); - if (isIconTheme) { - return onIconsChanged(); - } - - if (isColorTheme) { - return onThemeChanged(); - } + return isIconTheme ? onIconsChanged() : + isColorTheme ? onThemeChanged() : null; }; diff --git a/extensions/helpers/handle-autoapply.ts b/extensions/helpers/handle-autoapply.ts new file mode 100644 index 0000000..b2d914b --- /dev/null +++ b/extensions/helpers/handle-autoapply.ts @@ -0,0 +1,31 @@ +import {isAutoApplyEnable, isReloadNotificationEnable, setCustomSetting} from './settings'; +import {infoMessage} from './messages'; +import {fixIcons} from '../commands'; + +export default async (doubleCheck: boolean) => { + if (!doubleCheck) { + return; + } + + if (isAutoApplyEnable()) { + return fixIcons(); + } + + if (!isReloadNotificationEnable()) { + return; + } + + const result = await infoMessage(); + + if (result.nomore) { + return setCustomSetting('showReloadNotification', false); + } + + if (result.autoreload) { + setCustomSetting('autoApplyIcons', true); + } + + if (result.reload) { + return fixIcons(); + } +}; diff --git a/extensions/helpers/messages.ts b/extensions/helpers/messages.ts index a9bfc54..470ec59 100644 --- a/extensions/helpers/messages.ts +++ b/extensions/helpers/messages.ts @@ -2,12 +2,10 @@ import { window as Window } from 'vscode'; -import * as ThemeCommands from './../commands'; - const MESSAGES = { INFO: { message: 'Do you want to reload to apply Material Theme Icons to enjoy the full experience?', - options: {ok: 'Yeah, releoad', cancel: 'No, thank you'} + options: {ok: 'Yeah, reload', autoreload: 'Yes and enable auto-reload', cancel: 'No, thank you', nomore: 'Never show again'} }, CHANGELOG: { message: 'Material Theme was updated. Check the release notes for more details.', @@ -20,22 +18,36 @@ const MESSAGES = { }; export const infoMessage = async () => { - if (await Window.showInformationMessage( + const result = await Window.showInformationMessage( MESSAGES.INFO.message, - ...MESSAGES.INFO.options as any - ) === MESSAGES.INFO.options.ok) { - ThemeCommands.fixIcons(); + MESSAGES.INFO.options.ok, + MESSAGES.INFO.options.autoreload, + MESSAGES.INFO.options.cancel, + MESSAGES.INFO.options.nomore + ); + + switch (result) { + case MESSAGES.INFO.options.ok: + return {reload: true}; + case MESSAGES.INFO.options.autoreload: + return {reload: true, autoreload: true}; + case MESSAGES.INFO.options.nomore: + return {nomore: true}; + default: + return {}; } }; export const changelogMessage = async () => await Window.showInformationMessage( MESSAGES.CHANGELOG.message, - ...MESSAGES.CHANGELOG.options as any + MESSAGES.CHANGELOG.options.ok, + MESSAGES.CHANGELOG.options.cancel ) === MESSAGES.CHANGELOG.options.ok; export const installationMessage = async () => await Window.showInformationMessage( MESSAGES.INSTALLATION.message, - ...MESSAGES.INSTALLATION.options as any + MESSAGES.INSTALLATION.options.ok, + MESSAGES.INSTALLATION.options.cancel, ) === MESSAGES.INSTALLATION.options.ok; diff --git a/extensions/helpers/settings.ts b/extensions/helpers/settings.ts index 1c2073b..c726015 100644 --- a/extensions/helpers/settings.ts +++ b/extensions/helpers/settings.ts @@ -22,7 +22,14 @@ export function getCustomSettings(): IThemeCustomProperties { * Get autoApplyIcons */ export function isAutoApplyEnable(): boolean { - return vscode.workspace.getConfiguration().get('materialTheme.autoApplyIcons', true); + return vscode.workspace.getConfiguration().get('materialTheme.autoApplyIcons'); +} + +/** + * Get showReloadNotification + */ +export function isReloadNotificationEnable(): boolean { + return vscode.workspace.getConfiguration().get('materialTheme.showReloadNotification'); } /** diff --git a/extensions/material.theme.config.ts b/extensions/material.theme.config.ts index f13f22d..900b75f 100644 --- a/extensions/material.theme.config.ts +++ b/extensions/material.theme.config.ts @@ -4,11 +4,12 @@ import { } from 'vscode'; import * as ThemeCommands from './commands'; -import {isAutoApplyEnable, setCustomSetting} from './helpers/settings'; +import {setCustomSetting} from './helpers/settings'; import {onChangeConfiguration} from './helpers/configuration-change'; -import {infoMessage, changelogMessage, installationMessage} from './helpers/messages'; +import {changelogMessage, installationMessage} from './helpers/messages'; import checkInstallation from './helpers/check-installation'; import writeChangelog from './helpers/write-changelog'; +import handleAutoapply from './helpers/handle-autoapply'; export async function activate() { const config = Workspace.getConfiguration(); @@ -39,9 +40,7 @@ export async function activate() { // Registering commands Commands.registerCommand('materialTheme.setAccent', async () => { const wasSet = await ThemeCommands.accentsSetter(); - if (wasSet) { - return isAutoApplyEnable() ? ThemeCommands.fixIcons() : infoMessage(); - } + handleAutoapply(wasSet); }); Commands.registerCommand('materialTheme.fixIcons', () => ThemeCommands.fixIcons()); Commands.registerCommand('materialTheme.toggleApplyIcons', () => ThemeCommands.toggleApplyIcons()); From 48c6feaf756904a50313e5d1de5f08d6a4dc4dd5 Mon Sep 17 00:00:00 2001 From: Alessio Occhipinti Date: Sun, 12 Aug 2018 19:09:36 +0200 Subject: [PATCH 04/10] Ux/reload notification (#232) * chore: check on installation type now as single module * feat(Reload notification): added support for after-install notification * feat(Reload notification): added support never show again notification --- extensions/helpers/check-installation.ts | 34 ++++++++++++++++++ extensions/helpers/configuration-change.ts | 24 ++++--------- extensions/helpers/handle-autoapply.ts | 31 ++++++++++++++++ extensions/helpers/messages.ts | 40 +++++++++++++++++---- extensions/helpers/settings.ts | 9 ++++- extensions/helpers/should-show-changelog.ts | 35 ------------------ extensions/helpers/write-changelog.ts | 16 +++++++++ extensions/interfaces/iinstallation-type.ts | 4 +++ extensions/material.theme.config.ts | 31 +++++++++------- package.json | 7 +++- 10 files changed, 158 insertions(+), 73 deletions(-) create mode 100644 extensions/helpers/check-installation.ts create mode 100644 extensions/helpers/handle-autoapply.ts delete mode 100644 extensions/helpers/should-show-changelog.ts create mode 100644 extensions/helpers/write-changelog.ts create mode 100644 extensions/interfaces/iinstallation-type.ts diff --git a/extensions/helpers/check-installation.ts b/extensions/helpers/check-installation.ts new file mode 100644 index 0000000..fc52488 --- /dev/null +++ b/extensions/helpers/check-installation.ts @@ -0,0 +1,34 @@ +import {getDefaultValues, getPackageJSON} from './fs'; +import {IInstallationType} from '../interfaces/iinstallation-type'; + +const splitVersion = (input: string): {major: number; minor: number; patch: number} => { + const [major, minor, patch] = input.split('.').map(i => parseInt(i, 10)); + return {major, minor, patch}; +}; + +export default (): IInstallationType => { + const out: IInstallationType = { + isUpdate: false, + isFirstInstall: false + }; + + const defaults = getDefaultValues(); + const packageJSON = getPackageJSON(); + + const isFirstInstall = defaults.changelog === undefined || + (defaults.changelog !== undefined && typeof defaults.changelog.lastversion !== 'string'); + + if (isFirstInstall) { + return {...out, isFirstInstall}; + } + + const versionCurrent = splitVersion(packageJSON.version); + const versionOld = isFirstInstall ? null : splitVersion(defaults.changelog.lastversion); + + const isUpdate = !versionOld || + versionCurrent.major > versionOld.major || + versionCurrent.minor > versionOld.minor || + versionCurrent.patch > versionOld.patch; + + return {...out, isUpdate}; +}; diff --git a/extensions/helpers/configuration-change.ts b/extensions/helpers/configuration-change.ts index ef1e1aa..2ce4074 100644 --- a/extensions/helpers/configuration-change.ts +++ b/extensions/helpers/configuration-change.ts @@ -1,13 +1,10 @@ import { ConfigurationChangeEvent } from 'vscode'; -import {getCustomSettings, isMaterialThemeIcons, isAutoApplyEnable, isMaterialTheme} from './settings'; +import {getCustomSettings, isMaterialThemeIcons, isMaterialTheme} from './settings'; import {getCurrentThemeIconsID, getCurrentThemeID} from './vscode'; -import * as ThemeCommands from './../commands'; -import {infoMessage} from './messages'; - -const icons = () => isAutoApplyEnable() ? ThemeCommands.fixIcons() : infoMessage(); +import handleAutoapply from './handle-autoapply'; const onIconsChanged = () => { const customSettings = getCustomSettings(); @@ -16,27 +13,18 @@ const onIconsChanged = () => { } const currentIconsTheme = getCurrentThemeIconsID(); - if (isMaterialThemeIcons(currentIconsTheme)) { - return icons(); - } + return handleAutoapply(isMaterialThemeIcons(currentIconsTheme)); }; const onThemeChanged = () => { const currentTheme = getCurrentThemeID(); - if (isMaterialTheme(currentTheme)) { - return icons(); - } + return handleAutoapply(isMaterialTheme(currentTheme)); }; export const onChangeConfiguration = (event: ConfigurationChangeEvent) => { const isColorTheme = event.affectsConfiguration('workbench.colorTheme'); const isIconTheme = event.affectsConfiguration('workbench.iconTheme'); - if (isIconTheme) { - return onIconsChanged(); - } - - if (isColorTheme) { - return onThemeChanged(); - } + return isIconTheme ? onIconsChanged() : + isColorTheme ? onThemeChanged() : null; }; diff --git a/extensions/helpers/handle-autoapply.ts b/extensions/helpers/handle-autoapply.ts new file mode 100644 index 0000000..b2d914b --- /dev/null +++ b/extensions/helpers/handle-autoapply.ts @@ -0,0 +1,31 @@ +import {isAutoApplyEnable, isReloadNotificationEnable, setCustomSetting} from './settings'; +import {infoMessage} from './messages'; +import {fixIcons} from '../commands'; + +export default async (doubleCheck: boolean) => { + if (!doubleCheck) { + return; + } + + if (isAutoApplyEnable()) { + return fixIcons(); + } + + if (!isReloadNotificationEnable()) { + return; + } + + const result = await infoMessage(); + + if (result.nomore) { + return setCustomSetting('showReloadNotification', false); + } + + if (result.autoreload) { + setCustomSetting('autoApplyIcons', true); + } + + if (result.reload) { + return fixIcons(); + } +}; diff --git a/extensions/helpers/messages.ts b/extensions/helpers/messages.ts index c68c9d8..470ec59 100644 --- a/extensions/helpers/messages.ts +++ b/extensions/helpers/messages.ts @@ -2,24 +2,52 @@ import { window as Window } from 'vscode'; -import * as ThemeCommands from './../commands'; - const MESSAGES = { INFO: { message: 'Do you want to reload to apply Material Theme Icons to enjoy the full experience?', - options: {ok: 'Yeah, releoad', cancel: 'No, thank you'} + options: {ok: 'Yeah, reload', autoreload: 'Yes and enable auto-reload', cancel: 'No, thank you', nomore: 'Never show again'} }, CHANGELOG: { message: 'Material Theme was updated. Check the release notes for more details.', options: {ok: 'Show me', cancel: 'Maybe later'} + }, + INSTALLATION: { + message: 'Thank you for installing Material Theme! Would you like to enable the auto-application (with window reload when needed) of the Material Theme icons?', + options: {ok: 'Sure!', cancel: 'Nope :('} } }; export const infoMessage = async () => { - if (await Window.showInformationMessage(MESSAGES.INFO.message, MESSAGES.INFO.options.ok, MESSAGES.INFO.options.cancel) === MESSAGES.INFO.options.ok) { - ThemeCommands.fixIcons(); + const result = await Window.showInformationMessage( + MESSAGES.INFO.message, + MESSAGES.INFO.options.ok, + MESSAGES.INFO.options.autoreload, + MESSAGES.INFO.options.cancel, + MESSAGES.INFO.options.nomore + ); + + switch (result) { + case MESSAGES.INFO.options.ok: + return {reload: true}; + case MESSAGES.INFO.options.autoreload: + return {reload: true, autoreload: true}; + case MESSAGES.INFO.options.nomore: + return {nomore: true}; + default: + return {}; } }; export const changelogMessage = async () => - await Window.showInformationMessage(MESSAGES.CHANGELOG.message, MESSAGES.CHANGELOG.options.ok, MESSAGES.CHANGELOG.options.cancel) === MESSAGES.CHANGELOG.options.ok; + await Window.showInformationMessage( + MESSAGES.CHANGELOG.message, + MESSAGES.CHANGELOG.options.ok, + MESSAGES.CHANGELOG.options.cancel + ) === MESSAGES.CHANGELOG.options.ok; + +export const installationMessage = async () => + await Window.showInformationMessage( + MESSAGES.INSTALLATION.message, + MESSAGES.INSTALLATION.options.ok, + MESSAGES.INSTALLATION.options.cancel, + ) === MESSAGES.INSTALLATION.options.ok; diff --git a/extensions/helpers/settings.ts b/extensions/helpers/settings.ts index 1c2073b..c726015 100644 --- a/extensions/helpers/settings.ts +++ b/extensions/helpers/settings.ts @@ -22,7 +22,14 @@ export function getCustomSettings(): IThemeCustomProperties { * Get autoApplyIcons */ export function isAutoApplyEnable(): boolean { - return vscode.workspace.getConfiguration().get('materialTheme.autoApplyIcons', true); + return vscode.workspace.getConfiguration().get('materialTheme.autoApplyIcons'); +} + +/** + * Get showReloadNotification + */ +export function isReloadNotificationEnable(): boolean { + return vscode.workspace.getConfiguration().get('materialTheme.showReloadNotification'); } /** diff --git a/extensions/helpers/should-show-changelog.ts b/extensions/helpers/should-show-changelog.ts deleted file mode 100644 index f05b780..0000000 --- a/extensions/helpers/should-show-changelog.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as path from 'path'; - -import {IDefaults} from './../interfaces/idefaults'; - -import {getDefaultValues, getPackageJSON, writeFile} from './fs'; - -const splitVersion = (input: string): {major: number; minor: number; patch: number} => { - const [major, minor, patch] = input.split('.').map(i => parseInt(i, 10)); - return {major, minor, patch}; -}; - -const writeDefaults = (defaults: IDefaults) => - writeFile(path.join('./extensions/defaults.json'), JSON.stringify(defaults, null, 2)); - -export default (): boolean => { - const defaults = getDefaultValues(); - const packageJSON = getPackageJSON(); - - const defaultsNotPresent = defaults.changelog === undefined || - (defaults.changelog !== undefined && typeof defaults.changelog.lastversion !== 'string'); - - const versionCurrent = splitVersion(packageJSON.version); - const versionOld = defaultsNotPresent ? null : splitVersion(defaults.changelog.lastversion); - - const out = !versionOld || - versionCurrent.major > versionOld.major || - versionCurrent.minor > versionOld.minor || - versionCurrent.patch > versionOld.patch; - - const newChangelog = {...defaults.changelog, lastversion: packageJSON.version}; - const newDefaults = {...defaults, changelog: newChangelog}; - writeDefaults(newDefaults); - - return out; -}; diff --git a/extensions/helpers/write-changelog.ts b/extensions/helpers/write-changelog.ts new file mode 100644 index 0000000..53fa129 --- /dev/null +++ b/extensions/helpers/write-changelog.ts @@ -0,0 +1,16 @@ +import * as path from 'path'; +import {getDefaultValues, getPackageJSON, writeFile} from './fs'; + +import {IDefaults} from './../interfaces/idefaults'; + +const writeDefaults = (defaults: IDefaults) => + writeFile(path.join('./extensions/defaults.json'), JSON.stringify(defaults, null, 2)); + +export default (): void => { + const defaults = getDefaultValues(); + const packageJSON = getPackageJSON(); + + const newChangelog = {...defaults.changelog, lastversion: packageJSON.version}; + const newDefaults = {...defaults, changelog: newChangelog}; + writeDefaults(newDefaults); +}; diff --git a/extensions/interfaces/iinstallation-type.ts b/extensions/interfaces/iinstallation-type.ts new file mode 100644 index 0000000..b3d6325 --- /dev/null +++ b/extensions/interfaces/iinstallation-type.ts @@ -0,0 +1,4 @@ +export interface IInstallationType { + isUpdate: boolean; + isFirstInstall: boolean; +} diff --git a/extensions/material.theme.config.ts b/extensions/material.theme.config.ts index e3086e9..900b75f 100644 --- a/extensions/material.theme.config.ts +++ b/extensions/material.theme.config.ts @@ -4,13 +4,18 @@ import { } from 'vscode'; import * as ThemeCommands from './commands'; -import {isAutoApplyEnable} from './helpers/settings'; +import {setCustomSetting} from './helpers/settings'; import {onChangeConfiguration} from './helpers/configuration-change'; -import {infoMessage, changelogMessage} from './helpers/messages'; -import shouldShowChangelog from './helpers/should-show-changelog'; +import {changelogMessage, installationMessage} from './helpers/messages'; +import checkInstallation from './helpers/check-installation'; +import writeChangelog from './helpers/write-changelog'; +import handleAutoapply from './helpers/handle-autoapply'; export async function activate() { const config = Workspace.getConfiguration(); + const installationType = checkInstallation(); + + writeChangelog(); // Listen on set theme: when the theme is Material Theme, just adjust icon and accent. Workspace.onDidChangeConfiguration(onChangeConfiguration); @@ -20,20 +25,22 @@ export async function activate() { config.update('materialTheme.cache.workbench', undefined, true); } - if (shouldShowChangelog()) { - const show = await changelogMessage(); - if (show) { - ThemeCommands.showChangelog(); - } + if (installationType.isFirstInstall) { + const enableAutoApply = await installationMessage(); + await setCustomSetting('autoApplyIcons', enableAutoApply); + // Set true always on new installation + await setCustomSetting('showReloadNotification', true); + } + + const shouldShowChangelog = (installationType.isFirstInstall || installationType.isUpdate) && await changelogMessage(); + if (shouldShowChangelog) { + ThemeCommands.showChangelog(); } // Registering commands Commands.registerCommand('materialTheme.setAccent', async () => { const wasSet = await ThemeCommands.accentsSetter(); - - if (wasSet) { - return isAutoApplyEnable() ? ThemeCommands.fixIcons() : infoMessage(); - } + handleAutoapply(wasSet); }); Commands.registerCommand('materialTheme.fixIcons', () => ThemeCommands.fixIcons()); Commands.registerCommand('materialTheme.toggleApplyIcons', () => ThemeCommands.toggleApplyIcons()); diff --git a/package.json b/package.json index 8e58291..9aa89e6 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,12 @@ }, "materialTheme.autoApplyIcons": { "type": "boolean", - "description": "Enable/disable auto-apply of Material Theme icons", + "description": "Enable/disable auto-apply of Material Theme icons with window reload when needed", + "default": false + }, + "materialTheme.showReloadNotification": { + "type": "boolean", + "description": "Useful when autoApplyIcons is false and you want to be asked to reload the window when needed", "default": true }, "materialTheme.fixIconsRunning": { From 50b22c3bbb180c9e54e9afa074dbeda0187b96e9 Mon Sep 17 00:00:00 2001 From: Mattia Astorino Date: Sun, 12 Aug 2018 20:22:22 +0200 Subject: [PATCH 05/10] feat: Add theme for the new settings view --- .github/ISSUE_TEMPLATE/Custom.md | 3 ++- extensions/defaults.json | 6 +++++- src/themes/theme-template-color-theme.json | 9 ++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Custom.md b/.github/ISSUE_TEMPLATE/Custom.md index 18074d2..32ceae5 100644 --- a/.github/ISSUE_TEMPLATE/Custom.md +++ b/.github/ISSUE_TEMPLATE/Custom.md @@ -4,4 +4,5 @@ about: Give us your feedback about this extension --- - + diff --git a/extensions/defaults.json b/extensions/defaults.json index bea1892..9d939a9 100644 --- a/extensions/defaults.json +++ b/extensions/defaults.json @@ -108,6 +108,10 @@ "menubar.selectionForeground": { "alpha": 100, "value": null + }, + "settings.headerForeground": { + "alpha": 100, + "value": null } }, "changelog": { @@ -288,4 +292,4 @@ "_folder_dark", "_folder_light" ] -} +} \ No newline at end of file diff --git a/src/themes/theme-template-color-theme.json b/src/themes/theme-template-color-theme.json index 1ad3368..3adc269 100644 --- a/src/themes/theme-template-color-theme.json +++ b/src/themes/theme-template-color-theme.json @@ -835,6 +835,13 @@ "menu.selectionBorder": "{{variant.scheme.inactiveSelectionBackground}}", "menubar.selectionBackground": "{{variant.scheme.inactiveSelectionBackground}}", "menubar.selectionForeground": "{{commons.accents.Teal}}", - "menubar.selectionBorder": "{{variant.scheme.inactiveSelectionBackground}}" + "menubar.selectionBorder": "{{variant.scheme.inactiveSelectionBackground}}", + "settings.dropdownForeground": "{{variant.scheme.foreground}}", + "settings.dropdownBackground": "{{variant.scheme.backgroundAlt}}", + "settings.numberInputForeground": "{{variant.scheme.foreground}}", + "settings.numberInputBackground": "{{variant.scheme.backgroundAlt}}", + "settings.textInputForeground": "{{variant.scheme.foreground}}", + "settings.textInputBackground": "{{variant.scheme.backgroundAlt}}", + "settings.headerForeground": "{{commons.accents.Teal}}" } } From 0e65f78684199295bea5438a25ffadb8dccf1598 Mon Sep 17 00:00:00 2001 From: LasaleFamine Date: Wed, 15 Aug 2018 21:09:12 +0200 Subject: [PATCH 06/10] chore: revert 4 notification's option to 2 --- extensions/helpers/handle-autoapply.ts | 8 -------- extensions/helpers/messages.ts | 10 ++-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/extensions/helpers/handle-autoapply.ts b/extensions/helpers/handle-autoapply.ts index b2d914b..1d25ea3 100644 --- a/extensions/helpers/handle-autoapply.ts +++ b/extensions/helpers/handle-autoapply.ts @@ -17,14 +17,6 @@ export default async (doubleCheck: boolean) => { const result = await infoMessage(); - if (result.nomore) { - return setCustomSetting('showReloadNotification', false); - } - - if (result.autoreload) { - setCustomSetting('autoApplyIcons', true); - } - if (result.reload) { return fixIcons(); } diff --git a/extensions/helpers/messages.ts b/extensions/helpers/messages.ts index 470ec59..c4371b3 100644 --- a/extensions/helpers/messages.ts +++ b/extensions/helpers/messages.ts @@ -5,7 +5,7 @@ import { const MESSAGES = { INFO: { message: 'Do you want to reload to apply Material Theme Icons to enjoy the full experience?', - options: {ok: 'Yeah, reload', autoreload: 'Yes and enable auto-reload', cancel: 'No, thank you', nomore: 'Never show again'} + options: {ok: 'Yeah, reload', cancel: 'No, thank you'} }, CHANGELOG: { message: 'Material Theme was updated. Check the release notes for more details.', @@ -21,18 +21,12 @@ export const infoMessage = async () => { const result = await Window.showInformationMessage( MESSAGES.INFO.message, MESSAGES.INFO.options.ok, - MESSAGES.INFO.options.autoreload, - MESSAGES.INFO.options.cancel, - MESSAGES.INFO.options.nomore + MESSAGES.INFO.options.cancel ); switch (result) { case MESSAGES.INFO.options.ok: return {reload: true}; - case MESSAGES.INFO.options.autoreload: - return {reload: true, autoreload: true}; - case MESSAGES.INFO.options.nomore: - return {nomore: true}; default: return {}; } From c00ce60b8327410e258639eee96aea70008053f7 Mon Sep 17 00:00:00 2001 From: LasaleFamine Date: Wed, 15 Aug 2018 21:13:20 +0200 Subject: [PATCH 07/10] chore: fix linter --- extensions/helpers/handle-autoapply.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/helpers/handle-autoapply.ts b/extensions/helpers/handle-autoapply.ts index 1d25ea3..0aa0c50 100644 --- a/extensions/helpers/handle-autoapply.ts +++ b/extensions/helpers/handle-autoapply.ts @@ -1,4 +1,4 @@ -import {isAutoApplyEnable, isReloadNotificationEnable, setCustomSetting} from './settings'; +import {isAutoApplyEnable, isReloadNotificationEnable} from './settings'; import {infoMessage} from './messages'; import {fixIcons} from '../commands'; From 0a90ac7dd2d6e8c3d9a5cf6b1cd13ac250db4fb0 Mon Sep 17 00:00:00 2001 From: Alessio Occhipinti Date: Thu, 16 Aug 2018 09:11:38 +0200 Subject: [PATCH 08/10] Fix/custom settings (#237) * chore: added accents as enum and removed accentPrevious * chore: removed fixIconsRunning prop and added logic for replacing it * chore: added accents as enum and removed accentPrevious * chore: removed fixIconsRunning prop and added logic for replacing it --- extensions/commands/theme-icons/index.ts | 13 +++++-- extensions/helpers/configuration-change.ts | 7 +--- extensions/helpers/settings.ts | 4 +- .../interfaces/itheme-custom-properties.ts | 2 - package.json | 37 +++++++++++++------ 5 files changed, 36 insertions(+), 27 deletions(-) diff --git a/extensions/commands/theme-icons/index.ts b/extensions/commands/theme-icons/index.ts index 563fd7d..4c31aef 100644 --- a/extensions/commands/theme-icons/index.ts +++ b/extensions/commands/theme-icons/index.ts @@ -11,8 +11,7 @@ import { import { isAccent, getCustomSettings, - isMaterialTheme, - setCustomSetting + isMaterialTheme } from './../../helpers/settings'; import {getCurrentThemeID, setIconsID, getCurrentThemeIconsID, reloadWindow} from './../../helpers/vscode'; import {CHARSET} from './../../consts/files'; @@ -30,6 +29,8 @@ const replaceIconPathWithAccent = (iconPath: string, accentName: string): string return iconPath.replace('.svg', `.accent.${ accentName }.svg`); }; +let fixIconsRunning: boolean = false; + /** * Fix icons when flag auto-fix is active and current theme is Material */ @@ -40,6 +41,10 @@ export default async () => { deferred.reject = reject; }); + if (fixIconsRunning) { + return deferred.resolve(); + } + // Current theme id set on VSCode ("label" of the package.json) const themeLabel = getCurrentThemeID(); @@ -48,7 +53,7 @@ export default async () => { return deferred.resolve(); } - await setCustomSetting('fixIconsRunning', true); + fixIconsRunning = true; const DEFAULTS = getDefaultValues(); const CUSTOM_SETTINGS = getCustomSettings(); @@ -92,7 +97,7 @@ export default async () => { return; } - await setCustomSetting('fixIconsRunning', false); + fixIconsRunning = false; deferred.resolve(); }); diff --git a/extensions/helpers/configuration-change.ts b/extensions/helpers/configuration-change.ts index 2ce4074..537e401 100644 --- a/extensions/helpers/configuration-change.ts +++ b/extensions/helpers/configuration-change.ts @@ -1,17 +1,12 @@ import { ConfigurationChangeEvent } from 'vscode'; -import {getCustomSettings, isMaterialThemeIcons, isMaterialTheme} from './settings'; +import {isMaterialThemeIcons, isMaterialTheme} from './settings'; import {getCurrentThemeIconsID, getCurrentThemeID} from './vscode'; import handleAutoapply from './handle-autoapply'; const onIconsChanged = () => { - const customSettings = getCustomSettings(); - if (customSettings.fixIconsRunning) { - return; - } - const currentIconsTheme = getCurrentThemeIconsID(); return handleAutoapply(isMaterialThemeIcons(currentIconsTheme)); }; diff --git a/extensions/helpers/settings.ts b/extensions/helpers/settings.ts index c726015..ac4454b 100644 --- a/extensions/helpers/settings.ts +++ b/extensions/helpers/settings.ts @@ -66,7 +66,5 @@ export function setCustomSetting(settingName: string, value: any): Thenable { - const prevAccent = getAccent(); - return setCustomSetting('accentPrevious', prevAccent) - .then(() => setCustomSetting('accent', accentName)); + return setCustomSetting('accent', accentName); } diff --git a/extensions/interfaces/itheme-custom-properties.ts b/extensions/interfaces/itheme-custom-properties.ts index a836c2d..39b7c79 100644 --- a/extensions/interfaces/itheme-custom-properties.ts +++ b/extensions/interfaces/itheme-custom-properties.ts @@ -1,6 +1,4 @@ export interface IThemeCustomProperties { accent?: string; - accentPrevious?: string; autoApplyIcons?: boolean; - fixIconsRunning?: boolean; } diff --git a/package.json b/package.json index 9aa89e6..913e7ca 100644 --- a/package.json +++ b/package.json @@ -85,26 +85,39 @@ "properties": { "materialTheme.accent": { "type": "string", - "description": "Current accent color selected" - }, - "materialTheme.accentPrevious": { - "type": "string", - "description": "Previous accent color selected" + "default": "Blue", + "enum": [ + "Acid Lime", + "Blue", + "Breaking Bad", + "Bright Teal", + "Cyan", + "Graphite", + "Indigo", + "Lime", + "Orange", + "Pink", + "Purple", + "Red", + "Sky", + "Tomato", + "Teal", + "Yellow" + ], + "description": "Current accent color selected", + "scope": "window" }, "materialTheme.autoApplyIcons": { "type": "boolean", "description": "Enable/disable auto-apply of Material Theme icons with window reload when needed", - "default": false + "default": false, + "scope": "window" }, "materialTheme.showReloadNotification": { "type": "boolean", "description": "Useful when autoApplyIcons is false and you want to be asked to reload the window when needed", - "default": true - }, - "materialTheme.fixIconsRunning": { - "type": "boolean", - "description": "For checking if the command is currently acting", - "default": false + "default": true, + "scope": "window" } } }, From d14e343ad0ef35f3c13f570ed494a9c307a9a96a Mon Sep 17 00:00:00 2001 From: Mattia Astorino Date: Sat, 18 Aug 2018 08:57:58 +0200 Subject: [PATCH 09/10] fix: Fix custom menu foreground color (Win/Linux) Close #239 --- src/themes/theme-template-color-theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/themes/theme-template-color-theme.json b/src/themes/theme-template-color-theme.json index 3adc269..8ed5c23 100644 --- a/src/themes/theme-template-color-theme.json +++ b/src/themes/theme-template-color-theme.json @@ -829,7 +829,7 @@ "breadcrumb.activeSelectionForeground": "{{commons.accents.Teal}}", "breadcrumbPicker.background": "{{variant.scheme.backgroundAlt}}", "menu.background": "{{variant.scheme.background}}", - "menu.foreground": "{{variant.scheme.sidebarForeground}}", + "menu.foreground": "{{variant.scheme.foreground}}", "menu.selectionBackground": "{{variant.scheme.inactiveSelectionBackground}}", "menu.selectionForeground": "{{commons.accents.Teal}}", "menu.selectionBorder": "{{variant.scheme.inactiveSelectionBackground}}", From bbd8a2d72eddda9dd884e19cb5d80df848a75687 Mon Sep 17 00:00:00 2001 From: Mattia Astorino Date: Sat, 18 Aug 2018 10:12:09 +0200 Subject: [PATCH 10/10] fix: Fix some workbench input graphic glitches --- src/themes/settings/specific/darker-hc.json | 2 +- src/themes/settings/specific/darker.json | 2 +- src/themes/settings/specific/default-hc.json | 2 +- src/themes/settings/specific/default.json | 2 +- src/themes/settings/specific/lighter-hc.json | 2 +- src/themes/settings/specific/lighter.json | 2 +- src/themes/settings/specific/ocean-hc.json | 2 +- src/themes/settings/specific/ocean.json | 2 +- src/themes/settings/specific/palenight-hc.json | 2 +- src/themes/settings/specific/palenight.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/themes/settings/specific/darker-hc.json b/src/themes/settings/specific/darker-hc.json index 120a3f9..a88a13d 100644 --- a/src/themes/settings/specific/darker-hc.json +++ b/src/themes/settings/specific/darker-hc.json @@ -19,7 +19,7 @@ "lineHighlight": "#000000", "selection": "#61616150", "shadow": "#00000030", - "inputBackground": "#FFFFFF05", + "inputBackground": "#2B2B2B", "inputForeground": "#EEFFFF", "inputBorder": "#FFFFFF10", "scrollbarsHover": "#00000030", diff --git a/src/themes/settings/specific/darker.json b/src/themes/settings/specific/darker.json index 7c1e6c9..9eeee5b 100644 --- a/src/themes/settings/specific/darker.json +++ b/src/themes/settings/specific/darker.json @@ -17,7 +17,7 @@ "lineHighlight": "#000000", "selection": "#61616150", "shadow": "#00000030", - "inputBackground": "#FFFFFF05", + "inputBackground": "#2B2B2B", "inputForeground": "#EEFFFF", "inputBorder": "#FFFFFF10", "scrollbars": "#00000050", diff --git a/src/themes/settings/specific/default-hc.json b/src/themes/settings/specific/default-hc.json index 013fae0..c569e63 100644 --- a/src/themes/settings/specific/default-hc.json +++ b/src/themes/settings/specific/default-hc.json @@ -19,7 +19,7 @@ "lineHighlight": "#000000", "selection": "#80CBC420", "shadow": "#00000030", - "inputBackground": "#FFFFFF05", + "inputBackground": "#303C41", "inputForeground": "#EEFFFF", "inputBorder": "#FFFFFF10", "scrollbarsHover": "#00000030", diff --git a/src/themes/settings/specific/default.json b/src/themes/settings/specific/default.json index cee0445..dea4bab 100644 --- a/src/themes/settings/specific/default.json +++ b/src/themes/settings/specific/default.json @@ -17,7 +17,7 @@ "lineHighlight": "#000000", "selection": "#80CBC420", "shadow": "#00000030", - "inputBackground": "#FFFFFF05", + "inputBackground": "#303C41", "inputForeground": "#EEFFFF", "inputBorder": "#FFFFFF10", "scrollbars": "#00000050", diff --git a/src/themes/settings/specific/lighter-hc.json b/src/themes/settings/specific/lighter-hc.json index 09e31c4..a300351 100644 --- a/src/themes/settings/specific/lighter-hc.json +++ b/src/themes/settings/specific/lighter-hc.json @@ -19,7 +19,7 @@ "lineHighlight": "#CCD7DA", "selection": "#80CBC440", "shadow": "#00000020", - "inputBackground": "#00000005", + "inputBackground": "#EEEEEE", "inputForeground": "#90A4AE", "inputBorder": "#00000010", "scrollbarsHover": "#00000030", diff --git a/src/themes/settings/specific/lighter.json b/src/themes/settings/specific/lighter.json index 0e694dc..226cd1c 100644 --- a/src/themes/settings/specific/lighter.json +++ b/src/themes/settings/specific/lighter.json @@ -17,7 +17,7 @@ "lineHighlight": "#CCD7DA", "selection": "#80CBC440", "shadow": "#00000020", - "inputBackground": "#00000005", + "inputBackground": "#EEEEEE", "inputForeground": "#90A4AE", "inputBorder": "#00000010", "scrollbars": "#00000050", diff --git a/src/themes/settings/specific/ocean-hc.json b/src/themes/settings/specific/ocean-hc.json index cb47930..29f7b62 100644 --- a/src/themes/settings/specific/ocean-hc.json +++ b/src/themes/settings/specific/ocean-hc.json @@ -17,7 +17,7 @@ "lineHighlight": "#000000", "selection": "#717CB450", "shadow": "#00000030", - "inputBackground": "#FFFFFF05", + "inputBackground": "#1A1C25", "inputForeground": "#EEFFFF", "inputBorder": "#FFFFFF10", "scrollbars": "#00000050", diff --git a/src/themes/settings/specific/ocean.json b/src/themes/settings/specific/ocean.json index 522bf0d..4c2a0a3 100644 --- a/src/themes/settings/specific/ocean.json +++ b/src/themes/settings/specific/ocean.json @@ -17,7 +17,7 @@ "lineHighlight": "#000000", "selection": "#717CB450", "shadow": "#00000030", - "inputBackground": "#FFFFFF05", + "inputBackground": "#1A1C25", "inputForeground": "#EEFFFF", "inputBorder": "#FFFFFF10", "scrollbars": "#00000050", diff --git a/src/themes/settings/specific/palenight-hc.json b/src/themes/settings/specific/palenight-hc.json index 5a99295..cd55031 100644 --- a/src/themes/settings/specific/palenight-hc.json +++ b/src/themes/settings/specific/palenight-hc.json @@ -19,7 +19,7 @@ "lineHighlight": "#000000", "selection": "#717CB450", "shadow": "#00000030", - "inputBackground": "#FFFFFF05", + "inputBackground": "#333747", "inputForeground": "#EEFFFF", "inputBorder": "#FFFFFF10", "scrollbarsHover": "#00000030", diff --git a/src/themes/settings/specific/palenight.json b/src/themes/settings/specific/palenight.json index 867a080..c6fb208 100644 --- a/src/themes/settings/specific/palenight.json +++ b/src/themes/settings/specific/palenight.json @@ -17,7 +17,7 @@ "lineHighlight": "#000000", "selection": "#717CB450", "shadow": "#00000030", - "inputBackground": "#FFFFFF05", + "inputBackground": "#333747", "inputForeground": "#EEFFFF", "inputBorder": "#FFFFFF10", "scrollbars": "#00000050",