Commit d55fb402 authored by Andreas Heimann's avatar Andreas Heimann

added "open in client" for local item and "open on spinshare" for songitem

parent 997f5633
......@@ -58,8 +58,9 @@
x: e.pageX,
y: e.pageY,
items: [
{ icon: "eye", title: this.$t('contextmenu.open'), method: () => { this.$router.push({ name: 'SongDetail', params: { id: this.$props.id } }) } },
{ icon: "link", title: this.$t('contextmenu.copyLink'), method: () => { clipboard.writeText('https://spinsha.re/song/' + this.$props.id) } },
{ icon: "eye", title: this.$t('contextmenu.open'), method: () => { this.$router.push({ name: 'SongDetail', params: { id: this.$props.id } }); } },
{ icon: "earth", title: this.$t('contextmenu.openOnSpinShare'), method: () => { shell.openExternal("https://spinsha.re/report/song/" + this.$props.id); } },
{ icon: "link", title: this.$t('contextmenu.copyLink'), method: () => { clipboard.writeText('https://spinsha.re/song/' + this.$props.id); } },
{ icon: "download", title: this.$t('contextmenu.download'), method: () => { this.download(); } }
]});
},
......
......@@ -44,7 +44,8 @@
let items = [];
if(this.isSpinShare) {
items.push({ icon: "open-in-app", title: this.$t('contextmenu.openOnSpinShare'), method: () => { this.openOnSpinShare(); } });
items.push({ icon: "eye", title: this.$t('contextmenu.open'), method: () => { this.openInClient(); } });
items.push({ icon: "earth", title: this.$t('contextmenu.openOnSpinShare'), method: () => { this.openOnSpinShare(); } });
}
items.push({ icon: "folder-outline", title: this.$t('contextmenu.openInExplorer'), method: () => { this.openInExplorer(); } });
......@@ -56,23 +57,30 @@
items: items
});
},
openOnSpinShare: function() {
openInClient: function() {
if(this.isSpinShare) {
if(this.isSpinShare.includes("spinshare_")) {
this.$router.push({ name: 'SongDetailReviews', params: { id: this.isSpinShare } });
}
}
},
openOnSpinShare: function() {
if(this.isSpinShare) {
if(this.isSpinShare.includes("spinshare_")) {
shell.openExternal("https://spinsha.re/report/song/" + this.isSpinShare);
}
}
},
openInExplorer: function() {
shell.showItemInFolder(path.normalize(this.file));
},
visibilityChanged (isVisible, entry) {
if (isVisible) {
this.$data.backgroundImage = "url(" + this.$props.cover + ")"
this.$data.backgroundImage = "url(" + this.$props.cover + ")";
}
//url(" + require('@/assets/img/defaultAlbumArt.jpg') + ");
else {
this.$data.backgroundImage = "none;"
this.$data.backgroundImage = "none;";
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment