新增调换翻译歌词与罗马音歌词位置设置,优化歌词显示逻辑(#2451)
parent
4c6257c145
commit
ad0c0f37c9
|
@ -3,7 +3,13 @@
|
|||
- 新增「设置 → 其他设置 → 主窗口使用软件内置的圆角及阴影」设置(#2360)
|
||||
*默认启用,关闭后将使用系统原生的窗口样式,该设置重启软件后生效*
|
||||
- 开放API新增播放器声音大小、静音、播放进度控制,详情看接入文档(#2386)
|
||||
- 新增「设置 → 播放设置 → 调换翻译歌词与罗马音歌词位置」设置,默认关闭(#2451)
|
||||
|
||||
### 变更
|
||||
|
||||
- 调换 翻译歌词 与 罗马音歌词的位置,若你想要恢复默认的行为,可以开启 调换翻译歌词与罗马音歌词位置 设置
|
||||
- 更新代理配置规则,现在不启用代理时,图片、音频加载将不再走系统代理(#2382 @Folltoshe)
|
||||
|
||||
### 其他
|
||||
|
||||
- 更新 Electron 到 36.5.0
|
||||
|
|
|
@ -38,6 +38,7 @@ const defaultSetting: LX.AppSetting = {
|
|||
'player.isMediaDeviceRemovedStopPlay': false,
|
||||
'player.isShowLyricTranslation': false,
|
||||
'player.isShowLyricRoma': false,
|
||||
'player.isSwapLyricTranslationAndRoma': false,
|
||||
'player.isS2t': false,
|
||||
'player.isPlayLxlrc': !isMac,
|
||||
'player.isSavePlayTime': false,
|
||||
|
|
|
@ -159,6 +159,11 @@ declare global {
|
|||
*/
|
||||
'player.isShowLyricRoma': boolean
|
||||
|
||||
/**
|
||||
* 是否调换翻译歌词与罗马音歌词位置
|
||||
*/
|
||||
'player.isSwapLyricTranslationAndRoma': boolean
|
||||
|
||||
/**
|
||||
* 是否将歌词从简体转换为繁体
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,7 @@ declare namespace LX {
|
|||
'common.langId': LX.AppSetting['common.langId']
|
||||
'player.isShowLyricTranslation': LX.AppSetting['player.isShowLyricTranslation']
|
||||
'player.isShowLyricRoma': LX.AppSetting['player.isShowLyricRoma']
|
||||
'player.isSwapLyricTranslationAndRoma': LX.AppSetting['player.isSwapLyricTranslationAndRoma']
|
||||
'player.isPlayLxlrc': LX.AppSetting['player.isPlayLxlrc']
|
||||
'player.playbackRate': LX.AppSetting['player.playbackRate']
|
||||
}
|
||||
|
|
|
@ -555,6 +555,7 @@
|
|||
"setting__play_task_bar": "Show playback progress on the taskbar",
|
||||
"setting__play_timeout": "Timed Pause",
|
||||
"setting__player_audio_visualization_tip": "The custom audio output device feature conflicts with the audio visualization feature. After the audio visualization is enabled, the audio output device will be reset to the default. At present, this problem cannot be resolved. Do you still want to enable it?",
|
||||
"setting__player_awap_lyric_trans_roma": "Swap lyric translation and roman",
|
||||
"setting__search": "Search",
|
||||
"setting__search_focus_search_box": "Automatically focus search box on startup",
|
||||
"setting__search_history": "Enable Search History",
|
||||
|
|
|
@ -555,6 +555,7 @@
|
|||
"setting__play_task_bar": "在任务栏上显示当前歌曲播放进度",
|
||||
"setting__play_timeout": "定时暂停",
|
||||
"setting__player_audio_visualization_tip": "自定义音频输出设备与音频可视化功能冲突,启用「音频可视化」后音频输出设备将会被重置为默认,目前此问题暂无法解决。是否仍要开启?",
|
||||
"setting__player_awap_lyric_trans_roma": "调换歌词翻译与歌词罗马音位置",
|
||||
"setting__search": "搜索设置",
|
||||
"setting__search_focus_search_box": "启动时自动聚焦搜索框",
|
||||
"setting__search_history": "显示历史搜索记录",
|
||||
|
|
|
@ -555,6 +555,7 @@
|
|||
"setting__play_task_bar": "在工具列上顯示目前歌曲播放進度",
|
||||
"setting__play_timeout": "定時暫停",
|
||||
"setting__player_audio_visualization_tip": "自訂音訊輸出裝置與音訊可視化功能衝突,啟用「音訊可視化」後音訊輸出裝置將會被重設為預設,目前此問題暫無法解決。是否仍要開啟?",
|
||||
"setting__player_awap_lyric_trans_roma": "調換歌詞翻譯與歌詞羅馬音位置",
|
||||
"setting__search": "搜尋設定",
|
||||
"setting__search_focus_search_box": "啟動時自動聚焦搜尋框",
|
||||
"setting__search_history": "顯示歷史搜尋記錄",
|
||||
|
|
|
@ -81,6 +81,7 @@ export const watchConfigKeys = [
|
|||
'common.langId',
|
||||
'player.isShowLyricTranslation',
|
||||
'player.isShowLyricRoma',
|
||||
'player.isSwapLyricTranslationAndRoma',
|
||||
'player.isPlayLxlrc',
|
||||
'player.playbackRate',
|
||||
] satisfies Array<keyof LX.AppSetting>
|
||||
|
|
|
@ -41,8 +41,9 @@ export const setPlaybackRate = (rate: number) => {
|
|||
export const setLyric = () => {
|
||||
if (!musicInfo.id) return
|
||||
const extendedLyrics = []
|
||||
if (setting['player.isShowLyricTranslation'] && lyrics.tlyric) extendedLyrics.push(lyrics.tlyric)
|
||||
if (setting['player.isShowLyricRoma'] && lyrics.rlyric) extendedLyrics.push(lyrics.rlyric)
|
||||
if (setting['player.isShowLyricTranslation'] && lyrics.tlyric) extendedLyrics.push(lyrics.tlyric)
|
||||
if (setting['player.isSwapLyricTranslationAndRoma']) extendedLyrics.reverse()
|
||||
lrc.setLyric(
|
||||
setting['player.isPlayLxlrc'] && lyrics.lxlyric ? lyrics.lxlyric : lyrics.lyric,
|
||||
extendedLyrics,
|
||||
|
|
|
@ -34,6 +34,7 @@ export const setting = shallowReactive<LX.DesktopLyric.Config>({
|
|||
'common.langId': 'zh-cn',
|
||||
'player.isShowLyricTranslation': false,
|
||||
'player.isShowLyricRoma': false,
|
||||
'player.isSwapLyricTranslationAndRoma': false,
|
||||
'player.isPlayLxlrc': false,
|
||||
'player.playbackRate': 1,
|
||||
})
|
||||
|
|
|
@ -6,6 +6,7 @@ import { isPlay, setting } from '@lyric/store/state'
|
|||
export default () => {
|
||||
watch(() => setting['player.isShowLyricTranslation'], setLyric)
|
||||
watch(() => setting['player.isShowLyricRoma'], setLyric)
|
||||
watch(() => setting['player.isSwapLyricTranslationAndRoma'], setLyric)
|
||||
watch(() => setting['player.isPlayLxlrc'], setLyric)
|
||||
watch(() => setting['player.playbackRate'], (rate) => {
|
||||
setPlaybackRate(rate)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue