新增启动参数 search
parent
4533f7b1d5
commit
53f5c168ad
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
- 新增多语言设置,目前软件内置了简体中文、繁体中文、英语三种语言,欢迎提交PR翻译更多语言!
|
- 新增多语言设置,目前软件内置了简体中文、繁体中文、英语三种语言,欢迎提交PR翻译更多语言!
|
||||||
- 新增无法打开外部歌单FAQ
|
- 新增无法打开外部歌单FAQ
|
||||||
|
- 新增启动参数`search`,使用例子:`.\lx-music-desktop.exe -search="突然的自我 - 伍佰"`
|
||||||
|
|
||||||
### 优化
|
### 优化
|
||||||
|
|
||||||
|
|
|
@ -112,18 +112,8 @@ export default {
|
||||||
...mapMutations('download', ['updateDownloadList']),
|
...mapMutations('download', ['updateDownloadList']),
|
||||||
...mapMutations(['setSetting']),
|
...mapMutations(['setSetting']),
|
||||||
init() {
|
init() {
|
||||||
rendererInvoke('getEnvParams').then(envParams => {
|
rendererInvoke('getEnvParams').then(this.handleEnvParamsInit)
|
||||||
this.envParams = envParams
|
|
||||||
this.isNt = isLinux || this.envParams.nt
|
|
||||||
if (this.isNt) {
|
|
||||||
document.body.classList.remove('transparent')
|
|
||||||
document.body.classList.add('noTransparent')
|
|
||||||
}
|
|
||||||
if (this.isProd && !this.isNt) {
|
|
||||||
document.body.addEventListener('mouseenter', this.dieableIgnoreMouseEvents)
|
|
||||||
document.body.addEventListener('mouseleave', this.enableIgnoreMouseEvents)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
document.body.addEventListener('click', this.handleBodyClick, true)
|
document.body.addEventListener('click', this.handleBodyClick, true)
|
||||||
rendererOn('update-available', (e, info) => {
|
rendererOn('update-available', (e, info) => {
|
||||||
// this.showUpdateModal(true)
|
// this.showUpdateModal(true)
|
||||||
|
@ -259,6 +249,27 @@ export default {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
if (/^https?:\/\//.test(event.target.href)) openUrl(event.target.href)
|
if (/^https?:\/\//.test(event.target.href)) openUrl(event.target.href)
|
||||||
},
|
},
|
||||||
|
handleEnvParamsInit(envParams) {
|
||||||
|
this.envParams = envParams
|
||||||
|
this.isNt = isLinux || this.envParams.nt
|
||||||
|
if (this.isNt) {
|
||||||
|
document.body.classList.remove('transparent')
|
||||||
|
document.body.classList.add('noTransparent')
|
||||||
|
}
|
||||||
|
if (this.isProd && !this.isNt) {
|
||||||
|
document.body.addEventListener('mouseenter', this.dieableIgnoreMouseEvents)
|
||||||
|
document.body.addEventListener('mouseleave', this.enableIgnoreMouseEvents)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.envParams.search != null) {
|
||||||
|
this.$router.push({
|
||||||
|
path: 'search',
|
||||||
|
query: {
|
||||||
|
text: this.envParams.search,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.clearUpdateTimeout()
|
this.clearUpdateTimeout()
|
||||||
|
|
Loading…
Reference in New Issue