Add OS auth to local backup key viewer

This commit is contained in:
ayumi-signal
2025-06-16 16:38:53 -07:00
committed by GitHub
parent cae8bd482f
commit 37422e41f5
15 changed files with 1070 additions and 12 deletions

View File

@@ -124,6 +124,7 @@ import { LINUX_PASSWORD_STORE_FLAGS } from '../ts/util/linuxPasswordStoreFlags';
import { getOwn } from '../ts/util/getOwn';
import { safeParseLoose, safeParseUnknown } from '../ts/util/schemas';
import { getAppErrorIcon } from '../ts/util/getAppErrorIcon';
import { promptOSAuth } from '../ts/util/os/promptOSAuthMain';
const log = createLogger('app/main');
@@ -1130,6 +1131,13 @@ ipc.on('convert-image', async (event, uuid, data) => {
event.reply(`convert-image:${uuid}`, { error, response });
});
ipc.on('prompt-os-auth', async (event, { reason, localeString }) => {
log.info(`Prompt for OS auth reason=${reason}`);
const result = await promptOSAuth({ reason, localeString });
log.info(`Prompt for OS auth result=${result}`);
event.reply(`prompt-os-auth:${reason}`, result);
});
let isReadyForUpdates = false;
async function readyForUpdates() {
if (isReadyForUpdates) {