新增调换翻译歌词与罗马音歌词位置设置,优化歌词显示逻辑(#2451)
This commit is contained in:
@@ -160,8 +160,10 @@ export const setLyric = () => {
|
||||
if (!musicInfo.id) return
|
||||
if (musicInfo.lrc) {
|
||||
const extendedLyrics = []
|
||||
if (appSetting['player.isShowLyricTranslation'] && musicInfo.tlrc) extendedLyrics.push(musicInfo.tlrc)
|
||||
if (appSetting['player.isShowLyricRoma'] && musicInfo.rlrc) extendedLyrics.push(musicInfo.rlrc)
|
||||
if (appSetting['player.isShowLyricTranslation'] && musicInfo.tlrc) extendedLyrics.push(musicInfo.tlrc)
|
||||
if (appSetting['player.isSwapLyricTranslationAndRoma']) extendedLyrics.reverse()
|
||||
|
||||
lrc.setLyric(
|
||||
appSetting['player.isPlayLxlrc'] && musicInfo.lxlrc ? musicInfo.lxlrc : musicInfo.lrc,
|
||||
extendedLyrics,
|
||||
|
||||
@@ -25,6 +25,7 @@ export default () => {
|
||||
|
||||
watch(() => appSetting['player.isShowLyricTranslation'], setLyric)
|
||||
watch(() => appSetting['player.isShowLyricRoma'], setLyric)
|
||||
watch(() => appSetting['player.isSwapLyricTranslationAndRoma'], setLyric)
|
||||
watch(() => appSetting['player.isPlayLxlrc'], setLyric)
|
||||
|
||||
window.app_event.on('play', play)
|
||||
|
||||
@@ -14,6 +14,8 @@ dd
|
||||
base-checkbox(id="setting_player_lyric_transition" :model-value="appSetting['player.isShowLyricTranslation']" :label="$t('setting__play_lyric_transition')" @update:model-value="updateSetting({'player.isShowLyricTranslation': $event})")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_player_lyric_roma" :model-value="appSetting['player.isShowLyricRoma']" :label="$t('setting__play_lyric_roma')" @update:model-value="updateSetting({'player.isShowLyricRoma': $event})")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_player_awap_lyric_trans_roma" :model-value="appSetting['player.isSwapLyricTranslationAndRoma']" :label="$t('setting__player_awap_lyric_trans_roma')" @update:model-value="updateSetting({'player.isSwapLyricTranslationAndRoma': $event})")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_player_auto_skip_on_error" :model-value="appSetting['player.autoSkipOnError']" :label="$t('setting__play_auto_skip_on_error')" @update:model-value="updateSetting({'player.autoSkipOnError': $event})")
|
||||
.gap-top
|
||||
|
||||
Reference in New Issue
Block a user