mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
[PM-3682] Remove ipcRenderer from login-approval (#6838)
This commit is contained in:
parent
49103cdda4
commit
f36a41b5ca
@ -1,5 +1,4 @@
|
||||
import { Component, OnInit, OnDestroy } from "@angular/core";
|
||||
import { ipcRenderer } from "electron";
|
||||
import { Subject } from "rxjs";
|
||||
|
||||
import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref";
|
||||
@ -76,13 +75,13 @@ export class LoginApprovalComponent implements OnInit, OnDestroy {
|
||||
this.updateTimeText();
|
||||
}, RequestTimeUpdate);
|
||||
|
||||
const isVisible = await ipcRenderer.invoke("windowVisible");
|
||||
const isVisible = await ipc.platform.isWindowVisible();
|
||||
if (!isVisible) {
|
||||
await ipcRenderer.invoke("loginRequest", {
|
||||
alertTitle: this.i18nService.t("logInRequested"),
|
||||
alertBody: this.i18nService.t("confirmLoginAtemptForMail", this.email),
|
||||
buttonText: this.i18nService.t("close"),
|
||||
});
|
||||
await ipc.auth.loginRequest(
|
||||
this.i18nService.t("logInRequested"),
|
||||
this.i18nService.t("confirmLoginAtemptForMail", this.email),
|
||||
this.i18nService.t("close")
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,11 @@ import { ipcRenderer } from "electron";
|
||||
export default {
|
||||
getHcaptchaAccessibilityCookie: (): Promise<[string]> =>
|
||||
ipcRenderer.invoke("getCookie", { url: "https://www.hcaptcha.com/", name: "hc_accessibility" }),
|
||||
|
||||
loginRequest: (alertTitle: string, alertBody: string, buttonText: string): Promise<void> =>
|
||||
ipcRenderer.invoke("loginRequest", {
|
||||
alertTitle,
|
||||
alertBody,
|
||||
buttonText,
|
||||
}),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user