Add banner for macOS 10.13 and 10.14 (#192928)

Prepare macOS 10.13-10.14 EOL
This commit is contained in:
ChaseKnowlden 2023-09-13 09:46:00 -04:00 committed by GitHub
parent 8ac8b0d6d5
commit 3bfbe7893f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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({