更新到v0.2.3版本
This commit is contained in:
@@ -87,7 +87,7 @@ export default {
|
||||
this.getVersionInfo().then(body => {
|
||||
this.setNewVersion(body)
|
||||
this.$nextTick(() => {
|
||||
this.setVersionVisible(true)
|
||||
this.setVersionVisible({ isShow: true })
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -41,7 +41,7 @@ div(:class="$style.player")
|
||||
<script>
|
||||
import Lyric from 'lrc-file-parser'
|
||||
import { rendererSend } from '../../../common/icp'
|
||||
import { formatPlayTime2, getRandom, checkPath } from '../../utils'
|
||||
import { formatPlayTime2, getRandom, checkPath, setTitle } from '../../utils'
|
||||
import { mapGetters, mapActions, mapMutations } from 'vuex'
|
||||
import { requestMsg } from '../../utils/message'
|
||||
|
||||
@@ -334,14 +334,14 @@ export default {
|
||||
startPlay() {
|
||||
this.isPlay = true
|
||||
if (this.musicInfo.lrc) this.lyric.lrc.play(this.audio.currentTime * 1000)
|
||||
this.setAppName()
|
||||
this.setAppTitle()
|
||||
this.sendProgressEvent(this.progress, 'normal')
|
||||
},
|
||||
stopPlay() {
|
||||
this.isPlay = false
|
||||
this.lyric.lrc.pause()
|
||||
this.sendProgressEvent(this.progress, 'paused')
|
||||
this.clearAppName()
|
||||
this.clearAppTitle()
|
||||
},
|
||||
setProgess(e) {
|
||||
this.audio.currentTime =
|
||||
@@ -432,13 +432,11 @@ export default {
|
||||
mode: mode || 'normal',
|
||||
})
|
||||
},
|
||||
setAppName() {
|
||||
// rendererSend('appName', {
|
||||
// name: `${this.musicInfo.name} - ${this.musicInfo.singer}`,
|
||||
// })
|
||||
setAppTitle() {
|
||||
setTitle(`${this.musicInfo.name} - ${this.musicInfo.singer}`)
|
||||
},
|
||||
clearAppName() {
|
||||
// rendererSend('appName')
|
||||
clearAppTitle() {
|
||||
setTitle()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template lang="pug">
|
||||
div(:class="$style.checkbox")
|
||||
input(:type="need ? 'radio' : 'checkbox'" :id="id" :value="value" :name="name" @change="change" v-model="bool")
|
||||
input(:type="need ? 'radio' : 'checkbox'" :id="id" :disabled="disabled" :value="value" :name="name" @change="change" v-model="bool")
|
||||
label(:for="id" :class="$style.content")
|
||||
div(v-if="indeterminate")
|
||||
svg(v-show="indeterminate" version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' width="100%" viewBox='0 32 448 448' space='preserve')
|
||||
@@ -34,6 +34,10 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
label: {},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
indeterminate: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -111,6 +115,11 @@ export default {
|
||||
|
||||
> input {
|
||||
display: none;
|
||||
&[disabled] {
|
||||
+ .content {
|
||||
opacity: .5;
|
||||
}
|
||||
}
|
||||
&:checked {
|
||||
+ .content {
|
||||
> div {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { author, name } from '../../../package.json'
|
||||
export default {
|
||||
getVersionInfo() {
|
||||
return new Promise((resolve, reject) => {
|
||||
httpGet(`https://raw.githubusercontent.com/${author}/${name}/master/publish/version.json`, (err, resp, body) => {
|
||||
httpGet(`https://raw.githubusercontent.com/${author.name}/${name}/master/publish/version.json`, (err, resp, body) => {
|
||||
if (err) return reject(err)
|
||||
resolve(body)
|
||||
})
|
||||
|
||||
@@ -56,7 +56,7 @@ const actions = {
|
||||
// mitations
|
||||
const mutations = {
|
||||
setUrl(state, datas) {
|
||||
datas.musicInfo.typeUrl[datas.type] = datas.url
|
||||
datas.musicInfo.typeUrl = Object.assign({}, datas.musicInfo.typeUrl, { [datas.type]: datas.url })
|
||||
},
|
||||
getPic(state, datas) {
|
||||
datas.musicInfo.img = datas.url
|
||||
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
// val.desc = val.desc.replace(/\n/g, '<br>')
|
||||
state.version.newVersion = val
|
||||
},
|
||||
setVersionVisible(state, val) {
|
||||
state.version.showModal = val
|
||||
setVersionVisible(state, { isShow }) {
|
||||
state.version.showModal = isShow
|
||||
},
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ export default {
|
||||
version,
|
||||
newVersion: null,
|
||||
showModal: false,
|
||||
isError: false,
|
||||
},
|
||||
userInfo: null,
|
||||
setting,
|
||||
|
||||
@@ -209,3 +209,10 @@ export const openUrl = url => {
|
||||
shell.openExternal(url)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置标题
|
||||
*/
|
||||
let dom_title = document.getElementsByTagName('title')[0]
|
||||
export const setTitle = title => {
|
||||
dom_title.innerText = title || '洛雪音乐助手'
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ div.scroll(:class="$style.setting")
|
||||
h3 音乐来源
|
||||
div
|
||||
material-checkbox(v-for="item in apiSources" :id="`setting_api_source_${item.id}`" @change="handleAPISourceChange(item.id)" :class="$style.gapTop"
|
||||
need v-model="current_setting.apiSource" :value="item.id" :label="item.label" :key="item.id")
|
||||
need v-model="current_setting.apiSource" :disabled="item.disabled" :value="item.id" :label="item.label" :key="item.id")
|
||||
|
||||
dt 播放设置
|
||||
dd(title="都不选时播放完当前歌曲就停止播放")
|
||||
@@ -87,9 +87,9 @@ div.scroll(:class="$style.setting")
|
||||
| !
|
||||
p.small 若有问题可 mail to:lyswhut@qq.com 或到 github 提交 issue
|
||||
p.small
|
||||
| 若觉得好用的话去GitHub点个
|
||||
| 若觉得好用的话可以去GitHub点个
|
||||
strong star
|
||||
| 支持作者吧~
|
||||
| 支持作者哦~~🍻
|
||||
p
|
||||
small By:
|
||||
| 落雪无痕
|
||||
@@ -146,11 +146,14 @@ export default {
|
||||
apiSources: [
|
||||
{
|
||||
id: 'messoer',
|
||||
label: '由 messoer 提供的接口(推荐,软件的所有功能都可用)<br><span style="line-height: 1.5;"><strong>注意:</strong>本接口10秒内请求数超过100次会封10小时的IP</span>',
|
||||
label: '由 messoer 提供的接口(推荐,软件的所有功能都可用)',
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
id: 'temp',
|
||||
label: '临时接口(软件的某些功能将不可用,建议在messoer不可用时再切换到本选项)',
|
||||
// label: '临时接口(软件的某些功能将不可用,建议在messoer不可用时再切换到本选项)',
|
||||
label: '临时接口(因服务器被攻击,本接口已关闭)',
|
||||
disabled: true,
|
||||
},
|
||||
],
|
||||
musicNames: [
|
||||
|
||||
Reference in New Issue
Block a user