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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user