feat: rename IPC

This commit is contained in:
JellyBrick
2024-01-06 10:17:40 +09:00
parent 5d5cc58f59
commit 6b7c43925a
26 changed files with 88 additions and 73 deletions

View File

@ -47,7 +47,7 @@ export const onMainLoad = ({
return target;
};
ipcMain.handle('menu-event', (event, commandId: number) => {
ipcMain.handle('ytmd:menu-event', (event, commandId: number) => {
const target = getMenuItemById(commandId);
if (target)
target.click(

View File

@ -76,7 +76,7 @@ export const createPanel = (
}
menu.addEventListener('click', async () => {
await window.ipcRenderer.invoke('menu-event', item.commandId);
await window.ipcRenderer.invoke('ytmd:menu-event', item.commandId);
const menuItem = (await window.ipcRenderer.invoke(
'get-menu-by-id',
item.commandId,