diff --git a/publish/changeLog.md b/publish/changeLog.md index eec3ac25..ac904376 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,6 +1,7 @@ ### 新增 -- 新增 快进/快退5秒 自定义快捷键设置(#2289) +- 新增「快进/快退5秒」自定义快捷键设置(#2289) +- 新增「设置 → 桌面歌词设置 → 暂停时降低歌词透明度」设置,默认启用(#2294) ### 修复 diff --git a/src/common/defaultSetting.ts b/src/common/defaultSetting.ts index 9d39197b..273bfae3 100644 --- a/src/common/defaultSetting.ts +++ b/src/common/defaultSetting.ts @@ -76,6 +76,7 @@ const defaultSetting: LX.AppSetting = { 'desktopLyric.isShowTaskbar': false, 'desktopLyric.audioVisualization': false, 'desktopLyric.fullscreenHide': true, + 'desktopLyric.pauseHide': true, 'desktopLyric.width': 450, 'desktopLyric.height': 300, 'desktopLyric.x': null, diff --git a/src/common/types/app_setting.d.ts b/src/common/types/app_setting.d.ts index 8e2c0813..04ca1fe4 100644 --- a/src/common/types/app_setting.d.ts +++ b/src/common/types/app_setting.d.ts @@ -340,6 +340,11 @@ declare global { */ 'desktopLyric.fullscreenHide': boolean + /** + * 是否在暂停时隐藏歌词 + */ + 'desktopLyric.pauseHide': boolean + /** * 桌面歌词窗口宽度 */ diff --git a/src/common/types/desktop_lyric.d.ts b/src/common/types/desktop_lyric.d.ts index feb0f49a..e02a0c16 100644 --- a/src/common/types/desktop_lyric.d.ts +++ b/src/common/types/desktop_lyric.d.ts @@ -6,6 +6,7 @@ declare namespace LX { 'desktopLyric.isAlwaysOnTop': LX.AppSetting['desktopLyric.isAlwaysOnTop'] 'desktopLyric.isAlwaysOnTopLoop': LX.AppSetting['desktopLyric.isAlwaysOnTopLoop'] 'desktopLyric.isShowTaskbar': LX.AppSetting['desktopLyric.isShowTaskbar'] + 'desktopLyric.pauseHide': LX.AppSetting['desktopLyric.pauseHide'] 'desktopLyric.audioVisualization': LX.AppSetting['desktopLyric.audioVisualization'] 'desktopLyric.width': LX.AppSetting['desktopLyric.width'] 'desktopLyric.height': LX.AppSetting['desktopLyric.height'] diff --git a/src/lang/en-us.json b/src/lang/en-us.json index 71c7db78..d6a6e21c 100644 --- a/src/lang/en-us.json +++ b/src/lang/en-us.json @@ -388,6 +388,7 @@ "setting__desktop_lyric_line_gap_dec": "Decrease spacing", "setting__desktop_lyric_lock": "Lock lyric window", "setting__desktop_lyric_lock_screen": "Do not allow lyric window to be dragged out of main screen", + "setting__desktop_lyric_pause_hide_hide": "Decrease lyric window transparency when pause", "setting__desktop_lyric_played_color": "Played", "setting__desktop_lyric_reset": "Reset", "setting__desktop_lyric_reset_window": "Reset Desktop Lyric Options", diff --git a/src/lang/zh-cn.json b/src/lang/zh-cn.json index 9c922325..27f4ade5 100644 --- a/src/lang/zh-cn.json +++ b/src/lang/zh-cn.json @@ -388,6 +388,7 @@ "setting__desktop_lyric_line_gap_dec": "减小间距", "setting__desktop_lyric_lock": "锁定歌词", "setting__desktop_lyric_lock_screen": "不允许歌词窗口拖出主屏幕之外", + "setting__desktop_lyric_pause_hide_hide": "暂停时降低歌词透明度", "setting__desktop_lyric_played_color": "已播放颜色", "setting__desktop_lyric_reset": "重置", "setting__desktop_lyric_reset_window": "重置窗口设置", diff --git a/src/lang/zh-tw.json b/src/lang/zh-tw.json index 697ff80a..91621845 100644 --- a/src/lang/zh-tw.json +++ b/src/lang/zh-tw.json @@ -388,6 +388,7 @@ "setting__desktop_lyric_line_gap_dec": "減小間距", "setting__desktop_lyric_lock": "鎖定歌詞視窗", "setting__desktop_lyric_lock_screen": "不允許歌詞視窗拖出主螢幕之外", + "setting__desktop_lyric_pause_hide_hide": "暫停時降低歌詞透明度", "setting__desktop_lyric_played_color": "已播放顏色", "setting__desktop_lyric_reset": "重設", "setting__desktop_lyric_reset_window": "重設視窗設定", diff --git a/src/main/modules/winLyric/utils.ts b/src/main/modules/winLyric/utils.ts index a9fe9fb1..1846f65e 100644 --- a/src/main/modules/winLyric/utils.ts +++ b/src/main/modules/winLyric/utils.ts @@ -53,6 +53,7 @@ export const watchConfigKeys = [ 'desktopLyric.isAlwaysOnTop', 'desktopLyric.isAlwaysOnTopLoop', 'desktopLyric.isShowTaskbar', + 'desktopLyric.pauseHide', 'desktopLyric.audioVisualization', 'desktopLyric.width', 'desktopLyric.height', @@ -82,7 +83,7 @@ export const watchConfigKeys = [ 'player.isShowLyricRoma', 'player.isPlayLxlrc', 'player.playbackRate', -] as const +] satisfies Array export const buildLyricConfig = (appSetting: Partial): Partial => { const setting: Partial = {} diff --git a/src/renderer-lyric/App.vue b/src/renderer-lyric/App.vue index 66fcf1cf..0ca512dc 100644 --- a/src/renderer-lyric/App.vue +++ b/src/renderer-lyric/App.vue @@ -1,5 +1,5 @@