feat(synced-lyrics): add new "spacer" (#3742)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Angelos Bouklis
2025-09-06 22:26:03 +03:00
committed by GitHub
parent aede0cd643
commit eb50596961
3 changed files with 85 additions and 62 deletions

View File

@ -93,47 +93,23 @@ export const menu = async (
toolTip: t('plugins.synced-lyrics.menu.default-text-string.tooltip'),
type: 'submenu',
submenu: [
{
label: '',
type: 'radio',
checked: config.defaultTextString === '♪',
click() {
ctx.setConfig({
defaultTextString: '♪',
});
},
{ label: '♪', value: '♪' },
{ label: '" "', value: ' ' },
{ label: '...', value: ['.', '..', '...'] },
{ label: '•••', value: ['•', '••', '•••'] },
{ label: '———', value: '———' },
].map(({ label, value }) => ({
label,
type: 'radio',
checked:
typeof value === 'string'
? config.defaultTextString === value
: JSON.stringify(config.defaultTextString) ===
JSON.stringify(value),
click() {
ctx.setConfig({ defaultTextString: value });
},
{
label: '" "',
type: 'radio',
checked: config.defaultTextString === ' ',
click() {
ctx.setConfig({
defaultTextString: ' ',
});
},
},
{
label: '...',
type: 'radio',
checked: config.defaultTextString === '...',
click() {
ctx.setConfig({
defaultTextString: '...',
});
},
},
{
label: '———',
type: 'radio',
checked: config.defaultTextString === '———',
click() {
ctx.setConfig({
defaultTextString: '———',
});
},
},
],
})),
},
{
label: t('plugins.synced-lyrics.menu.romanization.label'),