master
qier222 4 years ago
parent 9ccce5b468
commit f1e3d8ebf0
No known key found for this signature in database
GPG Key ID: 9C85007ED905F14D

@ -32,6 +32,7 @@ import { mapActions, mapMutations, mapState } from 'vuex';
import Modal from '@/components/Modal.vue';
import { userPlaylist } from '@/api/user';
import { addOrRemoveTrackFromPlaylist } from '@/api/playlist';
import { disableScrolling, enableScrolling } from '@/utils/ui';
export default {
name: 'ModalAddTrackToPlaylist',
@ -55,6 +56,11 @@ export default {
key: 'show',
value,
});
if (value) {
disableScrolling();
} else {
enableScrolling();
}
},
},
ownPlaylists() {

@ -32,6 +32,7 @@
import Modal from '@/components/Modal.vue';
import { mapMutations, mapState } from 'vuex';
import { createPlaylist, addOrRemoveTrackFromPlaylist } from '@/api/playlist';
import { disableScrolling, enableScrolling } from '@/utils/ui';
export default {
name: 'ModalNewPlaylist',
@ -56,6 +57,11 @@ export default {
key: 'show',
value,
});
if (value) {
disableScrolling();
} else {
enableScrolling();
}
},
},
},

@ -20,6 +20,9 @@ export function ipcRenderer(vueInstance) {
ipcRenderer.on('changeRouteTo', (event, path) => {
self.$router.push(path);
if (store.state.showLyrics) {
store.commit('toggleLyrics');
}
});
ipcRenderer.on('search', () => {

@ -38,7 +38,7 @@
>,
{{ albumTime | formatTime('Human') }}
</div>
<div class="description" @click="showFullDescription = true">
<div class="description" @click="toggleFullDescription">
{{ album.description }}
</div>
<div class="buttons" style="margin-top: 32px">
@ -104,7 +104,7 @@
</div>
<Modal
:show="showFullDescription"
:close="() => (showFullDescription = false)"
:close="toggleFullDescription"
:show-footer="false"
:click-outside-hide="true"
title="专辑介绍"
@ -131,6 +131,7 @@ import { getAlbum, albumDynamicDetail, likeAAlbum } from '@/api/album';
import { splitSoundtrackAlbumTitle, splitAlbumTitle } from '@/utils/common';
import NProgress from 'nprogress';
import { isAccountLoggedIn } from '@/utils/auth';
import { disableScrolling, enableScrolling } from '@/utils/ui';
import ExplicitSymbol from '@/components/ExplicitSymbol.vue';
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
@ -270,6 +271,14 @@ export default {
openMenu(e) {
this.$refs.albumMenu.openMenu(e);
},
toggleFullDescription() {
this.showFullDescription = !this.showFullDescription;
if (this.showFullDescription) {
disableScrolling();
} else {
enableScrolling();
}
},
},
};
</script>

@ -124,12 +124,8 @@
<ContextMenu ref="playlistTabMenu">
<div class="item" @click="changePlaylistFilter('all')"> </div>
<hr />
<div class="item" @click="changePlaylistFilter('mine')">
我创建的歌单
</div>
<div class="item" @click="changePlaylistFilter('liked')">
收藏的歌单
</div>
<div class="item" @click="changePlaylistFilter('mine')"> </div>
<div class="item" @click="changePlaylistFilter('liked')"> </div>
</ContextMenu>
</div>
</template>

@ -49,7 +49,7 @@
{{ playlist.updateTime | formatDate }} · {{ playlist.trackCount }}
{{ $t('common.songs') }}
</div>
<div class="description" @click="showFullDescription = true">
<div class="description" @click="toggleFullDescription">
{{ playlist.description }}
</div>
<div class="buttons">
@ -160,7 +160,7 @@
<Modal
:show="showFullDescription"
:close="() => (showFullDescription = false)"
:close="toggleFullDescription"
:show-footer="false"
:click-outside-hide="true"
title="歌单介绍"
@ -200,6 +200,7 @@ import {
import { getTrackDetail } from '@/api/track';
import { isAccountLoggedIn } from '@/utils/auth';
import nativeAlert from '@/utils/nativeAlert';
import { disableScrolling, enableScrolling } from '@/utils/ui';
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
import ContextMenu from '@/components/ContextMenu.vue';
@ -508,6 +509,14 @@ export default {
this.searchKeyWords = this.inputSearchKeyWords;
}, 600);
},
toggleFullDescription() {
this.showFullDescription = !this.showFullDescription;
if (this.showFullDescription) {
disableScrolling();
} else {
enableScrolling();
}
},
},
};
</script>

@ -397,7 +397,7 @@
</template>
<script>
import { mapState } from 'vuex';
import { mapState, mapActions } from 'vuex';
import { isLooseLoggedIn, doLogout } from '@/utils/auth';
import { auth as lastfmAuth } from '@/api/lastfm';
import { changeAppearance, bytesToSize } from '@/utils/common';
@ -485,17 +485,16 @@ export default {
},
outputDevice: {
get() {
// if (this.withoutAudioPrivilege === true) this.getAllOutputDevices();
// const isValidDevice = this.allOutputDevices.find(
// device => device.deviceId === this.settings.outputDevice
// );
// if (
// this.settings.outputDevice === undefined ||
// isValidDevice === undefined
// )
// return 'default'; // Default deviceId
// return this.settings.outputDevice;
if (this.withoutAudioPrivilege === true) this.getAllOutputDevices();
const isValidDevice = this.allOutputDevices.find(
device => device.deviceId === this.settings.outputDevice
);
if (
this.settings.outputDevice === undefined ||
isValidDevice === undefined
)
return 'default'; // Default deviceId
return this.settings.outputDevice;
},
set(deviceId) {
if (deviceId === this.settings.outputDevice || deviceId === undefined)
@ -640,6 +639,7 @@ export default {
config.protocol = value;
if (value === 'noProxy') {
ipcRenderer.send('removeProxy');
this.showToast('已关闭代理');
}
this.$store.commit('updateSettings', {
key: 'proxyConfig',
@ -684,6 +684,7 @@ export default {
this.countDBSize('tracks');
},
methods: {
...mapActions(['showToast']),
getAllOutputDevices() {
navigator.mediaDevices.enumerateDevices().then(devices => {
this.allOutputDevices = devices.filter(device => {
@ -752,6 +753,7 @@ export default {
} else {
ipcRenderer.send('setProxy', config);
}
this.showToast('已更新代理设置');
},
},
};
@ -865,7 +867,7 @@ h3 {
.title {
font-size: 16px;
font-weight: 500;
opacity: 0.68;
opacity: 0.78;
}
}

Loading…
Cancel
Save