mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 18:21:47 +00:00
fix: remove xo, migration to eslint
This commit is contained in:
@ -1,21 +1,19 @@
|
||||
const { ipcMain } = require("electron");
|
||||
const { ipcMain } = require('electron');
|
||||
const prompt = require('custom-electron-prompt');
|
||||
|
||||
const prompt = require("custom-electron-prompt");
|
||||
const promptOptions = require("../../providers/prompt-options");
|
||||
const promptOptions = require('../../providers/prompt-options');
|
||||
|
||||
module.exports = (win) => {
|
||||
ipcMain.handle("captionsSelector", async (_, captionLabels, currentIndex) => {
|
||||
return await prompt(
|
||||
{
|
||||
title: "Choose Caption",
|
||||
label: `Current Caption: ${captionLabels[currentIndex] || "None"}`,
|
||||
type: "select",
|
||||
value: currentIndex,
|
||||
selectOptions: captionLabels,
|
||||
resizable: true,
|
||||
...promptOptions(),
|
||||
},
|
||||
win
|
||||
);
|
||||
});
|
||||
ipcMain.handle('captionsSelector', async (_, captionLabels, currentIndex) => await prompt(
|
||||
{
|
||||
title: 'Choose Caption',
|
||||
label: `Current Caption: ${captionLabels[currentIndex] || 'None'}`,
|
||||
type: 'select',
|
||||
value: currentIndex,
|
||||
selectOptions: captionLabels,
|
||||
resizable: true,
|
||||
...promptOptions(),
|
||||
},
|
||||
win,
|
||||
));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user