master
qier222 4 years ago
parent 5b6619d1de
commit 6ce9055484
No known key found for this signature in database
GPG Key ID: 9C85007ED905F14D

@ -117,7 +117,7 @@ const createRequest = (method, url, data, options) => {
headers: headers,
data: queryString.stringify(data),
httpAgent: new http.Agent({ keepAlive: true }),
httpsAgent: new https.Agent({ keepAlive: true }),
httpsAgent: new https.Agent({ keepAlive: true, rejectUnauthorized: false }),
}
if (options.crypto === 'eapi') settings.encoding = null

@ -46,7 +46,7 @@ export default {
};
},
computed: {
...mapState(['showLyrics', 'showLibraryDefault', 'player']),
...mapState(['showLyrics', 'settings', 'player']),
isAccountLoggedIn() {
return isAccountLoggedIn();
},
@ -69,7 +69,7 @@ export default {
},
},
created() {
this.showLibraryDefault && this.$router.push('/library');
this.settings.showLibraryDefault && this.$router.push('/library');
if (this.isElectron) ipcRenderer(this);
window.addEventListener('keydown', this.handleKeydown);
this.fetchData();

@ -11,7 +11,7 @@
<vue-slider
v-model="player.progress"
:min="0"
:max="player.currentTrackDuration + 1"
:max="player.currentTrackDuration"
:interval="1"
:drag-on-click="true"
:duration="0"
@ -19,6 +19,7 @@
:height="2"
:tooltip-formatter="formatTrackTime"
:lazy="true"
:silent="true"
></vue-slider>
</div>
<div class="controls">

@ -24,18 +24,6 @@ const updatePlayer = () => {
let appVersion = localStorage.getItem('appVersion');
if (appVersion === `"0.2.5"`) parsedData = {}; // 0.2.6版本重构了player
const data = {
_repeatMode: 'off',
_shuffle: false,
_list: [],
_current: 0,
_playlistSource: {},
_volume: 1,
_volumeBeforeMuted: 1,
_currentTrack: {},
_playNextList: [],
_enabled: false,
_shuffledList: [],
_shuffledCurrent: 0,
...parsedData,
};
localStorage.setItem('player', JSON.stringify(data));

@ -21,7 +21,7 @@
>
</div>
<div class="buttons">
<ButtonTwoTone :icon-class="play" @click.native="playPopularSongs()">
<ButtonTwoTone icon-class="play" @click.native="playPopularSongs()">
{{ $t('common.play') }}
</ButtonTwoTone>
<ButtonTwoTone color="grey" @click.native="followArtist">

@ -77,7 +77,7 @@
<vue-slider
v-model="player.progress"
:min="0"
:max="player.currentTrackDuration + 1"
:max="player.currentTrackDuration"
:interval="1"
:drag-on-click="true"
:duration="0"
@ -85,6 +85,7 @@
:height="2"
:tooltip-formatter="formatTrackTime"
:lazy="true"
:silent="true"
></vue-slider>
</div>
<span>{{ formatTrackTime(player.currentTrackDuration) }}</span>
@ -221,17 +222,6 @@ export default {
bgImageUrl() {
return this.player.currentTrack?.al?.picUrl + '?param=500y500';
},
progress: {
get() {
return this.playerRef.progress;
},
set(value) {
this.playerRef.setProgress(value);
},
},
progressMax() {
return this.playerRef.progressMax;
},
lyricWithTranslation() {
let ret = [];
//
@ -268,9 +258,6 @@ export default {
fontSize: `${this.$store.state.settings.lyricFontSize || 28}px`,
};
},
playerRef() {
return this.$parent.$refs.player ? this.$parent.$refs.player : {};
},
noLyric() {
return this.lyric.length == 0;
},

@ -503,7 +503,8 @@ export default {
},
enableUnblockNeteaseMusic: {
get() {
return this.settings.enableUnblockNeteaseMusic || true;
const value = this.settings.enableUnblockNeteaseMusic;
return value !== undefined ? value : true;
},
set(value) {
this.$store.commit('updateSettings', {

Loading…
Cancel
Save