Skip to content

Commit 36ed7bc

Browse files
committed
Merge branch 'dev'
2 parents 526b5fe + 1fa0157 commit 36ed7bc

47 files changed

Lines changed: 613 additions & 389 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,34 @@ Project versioning adheres to [Semantic Versioning](http://semver.org/).
66
Commit convention is based on [Conventional Commits](http://conventionalcommits.org).
77
Change log format is based on [Keep a Changelog](http://keepachangelog.com/).
88

9+
## [1.2.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.1.1...v1.2.0) - 2020-09-30
10+
11+
提前祝大家中秋&国庆快乐~
12+
13+
### 新增
14+
15+
- 播放控制栏开启/关闭桌面歌词按钮 新增右击按钮时锁定/解锁桌面歌词功能
16+
17+
### 优化
18+
19+
- 优化我的列表滚动条位置的保存逻辑
20+
- 更新设置-备份与恢复功能的描述
21+
- 优化软件内鼠标悬停的提示界面
22+
23+
### 修复
24+
25+
- 修复桌面歌词窗口不允许拖出桌面之外的位置计算偏移Bug
26+
- 修复网易云KTV嗨榜无法加载的问题
27+
- 修复初始化搜索历史列表功能
28+
- 修复重启软件后试听列表与收藏列表无法恢复上次的滚动位置的问题
29+
- 修复歌曲封面无法嵌入的Bug
30+
- 修复酷狗歌词格式问题
31+
- 修复关闭切换动画时从搜索候选列表点击内容无效的问题
32+
33+
### 其他
34+
35+
- 更新 Electron 到 v10.1.3
36+
937
## [1.1.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.1.0...v1.1.1) - 2020-09-19
1038

1139
### 修复

package-lock.json

Lines changed: 127 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lx-music-desktop",
3-
"version": "1.1.1",
3+
"version": "1.2.0",
44
"description": "一个免费的音乐下载助手",
55
"main": "./dist/electron/main.js",
66
"productName": "lx-music-desktop",
@@ -59,7 +59,7 @@
5959
"lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-formatter-friendly --fix src"
6060
},
6161
"browserslist": [
62-
"Electron 10.1.2"
62+
"Electron 10.1.3"
6363
],
6464
"engines": {
6565
"node": ">= 12"
@@ -175,23 +175,23 @@
175175
"core-js": "^3.6.5",
176176
"cross-env": "^7.0.2",
177177
"css-loader": "^4.3.0",
178-
"del": "^5.1.0",
179-
"electron": "^10.1.2",
178+
"del": "^6.0.0",
179+
"electron": "^10.1.3",
180180
"electron-builder": "^22.8.1",
181181
"electron-debug": "^3.1.0",
182182
"electron-devtools-installer": "^3.1.1",
183-
"eslint": "^7.9.0",
183+
"eslint": "^7.10.0",
184184
"eslint-config-standard": "^14.1.1",
185185
"eslint-formatter-friendly": "^7.0.0",
186186
"eslint-loader": "^4.0.2",
187187
"eslint-plugin-html": "^6.1.0",
188-
"eslint-plugin-import": "^2.22.0",
188+
"eslint-plugin-import": "^2.22.1",
189189
"eslint-plugin-node": "^11.1.0",
190190
"eslint-plugin-promise": "^4.2.1",
191191
"eslint-plugin-standard": "^4.0.1",
192192
"file-loader": "^6.1.0",
193193
"friendly-errors-webpack-plugin": "^1.7.0",
194-
"html-webpack-plugin": "^4.4.1",
194+
"html-webpack-plugin": "^4.5.0",
195195
"less": "^3.12.2",
196196
"less-loader": "^7.0.1",
197197
"markdown-it": "^11.0.1",
@@ -207,7 +207,7 @@
207207
"spinnies": "^0.5.1",
208208
"stylus": "^0.54.8",
209209
"stylus-loader": "^3.0.2",
210-
"terser-webpack-plugin": "^4.2.1",
210+
"terser-webpack-plugin": "^4.2.2",
211211
"url-loader": "^4.1.0",
212212
"vue-loader": "^15.9.3",
213213
"vue-template-compiler": "^2.6.12",
@@ -228,11 +228,11 @@
228228
"js-htmlencode": "^0.3.0",
229229
"lrc-file-parser": "^1.0.5",
230230
"needle": "^2.5.2",
231-
"node-id3": "^0.1.18",
231+
"node-id3": "^0.1.19",
232232
"request": "^2.88.2",
233233
"vue": "^2.6.12",
234234
"vue-i18n": "^8.21.1",
235-
"vue-router": "^3.4.3",
235+
"vue-router": "^3.4.5",
236236
"vuex": "^3.5.1",
237237
"vuex-router-sync": "^5.0.0"
238238
}

publish/changeLog.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
提前祝大家中秋&国庆快乐~
2+
3+
### 新增
4+
5+
- 播放控制栏开启/关闭桌面歌词按钮 新增右击按钮时锁定/解锁桌面歌词功能
6+
7+
### 优化
8+
9+
- 优化我的列表滚动条位置的保存逻辑
10+
- 更新设置-备份与恢复功能的描述
11+
- 优化软件内鼠标悬停的提示界面
12+
113
### 修复
214

3-
- 修复某些情况下桌面歌词不会播放的问题
15+
- 修复桌面歌词窗口不允许拖出桌面之外的位置计算偏移Bug
16+
- 修复网易云KTV嗨榜无法加载的问题
17+
- 修复初始化搜索历史列表功能
18+
- 修复重启软件后试听列表与收藏列表无法恢复上次的滚动位置的问题
19+
- 修复歌曲封面无法嵌入的Bug
20+
- 修复酷狗歌词格式问题
21+
- 修复关闭切换动画时从搜索候选列表点击内容无效的问题
22+
23+
### 其他
24+
25+
- 更新 Electron 到 v10.1.3

publish/version.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/common/ipcNames.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ const names = {
4848
get_playlist: 'get_playlist',
4949
save_playlist: 'save_playlist',
5050
get_data: 'get_data',
51-
set_data: 'set_data',
5251
save_data: 'save_data',
5352
get_hot_key: 'get_hot_key',
5453
},

src/common/utils.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,11 @@ exports.initSetting = () => {
173173
// 迁移列表滚动位置设置 ~0.18.3
174174
if (setting.list.scroll) {
175175
let scroll = setting.list.scroll
176-
electronStore_list.set('defaultList.location', scroll.locations.defaultList || 0)
177-
electronStore_list.set('loveList.location', scroll.locations.loveList || 0)
176+
electronStore_list.set('defaultList.location', scroll.locations.default || 0)
177+
electronStore_list.set('loveList.location', scroll.locations.love || 0)
178178
electronStore_config.delete('setting.list.scroll')
179179
electronStore_config.set('setting.list.isSaveScrollLocation', scroll.enable)
180+
delete setting.list.scroll
180181
}
181182
}
182183

src/main/modules/winLyric/event.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { common: COMMON_EVENT_NAME, winLyric: WIN_LYRIC_EVENT_NAME, hotKey: HOT_KEY_EVENT_NAME, mainWindow: MAIN_WINDOW_EVENT_NAME } = require('../../events/_name')
22
const { mainSend, NAMES: { winLyric: ipcWinLyricNames } } = require('../../../common/ipc')
33
const { desktop_lyric } = require('../../../common/hotKey')
4-
const { setLyricWindow } = require('./utils')
4+
const { getLyricWindowBounds } = require('./utils')
55

66
let isLock = null
77
let isEnable = null
@@ -27,6 +27,17 @@ const setLrcConfig = () => {
2727
isAlwaysOnTop = desktopLyric.isAlwaysOnTop
2828
global.modules.lyricWindow.setAlwaysOnTop(desktopLyric.isAlwaysOnTop, 'screen-saver')
2929
}
30+
if (isLockScreen != desktopLyric.isLockScreen) {
31+
isLockScreen = desktopLyric.isLockScreen
32+
if (desktopLyric.isLockScreen) {
33+
global.modules.lyricWindow.setBounds(getLyricWindowBounds(global.modules.lyricWindow.getBounds(), {
34+
x: null,
35+
y: null,
36+
w: desktopLyric.width,
37+
h: desktopLyric.height,
38+
}))
39+
}
40+
}
3041
}
3142
if (isEnable != desktopLyric.enable) {
3243
isEnable = desktopLyric.enable
@@ -36,17 +47,6 @@ const setLrcConfig = () => {
3647
global.lx_event.winLyric.close()
3748
}
3849
}
39-
if (isLockScreen != desktopLyric.isLockScreen) {
40-
isLockScreen = desktopLyric.isLockScreen
41-
if (desktopLyric.isLockScreen) {
42-
setLyricWindow({
43-
x: desktopLyric.x,
44-
y: desktopLyric.y,
45-
w: desktopLyric.width,
46-
h: desktopLyric.height,
47-
})
48-
}
49-
}
5050
}
5151
global.lx_event.common.on(COMMON_EVENT_NAME.config, name => {
5252
if (WIN_LYRIC_EVENT_NAME.name === name) return

src/main/modules/winLyric/index.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const { BrowserWindow } = require('electron')
22
const { winLyric: WIN_LYRIC_EVENT_NAME } = require('../../events/_name')
33
const { debounce } = require('../../../common/utils')
4+
const { getLyricWindowBounds } = require('./utils')
45

56
require('./event')
67
require('./rendererEvent')
@@ -67,29 +68,29 @@ const winEvent = lyricWindow => {
6768
})
6869
}
6970

70-
let offset = 8
7171
const createWindow = () => {
7272
if (global.modules.lyricWindow) return
7373
if (!global.appSetting.desktopLyric.enable) return
7474
// const windowSizeInfo = getWindowSizeInfo(global.appSetting)
7575
let { x, y, width, height, isAlwaysOnTop } = global.appSetting.desktopLyric
7676
let { width: screenWidth, height: screenHeight } = global.envParams.workAreaSize
77-
screenWidth += offset * 2
78-
screenHeight += offset * 2
7977
if (x == null) {
80-
x = screenWidth - width - offset
81-
y = screenHeight - height - offset
78+
x = screenWidth - width
79+
y = screenHeight - height
8280
}
8381
if (global.appSetting.desktopLyric.isLockScreen) {
84-
x = Math.max(-offset, screenWidth < (width + x) ? screenWidth - width : x)
85-
y = Math.max(-offset, screenHeight < (height + y) ? screenHeight - height : y)
82+
let bounds = getLyricWindowBounds({ x, y, width, height }, { x: null, y: null, w: width, h: height })
83+
x = bounds.x
84+
y = bounds.y
85+
width = bounds.width
86+
height = bounds.height
8687
}
8788
/**
8889
* Initial window options
8990
*/
9091
global.modules.lyricWindow = new BrowserWindow({
91-
height: Math.max(height > screenHeight ? screenHeight : height, 80),
92-
width: Math.max(width > screenWidth ? screenWidth : width, 380),
92+
height,
93+
width,
9394
x,
9495
y,
9596
minWidth: 380,

src/main/modules/winLyric/rendererEvent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const {
88
},
99
} = require('../../../common/ipc')
1010
const { winLyric: WIN_LYRIC_EVENT_NAME } = require('../../events/_name')
11-
const { setLyricWindow } = require('./utils')
11+
const { getLyricWindowBounds } = require('./utils')
1212

1313
mainOn(ipcWinLyricNames.get_lyric_info, (event, action) => {
1414
if (!global.modules.mainWindow) return
@@ -28,5 +28,5 @@ mainHandle(ipcWinLyricNames.get_lyric_config, async() => {
2828
})
2929

3030
mainOn(ipcWinLyricNames.set_win_bounds, (event, options) => {
31-
setLyricWindow(options)
31+
global.modules.lyricWindow.setBounds(getLyricWindowBounds(global.modules.lyricWindow.getBounds(), options))
3232
})

0 commit comments

Comments
 (0)