in-app-menu

This commit is contained in:
JellyBrick
2023-11-27 05:09:33 +09:00
parent 11d06c50a5
commit 7591f13505
4 changed files with 256 additions and 254 deletions

View File

@ -1,10 +1,12 @@
import is from 'electron-is';
import builder from './index';
import { setMenuOptions } from '@/config/plugins';
import { setMenuOptions } from '../../config/plugins';
import type { InAppMenuConfig } from './index';
import type { MenuContext } from '@/types/contexts';
import type { MenuTemplate } from '@/menu';
export default builder.createMenu(async ({ getConfig }) => {
export const onMenu = async ({ getConfig }: MenuContext<InAppMenuConfig>): Promise<MenuTemplate> => {
const config = await getConfig();
if (is.linux()) {
@ -22,4 +24,4 @@ export default builder.createMenu(async ({ getConfig }) => {
}
return [];
});
};