界面优化,提高颜值方案
This commit is contained in:
@@ -33,6 +33,7 @@ export interface MyReaderApi {
|
||||
deleteFile: (filePath: string) => Promise<void>
|
||||
renamePath: (oldPath: string, newName: string) => Promise<{ newPath: string }>
|
||||
allowClose: () => void
|
||||
setMenuVisible: (visible: boolean) => Promise<void>
|
||||
onRequestClose: (handler: () => void) => () => void
|
||||
onMenuAction: (handler: (action: string) => void) => () => void
|
||||
onOpenFiles: (handler: (paths: string[]) => void) => () => void
|
||||
@@ -59,6 +60,7 @@ const api: MyReaderApi = {
|
||||
allowClose: () => {
|
||||
ipcRenderer.send('myreader:allow-close')
|
||||
},
|
||||
setMenuVisible: (visible: boolean) => ipcRenderer.invoke('myreader:set-menu-visible', visible),
|
||||
onRequestClose: (handler: () => void) => {
|
||||
const listener = (): void => {
|
||||
handler()
|
||||
|
||||
Reference in New Issue
Block a user