mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Add banner for macOS 10.13 and 10.14 (#192928)
Prepare macOS 10.13-10.14 EOL
This commit is contained in:
parent
8ac8b0d6d5
commit
3bfbe7893f
|
@ -754,6 +754,45 @@ export class NativeWindow extends Disposable {
|
|||
);
|
||||
}
|
||||
|
||||
// macOS 10.13 and 10.14 warning
|
||||
if (isMacintosh) {
|
||||
const majorVersion = this.environmentService.os.release.split('.')[0];
|
||||
const eolReleases = new Map<string, string>([
|
||||
['17', 'macOS High Sierra'],
|
||||
['18', 'macOS Mojave'],
|
||||
]);
|
||||
|
||||
if (eolReleases.has(majorVersion)) {
|
||||
const message = localize('macoseolmessage', "{0} on {1} will soon stop receiving updates. Consider upgrading your macOS version.", this.productService.nameLong, eolReleases.get(majorVersion));
|
||||
const actions = [{
|
||||
label: localize('macoseolBannerLearnMore', "Learn More"),
|
||||
href: 'https://aka.ms/vscode-faq-old-macOS'
|
||||
}];
|
||||
|
||||
this.bannerService.show({
|
||||
id: 'macoseol.banner',
|
||||
message,
|
||||
ariaLabel: localize('macoseolarialabel', "{0}. Use navigation keys to access banner actions.", message),
|
||||
actions,
|
||||
icon: Codicon.warning
|
||||
});
|
||||
|
||||
this.notificationService.prompt(
|
||||
Severity.Warning,
|
||||
message,
|
||||
[{
|
||||
label: localize('learnMore', "Learn More"),
|
||||
run: () => this.openerService.open(URI.parse('https://aka.ms/vscode-faq-old-macOS'))
|
||||
}],
|
||||
{
|
||||
neverShowAgain: { id: 'macoseol', isSecondary: true, scope: NeverShowAgainScope.APPLICATION },
|
||||
priority: NotificationPriority.URGENT,
|
||||
sticky: true
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Slow shell environment progress indicator
|
||||
const shellEnv = process.shellEnv();
|
||||
this.progressService.withProgress({
|
||||
|
|
Loading…
Reference in a new issue