|
|
@ -186,9 +186,13 @@
|
|
|
|
<ContextMenu ref="playlistMenu">
|
|
|
|
<ContextMenu ref="playlistMenu">
|
|
|
|
<!-- <div class="item">{{ $t('contextMenu.addToQueue') }}</div> -->
|
|
|
|
<!-- <div class="item">{{ $t('contextMenu.addToQueue') }}</div> -->
|
|
|
|
<div class="item" @click="likePlaylist(true)">{{
|
|
|
|
<div class="item" @click="likePlaylist(true)">{{
|
|
|
|
playlist.subscribed ? '从音乐库删除' : '保存到音乐库'
|
|
|
|
playlist.subscribed
|
|
|
|
|
|
|
|
? $t('contextMenu.removeFromLibrary')
|
|
|
|
|
|
|
|
: $t('contextMenu.saveToLibrary')
|
|
|
|
|
|
|
|
}}</div>
|
|
|
|
|
|
|
|
<div class="item" @click="searchInPlaylist()">{{
|
|
|
|
|
|
|
|
$t('contextMenu.searchInPlaylist')
|
|
|
|
}}</div>
|
|
|
|
}}</div>
|
|
|
|
<div class="item" @click="searchInPlaylist()">歌单内搜索</div>
|
|
|
|
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
v-if="playlist.creator.userId === data.user.userId"
|
|
|
|
v-if="playlist.creator.userId === data.user.userId"
|
|
|
|
class="item"
|
|
|
|
class="item"
|
|
|
@ -216,6 +220,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 locale from '@/locale';
|
|
|
|
import { disableScrolling, enableScrolling } from '@/utils/ui';
|
|
|
|
import { disableScrolling, enableScrolling } from '@/utils/ui';
|
|
|
|
|
|
|
|
|
|
|
|
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
|
|
|
|
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
|
|
|
@ -409,7 +414,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
likePlaylist(toast = false) {
|
|
|
|
likePlaylist(toast = false) {
|
|
|
|
if (!isAccountLoggedIn()) {
|
|
|
|
if (!isAccountLoggedIn()) {
|
|
|
|
this.showToast('此操作需要登录网易云账号');
|
|
|
|
this.showToast(locale.t('toast.needToLogin'));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
subscribePlaylist({
|
|
|
|
subscribePlaylist({
|
|
|
@ -486,7 +491,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
deletePlaylist() {
|
|
|
|
deletePlaylist() {
|
|
|
|
if (!isAccountLoggedIn()) {
|
|
|
|
if (!isAccountLoggedIn()) {
|
|
|
|
this.showToast('此操作需要登录网易云账号');
|
|
|
|
this.showToast(locale.t('toast.needToLogin'));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let confirmation = confirm(`确定要删除歌单 ${this.playlist.name}?`);
|
|
|
|
let confirmation = confirm(`确定要删除歌单 ${this.playlist.name}?`);
|
|
|
@ -517,7 +522,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
removeTrack(trackID) {
|
|
|
|
removeTrack(trackID) {
|
|
|
|
if (!isAccountLoggedIn()) {
|
|
|
|
if (!isAccountLoggedIn()) {
|
|
|
|
this.showToast('此操作需要登录网易云账号');
|
|
|
|
this.showToast(locale.t('toast.needToLogin'));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.tracks = this.tracks.filter(t => t.id !== trackID);
|
|
|
|
this.tracks = this.tracks.filter(t => t.id !== trackID);
|
|
|
|