mirror of
https://github.com/spotiflacapp/SpotiFLAC-Mobile.git
synced 2026-06-01 03:15:17 +07:00
refactor: conditionally show lyrics settings only when embed lyrics is enabled
This commit is contained in:
parent
537bab69ab
commit
813ed79073
1 changed files with 70 additions and 70 deletions
|
|
@ -306,80 +306,80 @@ class _DownloadSettingsPageState extends ConsumerState<DownloadSettingsPage> {
|
||||||
onChanged: (value) => ref
|
onChanged: (value) => ref
|
||||||
.read(settingsProvider.notifier)
|
.read(settingsProvider.notifier)
|
||||||
.setEmbedLyrics(value),
|
.setEmbedLyrics(value),
|
||||||
|
showDivider: settings.embedLyrics,
|
||||||
),
|
),
|
||||||
SettingsItem(
|
if (settings.embedLyrics) ...[
|
||||||
icon: Icons.lyrics_outlined,
|
SettingsItem(
|
||||||
title: context.l10n.lyricsMode,
|
icon: Icons.lyrics_outlined,
|
||||||
subtitle: settings.embedLyrics
|
title: context.l10n.lyricsMode,
|
||||||
? _getLyricsModeLabel(context, settings.lyricsMode)
|
subtitle:
|
||||||
: context.l10n.extensionsDisabled,
|
_getLyricsModeLabel(context, settings.lyricsMode),
|
||||||
onTap: settings.embedLyrics
|
onTap: () => _showLyricsModePicker(
|
||||||
? () => _showLyricsModePicker(
|
context,
|
||||||
context,
|
ref,
|
||||||
ref,
|
settings.lyricsMode,
|
||||||
settings.lyricsMode,
|
|
||||||
)
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
SettingsItem(
|
|
||||||
icon: Icons.source_outlined,
|
|
||||||
title: 'Lyrics Providers',
|
|
||||||
subtitle: _getLyricsProvidersSubtitle(
|
|
||||||
settings.lyricsProviders,
|
|
||||||
),
|
|
||||||
onTap: () => Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (_) => const LyricsProviderPriorityPage(),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SettingsItem(
|
||||||
SettingsSwitchItem(
|
icon: Icons.source_outlined,
|
||||||
icon: Icons.translate_outlined,
|
title: 'Lyrics Providers',
|
||||||
title: 'Netease: Include Translation',
|
subtitle: _getLyricsProvidersSubtitle(
|
||||||
subtitle: settings.lyricsIncludeTranslationNetease
|
settings.lyricsProviders,
|
||||||
? 'Append translated lyrics when available'
|
),
|
||||||
: 'Use original lyrics only',
|
onTap: () => Navigator.push(
|
||||||
value: settings.lyricsIncludeTranslationNetease,
|
context,
|
||||||
onChanged: (value) => ref
|
MaterialPageRoute(
|
||||||
.read(settingsProvider.notifier)
|
builder: (_) => const LyricsProviderPriorityPage(),
|
||||||
.setLyricsIncludeTranslationNetease(value),
|
),
|
||||||
),
|
),
|
||||||
SettingsSwitchItem(
|
|
||||||
icon: Icons.text_fields_outlined,
|
|
||||||
title: 'Netease: Include Romanization',
|
|
||||||
subtitle: settings.lyricsIncludeRomanizationNetease
|
|
||||||
? 'Append romanized lyrics when available'
|
|
||||||
: 'Disabled',
|
|
||||||
value: settings.lyricsIncludeRomanizationNetease,
|
|
||||||
onChanged: (value) => ref
|
|
||||||
.read(settingsProvider.notifier)
|
|
||||||
.setLyricsIncludeRomanizationNetease(value),
|
|
||||||
),
|
|
||||||
SettingsSwitchItem(
|
|
||||||
icon: Icons.record_voice_over_outlined,
|
|
||||||
title: 'Apple/QQ Multi-Person Word-by-Word',
|
|
||||||
subtitle: settings.lyricsMultiPersonWordByWord
|
|
||||||
? 'Enable v1/v2 speaker and [bg:] tags'
|
|
||||||
: 'Simplified word-by-word formatting',
|
|
||||||
value: settings.lyricsMultiPersonWordByWord,
|
|
||||||
onChanged: (value) => ref
|
|
||||||
.read(settingsProvider.notifier)
|
|
||||||
.setLyricsMultiPersonWordByWord(value),
|
|
||||||
),
|
|
||||||
SettingsItem(
|
|
||||||
icon: Icons.language_outlined,
|
|
||||||
title: 'Musixmatch Language',
|
|
||||||
subtitle: settings.musixmatchLanguage.isEmpty
|
|
||||||
? 'Auto (original)'
|
|
||||||
: settings.musixmatchLanguage.toUpperCase(),
|
|
||||||
onTap: () => _showMusixmatchLanguagePicker(
|
|
||||||
context,
|
|
||||||
ref,
|
|
||||||
settings.musixmatchLanguage,
|
|
||||||
),
|
),
|
||||||
showDivider: false,
|
SettingsSwitchItem(
|
||||||
),
|
icon: Icons.translate_outlined,
|
||||||
|
title: 'Netease: Include Translation',
|
||||||
|
subtitle: settings.lyricsIncludeTranslationNetease
|
||||||
|
? 'Append translated lyrics when available'
|
||||||
|
: 'Use original lyrics only',
|
||||||
|
value: settings.lyricsIncludeTranslationNetease,
|
||||||
|
onChanged: (value) => ref
|
||||||
|
.read(settingsProvider.notifier)
|
||||||
|
.setLyricsIncludeTranslationNetease(value),
|
||||||
|
),
|
||||||
|
SettingsSwitchItem(
|
||||||
|
icon: Icons.text_fields_outlined,
|
||||||
|
title: 'Netease: Include Romanization',
|
||||||
|
subtitle: settings.lyricsIncludeRomanizationNetease
|
||||||
|
? 'Append romanized lyrics when available'
|
||||||
|
: 'Disabled',
|
||||||
|
value: settings.lyricsIncludeRomanizationNetease,
|
||||||
|
onChanged: (value) => ref
|
||||||
|
.read(settingsProvider.notifier)
|
||||||
|
.setLyricsIncludeRomanizationNetease(value),
|
||||||
|
),
|
||||||
|
SettingsSwitchItem(
|
||||||
|
icon: Icons.record_voice_over_outlined,
|
||||||
|
title: 'Apple/QQ Multi-Person Word-by-Word',
|
||||||
|
subtitle: settings.lyricsMultiPersonWordByWord
|
||||||
|
? 'Enable v1/v2 speaker and [bg:] tags'
|
||||||
|
: 'Simplified word-by-word formatting',
|
||||||
|
value: settings.lyricsMultiPersonWordByWord,
|
||||||
|
onChanged: (value) => ref
|
||||||
|
.read(settingsProvider.notifier)
|
||||||
|
.setLyricsMultiPersonWordByWord(value),
|
||||||
|
),
|
||||||
|
SettingsItem(
|
||||||
|
icon: Icons.language_outlined,
|
||||||
|
title: 'Musixmatch Language',
|
||||||
|
subtitle: settings.musixmatchLanguage.isEmpty
|
||||||
|
? 'Auto (original)'
|
||||||
|
: settings.musixmatchLanguage.toUpperCase(),
|
||||||
|
onTap: () => _showMusixmatchLanguagePicker(
|
||||||
|
context,
|
||||||
|
ref,
|
||||||
|
settings.musixmatchLanguage,
|
||||||
|
),
|
||||||
|
showDivider: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue