mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 11:01:45 +00:00
QOL: Move source code under the src directory. (#1318)
This commit is contained in:
23
src/plugins/visualizer/menu.ts
Normal file
23
src/plugins/visualizer/menu.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { BrowserWindow } from 'electron';
|
||||
|
||||
import { MenuTemplate } from '../../menu';
|
||||
import { setMenuOptions } from '../../config/plugins';
|
||||
|
||||
import type { ConfigType } from '../../config/dynamic';
|
||||
|
||||
const visualizerTypes = ['butterchurn', 'vudio', 'wave']; // For bundling
|
||||
|
||||
export default (win: BrowserWindow, options: ConfigType<'visualizer'>): MenuTemplate => [
|
||||
{
|
||||
label: 'Type',
|
||||
submenu: visualizerTypes.map((visualizerType) => ({
|
||||
label: visualizerType,
|
||||
type: 'radio',
|
||||
checked: options.type === visualizerType,
|
||||
click() {
|
||||
options.type = visualizerType;
|
||||
setMenuOptions('visualizer', options);
|
||||
},
|
||||
})),
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user