mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 13:40:24 +02:00
Fix Lyric Translation Not Resetting (#1208)
* Refactor lyrics translation and index handling * Add auto translation toggle to lyric settings * Add enableAutoTranslation setting to lyrics
This commit is contained in:
@@ -214,6 +214,28 @@ export const LyricSettings = () => {
|
||||
isHidden: !isElectron(),
|
||||
title: t('setting.translationApiKey', { postProcess: 'sentenceCase' }),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
aria-label="Enable auto translation"
|
||||
defaultChecked={settings.enableAutoTranslation}
|
||||
onChange={(e) => {
|
||||
setSettings({
|
||||
lyrics: {
|
||||
...settings,
|
||||
enableAutoTranslation: e.currentTarget.checked,
|
||||
},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
),
|
||||
description: t('setting.enableAutoTranslation', {
|
||||
context: 'description',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
isHidden: !isElectron(),
|
||||
title: t('setting.enableAutoTranslation', { postProcess: 'sentenceCase' }),
|
||||
},
|
||||
];
|
||||
|
||||
return <SettingsSection divider={false} options={lyricOptions} />;
|
||||
|
||||
Reference in New Issue
Block a user