style(design): apply Minimal Dark Mode design system\n\n- Switched to complete Dark Mode (OLED-friendly)\n- Established standard color palette matching modern technical aesthetics\n- Changed font to Plus Jakarta Sans for increased legibility\n- Enforced dark mode as default in App.tsx\n- Fixed several React cascading render (setState in useEffect) warnings
This commit is contained in:
1 parent
b80531f8a8
commit
bac7b5591e
738 files changed
+138513
-138123
No files matched your search
+136
-136
@@ -1,136 +1,136 @@
|
||||
import { ipc } from '@/ipc/manager';
|
||||
import type { DeviceProfile } from '@/types/account';
|
||||
import { isValidProxyUrl } from '@/utils/url';
|
||||
|
||||
export function addGoogleAccount(input: { authCode: string; oauthClientKey?: string }) {
|
||||
return ipc.client.cloud.addGoogleAccount(input);
|
||||
}
|
||||
|
||||
export function listCloudAccounts() {
|
||||
return ipc.client.cloud.listCloudAccounts();
|
||||
}
|
||||
|
||||
export function deleteCloudAccount(input: { accountId: string }) {
|
||||
return ipc.client.cloud.deleteCloudAccount(input);
|
||||
}
|
||||
|
||||
export function refreshAccountQuota(input: { accountId: string }) {
|
||||
console.log(`[Action] Calling refreshAccountQuota for: ${input.accountId}`);
|
||||
return ipc.client.cloud.refreshAccountQuota(input);
|
||||
}
|
||||
|
||||
export function switchCloudAccount(input: { accountId: string }) {
|
||||
return ipc.client.cloud.switchCloudAccount(input);
|
||||
}
|
||||
|
||||
export function getAutoSwitchEnabled() {
|
||||
return ipc.client.cloud.getAutoSwitchEnabled();
|
||||
}
|
||||
|
||||
export function setAutoSwitchEnabled(input: { enabled: boolean }) {
|
||||
return ipc.client.cloud.setAutoSwitchEnabled(input);
|
||||
}
|
||||
|
||||
export function forcePollCloudMonitor() {
|
||||
return ipc.client.cloud.forcePollCloudMonitor();
|
||||
}
|
||||
|
||||
export function syncLocalAccount() {
|
||||
return ipc.client.cloud.syncLocalAccount();
|
||||
}
|
||||
|
||||
export interface OAuthClientDescriptor {
|
||||
key: string;
|
||||
label: string;
|
||||
client_id: string;
|
||||
is_active: boolean;
|
||||
is_builtin: boolean;
|
||||
}
|
||||
|
||||
export function startAuthFlow(input?: { oauthClientKey?: string }) {
|
||||
return ipc.client.cloud.startAuthFlow(input);
|
||||
}
|
||||
|
||||
export function listOAuthClients() {
|
||||
return ipc.client.cloud.listOAuthClients() as Promise<OAuthClientDescriptor[]>;
|
||||
}
|
||||
|
||||
export async function getActiveOAuthClient() {
|
||||
const response = await ipc.client.cloud.getActiveOAuthClient();
|
||||
return response.client_key;
|
||||
}
|
||||
|
||||
export function setActiveOAuthClient(input: { clientKey: string }) {
|
||||
return ipc.client.cloud.setActiveOAuthClient(input);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
import { ipc } from '@/ipc/manager';
|
||||
import type { DeviceProfile } from '@/types/account';
|
||||
import { isValidProxyUrl } from '@/utils/url';
|
||||
|
||||
export function addGoogleAccount(input: { authCode: string; oauthClientKey?: string }) {
|
||||
return ipc.client.cloud.addGoogleAccount(input);
|
||||
}
|
||||
|
||||
export function listCloudAccounts() {
|
||||
return ipc.client.cloud.listCloudAccounts();
|
||||
}
|
||||
|
||||
export function deleteCloudAccount(input: { accountId: string }) {
|
||||
return ipc.client.cloud.deleteCloudAccount(input);
|
||||
}
|
||||
|
||||
export function refreshAccountQuota(input: { accountId: string }) {
|
||||
console.log(`[Action] Calling refreshAccountQuota for: ${input.accountId}`);
|
||||
return ipc.client.cloud.refreshAccountQuota(input);
|
||||
}
|
||||
|
||||
export function switchCloudAccount(input: { accountId: string }) {
|
||||
return ipc.client.cloud.switchCloudAccount(input);
|
||||
}
|
||||
|
||||
export function getAutoSwitchEnabled() {
|
||||
return ipc.client.cloud.getAutoSwitchEnabled();
|
||||
}
|
||||
|
||||
export function setAutoSwitchEnabled(input: { enabled: boolean }) {
|
||||
return ipc.client.cloud.setAutoSwitchEnabled(input);
|
||||
}
|
||||
|
||||
export function forcePollCloudMonitor() {
|
||||
return ipc.client.cloud.forcePollCloudMonitor();
|
||||
}
|
||||
|
||||
export function syncLocalAccount() {
|
||||
return ipc.client.cloud.syncLocalAccount();
|
||||
}
|
||||
|
||||
export interface OAuthClientDescriptor {
|
||||
key: string;
|
||||
label: string;
|
||||
client_id: string;
|
||||
is_active: boolean;
|
||||
is_builtin: boolean;
|
||||
}
|
||||
|
||||
export function startAuthFlow(input?: { oauthClientKey?: string }) {
|
||||
return ipc.client.cloud.startAuthFlow(input);
|
||||
}
|
||||
|
||||
export function listOAuthClients() {
|
||||
return ipc.client.cloud.listOAuthClients() as Promise<OAuthClientDescriptor[]>;
|
||||
}
|
||||
|
||||
export async function getActiveOAuthClient() {
|
||||
const response = await ipc.client.cloud.getActiveOAuthClient();
|
||||
return response.client_key;
|
||||
}
|
||||
|
||||
export function setActiveOAuthClient(input: { clientKey: string }) {
|
||||
return ipc.client.cloud.setActiveOAuthClient(input);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
Reference in new issue
Block a user