mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 13:17:46 +00:00
fix: bugs
This commit is contained in:
parent
9ccce5b468
commit
f1e3d8ebf0
7 changed files with 54 additions and 23 deletions
|
|
@ -32,6 +32,7 @@ import { mapActions, mapMutations, mapState } from 'vuex';
|
||||||
import Modal from '@/components/Modal.vue';
|
import Modal from '@/components/Modal.vue';
|
||||||
import { userPlaylist } from '@/api/user';
|
import { userPlaylist } from '@/api/user';
|
||||||
import { addOrRemoveTrackFromPlaylist } from '@/api/playlist';
|
import { addOrRemoveTrackFromPlaylist } from '@/api/playlist';
|
||||||
|
import { disableScrolling, enableScrolling } from '@/utils/ui';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalAddTrackToPlaylist',
|
name: 'ModalAddTrackToPlaylist',
|
||||||
|
|
@ -55,6 +56,11 @@ export default {
|
||||||
key: 'show',
|
key: 'show',
|
||||||
value,
|
value,
|
||||||
});
|
});
|
||||||
|
if (value) {
|
||||||
|
disableScrolling();
|
||||||
|
} else {
|
||||||
|
enableScrolling();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ownPlaylists() {
|
ownPlaylists() {
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
import Modal from '@/components/Modal.vue';
|
import Modal from '@/components/Modal.vue';
|
||||||
import { mapMutations, mapState } from 'vuex';
|
import { mapMutations, mapState } from 'vuex';
|
||||||
import { createPlaylist, addOrRemoveTrackFromPlaylist } from '@/api/playlist';
|
import { createPlaylist, addOrRemoveTrackFromPlaylist } from '@/api/playlist';
|
||||||
|
import { disableScrolling, enableScrolling } from '@/utils/ui';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalNewPlaylist',
|
name: 'ModalNewPlaylist',
|
||||||
|
|
@ -56,6 +57,11 @@ export default {
|
||||||
key: 'show',
|
key: 'show',
|
||||||
value,
|
value,
|
||||||
});
|
});
|
||||||
|
if (value) {
|
||||||
|
disableScrolling();
|
||||||
|
} else {
|
||||||
|
enableScrolling();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ export function ipcRenderer(vueInstance) {
|
||||||
|
|
||||||
ipcRenderer.on('changeRouteTo', (event, path) => {
|
ipcRenderer.on('changeRouteTo', (event, path) => {
|
||||||
self.$router.push(path);
|
self.$router.push(path);
|
||||||
|
if (store.state.showLyrics) {
|
||||||
|
store.commit('toggleLyrics');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcRenderer.on('search', () => {
|
ipcRenderer.on('search', () => {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
>,
|
>,
|
||||||
{{ albumTime | formatTime('Human') }}
|
{{ albumTime | formatTime('Human') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="description" @click="showFullDescription = true">
|
<div class="description" @click="toggleFullDescription">
|
||||||
{{ album.description }}
|
{{ album.description }}
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons" style="margin-top: 32px">
|
<div class="buttons" style="margin-top: 32px">
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
</div>
|
</div>
|
||||||
<Modal
|
<Modal
|
||||||
:show="showFullDescription"
|
:show="showFullDescription"
|
||||||
:close="() => (showFullDescription = false)"
|
:close="toggleFullDescription"
|
||||||
:show-footer="false"
|
:show-footer="false"
|
||||||
:click-outside-hide="true"
|
:click-outside-hide="true"
|
||||||
title="专辑介绍"
|
title="专辑介绍"
|
||||||
|
|
@ -131,6 +131,7 @@ import { getAlbum, albumDynamicDetail, likeAAlbum } from '@/api/album';
|
||||||
import { splitSoundtrackAlbumTitle, splitAlbumTitle } from '@/utils/common';
|
import { splitSoundtrackAlbumTitle, splitAlbumTitle } from '@/utils/common';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import { isAccountLoggedIn } from '@/utils/auth';
|
import { isAccountLoggedIn } from '@/utils/auth';
|
||||||
|
import { disableScrolling, enableScrolling } from '@/utils/ui';
|
||||||
|
|
||||||
import ExplicitSymbol from '@/components/ExplicitSymbol.vue';
|
import ExplicitSymbol from '@/components/ExplicitSymbol.vue';
|
||||||
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
|
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
|
||||||
|
|
@ -270,6 +271,14 @@ export default {
|
||||||
openMenu(e) {
|
openMenu(e) {
|
||||||
this.$refs.albumMenu.openMenu(e);
|
this.$refs.albumMenu.openMenu(e);
|
||||||
},
|
},
|
||||||
|
toggleFullDescription() {
|
||||||
|
this.showFullDescription = !this.showFullDescription;
|
||||||
|
if (this.showFullDescription) {
|
||||||
|
disableScrolling();
|
||||||
|
} else {
|
||||||
|
enableScrolling();
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -124,12 +124,8 @@
|
||||||
<ContextMenu ref="playlistTabMenu">
|
<ContextMenu ref="playlistTabMenu">
|
||||||
<div class="item" @click="changePlaylistFilter('all')"> 全部歌单 </div>
|
<div class="item" @click="changePlaylistFilter('all')"> 全部歌单 </div>
|
||||||
<hr />
|
<hr />
|
||||||
<div class="item" @click="changePlaylistFilter('mine')">
|
<div class="item" @click="changePlaylistFilter('mine')"> 创建的歌单 </div>
|
||||||
我创建的歌单
|
<div class="item" @click="changePlaylistFilter('liked')">收藏的歌单 </div>
|
||||||
</div>
|
|
||||||
<div class="item" @click="changePlaylistFilter('liked')">
|
|
||||||
收藏的歌单
|
|
||||||
</div>
|
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
{{ playlist.updateTime | formatDate }} · {{ playlist.trackCount }}
|
{{ playlist.updateTime | formatDate }} · {{ playlist.trackCount }}
|
||||||
{{ $t('common.songs') }}
|
{{ $t('common.songs') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="description" @click="showFullDescription = true">
|
<div class="description" @click="toggleFullDescription">
|
||||||
{{ playlist.description }}
|
{{ playlist.description }}
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
|
|
@ -160,7 +160,7 @@
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
:show="showFullDescription"
|
:show="showFullDescription"
|
||||||
:close="() => (showFullDescription = false)"
|
:close="toggleFullDescription"
|
||||||
:show-footer="false"
|
:show-footer="false"
|
||||||
:click-outside-hide="true"
|
:click-outside-hide="true"
|
||||||
title="歌单介绍"
|
title="歌单介绍"
|
||||||
|
|
@ -200,6 +200,7 @@ import {
|
||||||
import { getTrackDetail } from '@/api/track';
|
import { getTrackDetail } from '@/api/track';
|
||||||
import { isAccountLoggedIn } from '@/utils/auth';
|
import { isAccountLoggedIn } from '@/utils/auth';
|
||||||
import nativeAlert from '@/utils/nativeAlert';
|
import nativeAlert from '@/utils/nativeAlert';
|
||||||
|
import { disableScrolling, enableScrolling } from '@/utils/ui';
|
||||||
|
|
||||||
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
|
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
|
||||||
import ContextMenu from '@/components/ContextMenu.vue';
|
import ContextMenu from '@/components/ContextMenu.vue';
|
||||||
|
|
@ -508,6 +509,14 @@ export default {
|
||||||
this.searchKeyWords = this.inputSearchKeyWords;
|
this.searchKeyWords = this.inputSearchKeyWords;
|
||||||
}, 600);
|
}, 600);
|
||||||
},
|
},
|
||||||
|
toggleFullDescription() {
|
||||||
|
this.showFullDescription = !this.showFullDescription;
|
||||||
|
if (this.showFullDescription) {
|
||||||
|
disableScrolling();
|
||||||
|
} else {
|
||||||
|
enableScrolling();
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -397,7 +397,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex';
|
import { mapState, mapActions } from 'vuex';
|
||||||
import { isLooseLoggedIn, doLogout } from '@/utils/auth';
|
import { isLooseLoggedIn, doLogout } from '@/utils/auth';
|
||||||
import { auth as lastfmAuth } from '@/api/lastfm';
|
import { auth as lastfmAuth } from '@/api/lastfm';
|
||||||
import { changeAppearance, bytesToSize } from '@/utils/common';
|
import { changeAppearance, bytesToSize } from '@/utils/common';
|
||||||
|
|
@ -485,17 +485,16 @@ export default {
|
||||||
},
|
},
|
||||||
outputDevice: {
|
outputDevice: {
|
||||||
get() {
|
get() {
|
||||||
// if (this.withoutAudioPrivilege === true) this.getAllOutputDevices();
|
if (this.withoutAudioPrivilege === true) this.getAllOutputDevices();
|
||||||
// const isValidDevice = this.allOutputDevices.find(
|
const isValidDevice = this.allOutputDevices.find(
|
||||||
// device => device.deviceId === this.settings.outputDevice
|
device => device.deviceId === this.settings.outputDevice
|
||||||
// );
|
);
|
||||||
// if (
|
if (
|
||||||
// this.settings.outputDevice === undefined ||
|
this.settings.outputDevice === undefined ||
|
||||||
// isValidDevice === undefined
|
isValidDevice === undefined
|
||||||
// )
|
)
|
||||||
// return 'default'; // Default deviceId
|
return 'default'; // Default deviceId
|
||||||
// return this.settings.outputDevice;
|
return this.settings.outputDevice;
|
||||||
return 'default'; // Default deviceId
|
|
||||||
},
|
},
|
||||||
set(deviceId) {
|
set(deviceId) {
|
||||||
if (deviceId === this.settings.outputDevice || deviceId === undefined)
|
if (deviceId === this.settings.outputDevice || deviceId === undefined)
|
||||||
|
|
@ -640,6 +639,7 @@ export default {
|
||||||
config.protocol = value;
|
config.protocol = value;
|
||||||
if (value === 'noProxy') {
|
if (value === 'noProxy') {
|
||||||
ipcRenderer.send('removeProxy');
|
ipcRenderer.send('removeProxy');
|
||||||
|
this.showToast('已关闭代理');
|
||||||
}
|
}
|
||||||
this.$store.commit('updateSettings', {
|
this.$store.commit('updateSettings', {
|
||||||
key: 'proxyConfig',
|
key: 'proxyConfig',
|
||||||
|
|
@ -684,6 +684,7 @@ export default {
|
||||||
this.countDBSize('tracks');
|
this.countDBSize('tracks');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(['showToast']),
|
||||||
getAllOutputDevices() {
|
getAllOutputDevices() {
|
||||||
navigator.mediaDevices.enumerateDevices().then(devices => {
|
navigator.mediaDevices.enumerateDevices().then(devices => {
|
||||||
this.allOutputDevices = devices.filter(device => {
|
this.allOutputDevices = devices.filter(device => {
|
||||||
|
|
@ -752,6 +753,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
ipcRenderer.send('setProxy', config);
|
ipcRenderer.send('setProxy', config);
|
||||||
}
|
}
|
||||||
|
this.showToast('已更新代理设置');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -865,7 +867,7 @@ h3 {
|
||||||
.title {
|
.title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
opacity: 0.68;
|
opacity: 0.78;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue