Add menu option for native PiP

This commit is contained in:
TC
2023-02-08 23:46:43 +01:00
parent 0b49d57969
commit 781a726f4b

View File

@ -45,16 +45,24 @@ module.exports = (win, options) => [
}],
...promptOptions()
}, win)
if (output) {
const { value, accelerator } = output[0];
setOptions({ [value]: accelerator });
item.checked = !!accelerator;
} else {
// Reset checkbox if prompt was canceled
item.checked = !item.checked;
}
},
},
{
label: "Use native PiP",
type: "checkbox",
checked: options.useNativePiP,
click: (item) => {
setOptions({ useNativePiP: item.checked });
},
}
];