feat: Refactor channel management and UI components
- Removed hardcoded channel data from `channel.ts` and replaced it with a dynamic channel dictionary. - Introduced a new Pinia store `channel.ts` to manage selected and available channels. - Reworked `AddChannelDialog.vue` to allow users to search and select channels dynamically. - Updated `TaskCenter.vue` to utilize the new channel store and handle empty channel selections gracefully. - Enhanced IPC communication for loading and saving selected channels in the configuration. - Adjusted `runTaskOperationService.ts` to ensure proper handling of channel data. - Improved styling and structure of UI components for better user experience.
This commit is contained in:
11
global.d.ts
vendored
11
global.d.ts
vendored
@@ -1,4 +1,5 @@
|
||||
import { IPC_EVENTS } from '@lib/constants'
|
||||
import type { ConfigKeys } from '@lib/types'
|
||||
import type { AutomationScript, ScriptSaveInput, ScriptExecutionResult } from '@lib/script-types'
|
||||
|
||||
declare global {
|
||||
@@ -61,6 +62,16 @@ declare global {
|
||||
return: Promise<ThemeMode>
|
||||
}
|
||||
|
||||
// 配置
|
||||
[IPC_EVENTS.GET_CONFIG]: {
|
||||
params: [key: ConfigKeys]
|
||||
return: Promise<any>
|
||||
}
|
||||
[IPC_EVENTS.SET_CONFIG]: {
|
||||
params: [key: ConfigKeys, value: any]
|
||||
return: Promise<{ success: boolean }>
|
||||
}
|
||||
|
||||
// 脚本管理
|
||||
[IPC_EVENTS.SCRIPT_LIST]: {
|
||||
params: []
|
||||
|
||||
Reference in New Issue
Block a user