feat: updates

This commit is contained in:
qier222 2022-04-16 21:14:03 +08:00
parent fc1c25f404
commit 7b6579e068
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
48 changed files with 1155 additions and 777 deletions

40
src/shared/IpcChannels.ts Normal file
View file

@ -0,0 +1,40 @@
import { APIs } from './CacheAPIs'
export const enum IpcChannels {
ClearAPICache = 'clear-api-cache',
Minimize = 'minimize',
MaximizeOrUnmaximize = 'maximize-or-unmaximize',
Close = 'close',
IsMaximized = 'is-maximized',
GetApiCacheSync = 'get-api-cache-sync',
DevDbExportJson = 'dev-db-export-json',
CacheCoverColor = 'cache-cover-color',
}
export interface IpcChannelsParams {
[IpcChannels.ClearAPICache]: void
[IpcChannels.Minimize]: void
[IpcChannels.MaximizeOrUnmaximize]: void
[IpcChannels.Close]: void
[IpcChannels.IsMaximized]: void
[IpcChannels.GetApiCacheSync]: {
api: APIs
query?: any
}
[IpcChannels.DevDbExportJson]: void
[IpcChannels.CacheCoverColor]: {
id: number
color: string
}
}
export interface IpcChannelsReturns {
[IpcChannels.ClearAPICache]: void
[IpcChannels.Minimize]: void
[IpcChannels.MaximizeOrUnmaximize]: void
[IpcChannels.Close]: void
[IpcChannels.IsMaximized]: boolean
[IpcChannels.GetApiCacheSync]: any
[IpcChannels.DevDbExportJson]: void
[IpcChannels.CacheCoverColor]: void
}