vsc-material-theme/extensions/helpers/messages.ts
Alessio Occhipinti b8fec9ff01 Support for message before show changelog page (#207)
* chore: update variantsIcons defaults

* chore(show-changelog): added message for changelog

* chore(show-changelog): added check for message ok

* chore: removed wrong added variantsIcons
2018-06-21 23:02:57 +02:00

25 lines
869 B
TypeScript

import {
window as Window
} from 'vscode';
import * as ThemeCommands from './../commands';
const MESSAGES = {
INFO: {
message: 'You should reload the window for full activate the Material Theme.',
options: {ok: 'Reload now', cancel: 'Cancel'}
},
CHANGELOG: {
message: 'Material Theme was updated. Check the changelog for more details!',
options: {ok: 'Show changelog', cancel: 'Maybe later'}
}
};
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();
}
};
export const changelogMessage = async () =>
await Window.showInformationMessage(MESSAGES.CHANGELOG.message, MESSAGES.CHANGELOG.options.ok, MESSAGES.CHANGELOG.options.cancel) === MESSAGES.CHANGELOG.options.ok;