feat: account management overhaul + 7 issue resolutions (#147)

- Add smart JSON export/import with schema validation and deduplication
- Add per-account proxy configurations (Issue #79)
- Add advanced account sorting engine (Issues #126 & #99)
- Add compact horizontal layout, AI credits, inline model visibility (Issues #145 & #134)
- Add desktop push notifications for low quota (Issue #53)
- Fix Arch Linux AUR process detection bug (Issue #117)
- Default theme set to Dark Mode (it's better)
- UI Polishing: Improved sort dropdown and symmetrical dialog layouts
- Dev Mode: Resolved port conflicts and single-instance locks
- Updated README and README.zh-CN with new features
This commit is contained in:
vd authored and GitHub committed 2026-04-06 20:32:42 +08:00
1 parent 50a325be11
commit ed0dd811a8
37 files changed
+1989 -455

No files matched your search

+25
View File
@@ -1,5 +1,6 @@
import { ipc } from '@/ipc/manager';
import type { DeviceProfile } from '@/types/account';
import { isValidProxyUrl } from '@/utils/url';
export function addGoogleAccount(input: { authCode: string }) {
return ipc.client.cloud.addGoogleAccount(input);
@@ -14,6 +15,7 @@ export function deleteCloudAccount(input: { accountId: string }) {
}
export function refreshAccountQuota(input: { accountId: string }) {
console.log(`[Action] Calling refreshAccountQuota for: ${input.accountId}`);
return ipc.client.cloud.refreshAccountQuota(input);
}
@@ -88,3 +90,26 @@ export function deleteCloudIdentityProfileRevision(input: {
export function openCloudIdentityStorageFolder() {
return ipc.client.cloud.openIdentityStorageFolder();
}
export function setAccountProxy(input: { accountId: string; proxyUrl: string | null }) {
if (input.proxyUrl && !isValidProxyUrl(input.proxyUrl)) {
throw new Error('Invalid proxy URL format');
}
return ipc.client.cloud.setAccountProxy(input);
}
export function exportCloudAccounts(input: { stripTokens?: boolean }) {
return ipc.client.cloud.exportCloudAccounts(input);
}
export function importCloudAccounts(input: {
jsonContent: string;
strategy?: 'merge' | 'overwrite' | 'skip-existing';
}) {
try {
JSON.parse(input.jsonContent);
} catch {
throw new Error('Invalid JSON content provided for import');
}
return ipc.client.cloud.importCloudAccounts(input);
}