1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

[PM-1834] Add Windows 8/8.1 deprecation notice (#5213)

This commit is contained in:
Oscar Hinton
2023-04-17 17:03:40 +02:00
committed by GitHub
parent 07c2c2af20
commit d605187de8
6 changed files with 65 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
import * as os from "os";
import { Component, NgZone } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { ipcRenderer } from "electron";
@@ -27,6 +29,8 @@ const BroadcasterSubscriptionId = "LockComponent";
})
export class LockComponent extends BaseLockComponent {
private deferFocus: boolean = null;
protected oldOs = false;
protected deprecated = false;
constructor(
router: Router,
@@ -66,6 +70,20 @@ export class LockComponent extends BaseLockComponent {
policyService,
passwordGenerationService
);
if (process.platform === "win32") {
try {
const release = os.release();
const majorVersion = parseInt(release.split(".")[0], 10);
this.oldOs = majorVersion < 10;
if (new Date() > new Date("2023-05-31")) {
this.deprecated = true;
}
} catch (e) {
this.logService.error(e);
}
}
}
async ngOnInit() {