mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
21 lines
509 B
TypeScript
21 lines
509 B
TypeScript
import { BrowserWindow } from 'electron';
|
|
|
|
import { setMenuOptions } from '../../config/plugins';
|
|
|
|
import { MenuTemplate } from '../../menu';
|
|
|
|
import type { ConfigType } from '../../config/dynamic';
|
|
|
|
export default (_: BrowserWindow, options: ConfigType<'disable-autoplay'>): MenuTemplate => [
|
|
{
|
|
label: 'Applies only on startup',
|
|
type: 'checkbox',
|
|
checked: options.applyOnce,
|
|
click() {
|
|
setMenuOptions('disable-autoplay', {
|
|
applyOnce: !options.applyOnce,
|
|
});
|
|
}
|
|
}
|
|
];
|