fix: use updateProcessConcurrency to persist slider changes to config.yaml

- CleanerPage now uses updateProcessConcurrency instead of setProcessConcurrency
- This ensures slider changes are persisted to config.yaml via IPC
- Remove unused queryBatchSize and setProcessConcurrency from destructuring
This commit is contained in:
Misaka_Company
2026-03-17 10:57:24 +08:00
parent 103effcfca
commit b289fb9624
8 changed files with 99 additions and 52 deletions

View File

@@ -12,6 +12,7 @@ import type {
} from '../main/types/validation.types'
import type { IpcResult } from '../main/ipc'
import { IPC_CHANNELS, type LogLevel } from '../shared/ipc-channels'
import type { CleanerConfig } from '../main/types/config.schema'
type ErpSettingsPayload = {
erp?: {
@@ -195,6 +196,12 @@ const api = {
getAll: (): Promise<IpcResult> => invokeIpc(IPC_CHANNELS.USER_ERP_CONFIG_GET_ALL)
},
config: {
getCleaner: (): Promise<IpcResult<CleanerConfig>> => invokeIpc(IPC_CHANNELS.CONFIG_GET_CLEANER),
updateCleaner: (updates: Partial<CleanerConfig>): Promise<IpcResult<CleanerConfig>> =>
invokeIpc(IPC_CHANNELS.CONFIG_UPDATE_CLEANER, updates)
},
logger: {
log: (level: LogLevel, message: string, context?: Record<string, unknown>): void => {
ipcRenderer.send(IPC_CHANNELS.LOGGER_FORWARD, {