mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: Add "Open in Browser" context menu item to artist and album page (#1096)
This commit is contained in:
parent
16c3613267
commit
5c6eaa8fda
5 changed files with 19 additions and 2 deletions
|
|
@ -137,6 +137,9 @@
|
|||
<div class="item" @click="copyUrl(album.id)">{{
|
||||
$t('contextMenu.copyUrl')
|
||||
}}</div>
|
||||
<div class="item" @click="openInBrowser(album.id)">{{
|
||||
$t('contextMenu.openInBrowser')
|
||||
}}</div>
|
||||
</ContextMenu>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -305,7 +308,7 @@ export default {
|
|||
},
|
||||
copyUrl(id) {
|
||||
let showToast = this.showToast;
|
||||
this.$copyText('https://music.163.com/#/album?id=' + id)
|
||||
this.$copyText(`https://music.163.com/#/album?id=${id}`)
|
||||
.then(function () {
|
||||
showToast(locale.t('toast.copied'));
|
||||
})
|
||||
|
|
@ -313,6 +316,10 @@ export default {
|
|||
showToast(`${locale.t('toast.copyFailed')}${error}`);
|
||||
});
|
||||
},
|
||||
openInBrowser(id) {
|
||||
const url = `https://music.163.com/#/album?id=${id}`;
|
||||
window.open(url);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue