Skip to content

Commit

Permalink
chore: push eol notification for macOS 10.11 and 10.12 (microsoft#171598
Browse files Browse the repository at this point in the history
)

* chore: push eol notification for macOS 10.11 and 10.12

* chore: update message

* chore: update faq links
  • Loading branch information
deepak1556 authored Jan 18, 2023
1 parent 9276e10 commit e89a0ec
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/vs/workbench/electron-sandbox/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,43 @@ export class NativeWindow extends Disposable {
}
}

// MacOS 10.11 and 10.12 warning
if (isMacintosh) {
const majorVersion = this.environmentService.os.release.split('.')[0];
const eolReleases = new Map<string, string>([
['15', 'OS X El Capitan'],
['16', 'macOS Sierra'],
]);
// Refs https://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history
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 }
}
);
}
}

// Slow shell environment progress indicator
const shellEnv = process.shellEnv();
this.progressService.withProgress({
Expand Down

0 comments on commit e89a0ec

Please sign in to comment.