Shorten name

This commit is contained in:
Matt Gibson 2024-04-22 12:30:54 -04:00
parent 026b2118a4
commit fd3027cea9
No known key found for this signature in database
GPG Key ID: 963EE038B0581878
6 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,7 @@ export namespace passwords {
export function setPassword(service: string, account: string, password: string): Promise<void>
/** Delete the stored password from the keychain. */
export function deletePassword(service: string, account: string): Promise<void>
export function osSupportsSecuredStorage(): boolean
export function osSupport(): boolean
}
export namespace biometrics {
export function prompt(hwnd: Buffer, message: string): Promise<boolean>

View File

@ -42,7 +42,7 @@ pub mod passwords {
}
#[napi]
pub fn os_supports_secured_storage() -> bool {
pub fn os_support() -> bool {
super::password::has_password_management()
}
}

View File

@ -179,7 +179,7 @@ export class Main {
this.tokenService = new TokenService(
singleUserStateProvider,
globalStateProvider,
passwords.osSupportsSecuredStorage(),
passwords.osSupport(),
illegalSecureStorageService,
this.keyGenerationService,
this.encryptService,

View File

@ -19,8 +19,8 @@ export class DesktopCredentialStorageListener {
init() {
// Handle password management detection sync
ipcMain.on("osSupportsSecuredStorage", (event) => {
event.returnValue = passwords.osSupportsSecuredStorage();
ipcMain.on("osSupportsPasswords", (event) => {
event.returnValue = passwords.osSupport();
});
ipcMain.handle("keytar", async (event: any, message: any) => {
try {

View File

@ -34,7 +34,7 @@ const passwords = {
ipcRenderer.invoke("keytar", { action: "setPassword", key, keySuffix, value }),
delete: (key: string, keySuffix: string): Promise<void> =>
ipcRenderer.invoke("keytar", { action: "deletePassword", key, keySuffix }),
osSupportsSecuredStorage: (): boolean => ipcRenderer.sendSync("osSupportsSecuredStorage"),
osSupport: (): boolean => ipcRenderer.sendSync("osSupportsPasswords"),
};
const biometric = {

View File

@ -142,7 +142,7 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
}
supportsSecureStorage(): boolean {
return ipc.platform.passwords.osSupportsSecuredStorage();
return ipc.platform.passwords.osSupport();
}
getAutofillKeyboardShortcut(): Promise<string> {