mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
16 lines
500 B
JavaScript
16 lines
500 B
JavaScript
const { ipcMain, dialog } = require("electron");
|
|
|
|
module.exports = () => {
|
|
ipcMain.handle('captionsSelector', async (_, captionLabels, currentIndex) => {
|
|
return await dialog.showMessageBox({
|
|
type: "question",
|
|
buttons: captionLabels,
|
|
defaultId: currentIndex,
|
|
title: "Choose Caption",
|
|
message: "Choose Caption:",
|
|
detail: `Current Caption: ${captionLabels[currentIndex]}`,
|
|
cancelId: -1
|
|
})
|
|
})
|
|
};
|