feat: complete account-bound profile switching and hardening (#78)

This commit is contained in:
vin authored and GitHub committed 2026-02-08 01:10:07 +08:00
1 parent ee641799c2
commit a93c6d0cea
31 files changed
+3612 -197

No files matched your search

+37
View File
@@ -1,4 +1,5 @@
import { ipc } from '@/ipc/manager';
import type { DeviceProfile } from '@/types/account';
export function listAccounts() {
return ipc.client.account.listAccounts();
@@ -15,3 +16,39 @@ export function switchAccount(accountId: string) {
export function deleteAccount(accountId: string) {
return ipc.client.account.deleteAccount({ accountId });
}
export function previewGenerateIdentityProfile() {
return ipc.client.account.previewGenerateIdentityProfile();
}
export function getIdentityProfiles(accountId: string) {
return ipc.client.account.getIdentityProfiles({ accountId });
}
export function bindIdentityProfile(accountId: string, mode: 'capture' | 'generate') {
return ipc.client.account.bindIdentityProfile({ accountId, mode });
}
export function bindIdentityProfileWithPayload(accountId: string, profile: DeviceProfile) {
return ipc.client.account.bindIdentityProfileWithPayload({ accountId, profile });
}
export function applyBoundIdentityProfile(accountId: string) {
return ipc.client.account.applyBoundIdentityProfile({ accountId });
}
export function restoreIdentityProfileRevision(accountId: string, versionId: string) {
return ipc.client.account.restoreIdentityProfileRevision({ accountId, versionId });
}
export function deleteIdentityProfileRevision(accountId: string, versionId: string) {
return ipc.client.account.deleteIdentityProfileRevision({ accountId, versionId });
}
export function restoreBaselineProfile(accountId: string) {
return ipc.client.account.restoreBaselineProfile({ accountId });
}
export function openIdentityStorageFolder() {
return ipc.client.account.openIdentityStorageFolder();
}
+40
View File
@@ -1,4 +1,5 @@
import { ipc } from '@/ipc/manager';
import type { DeviceProfile } from '@/types/account';
export function addGoogleAccount(input: { authCode: string }) {
return ipc.client.cloud.addGoogleAccount(input);
@@ -39,3 +40,42 @@ export function syncLocalAccount() {
export function startAuthFlow() {
return ipc.client.cloud.startAuthFlow();
}
export function getSwitchStatus() {
return ipc.client.cloud.getSwitchStatus();
}
export function getCloudIdentityProfiles(input: { accountId: string }) {
return ipc.client.cloud.getIdentityProfiles(input);
}
export function previewGenerateCloudIdentityProfile() {
return ipc.client.cloud.previewIdentityProfile();
}
export function bindCloudIdentityProfile(input: { accountId: string; mode: 'capture' | 'generate' }) {
return ipc.client.cloud.bindIdentityProfile(input);
}
export function bindCloudIdentityProfileWithPayload(input: {
accountId: string;
profile: DeviceProfile;
}) {
return ipc.client.cloud.bindIdentityProfileWithPayload(input);
}
export function restoreCloudIdentityProfileRevision(input: { accountId: string; versionId: string }) {
return ipc.client.cloud.restoreIdentityProfileRevision(input);
}
export function restoreCloudBaselineProfile(input: { accountId: string }) {
return ipc.client.cloud.restoreBaselineProfile(input);
}
export function deleteCloudIdentityProfileRevision(input: { accountId: string; versionId: string }) {
return ipc.client.cloud.deleteIdentityProfileRevision(input);
}
export function openCloudIdentityStorageFolder() {
return ipc.client.cloud.openIdentityStorageFolder();
}