added open artwork in browser
This commit is contained in:
parent
02ba9a7c42
commit
cbe76cc19d
2 changed files with 24 additions and 1 deletions
|
@ -421,6 +421,16 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
app.routeView(item)
|
app.routeView(item)
|
||||||
},
|
},
|
||||||
|
saveFile(fileName,urlFile){
|
||||||
|
let a = document.createElement("a");
|
||||||
|
a.style = "display: none";
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.href = urlFile;
|
||||||
|
a.download = fileName;
|
||||||
|
a.click();
|
||||||
|
window.URL.revokeObjectURL(url);
|
||||||
|
a.remove();
|
||||||
|
},
|
||||||
async showMenuPanel(data, event) {
|
async showMenuPanel(data, event) {
|
||||||
app.menuPanel.visible = true;
|
app.menuPanel.visible = true;
|
||||||
app.menuPanel.content.name = data.name ?? "";
|
app.menuPanel.content.name = data.name ?? "";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script type="text/x-template" id="mediaitem-artwork">
|
<script type="text/x-template" id="mediaitem-artwork">
|
||||||
<div class="mediaitem-artwork" :class="[{'rounded': (type == 'artists')}, classes]" :key="url">
|
<div class="mediaitem-artwork" @contextmenu="contextMenu" :class="[{'rounded': (type == 'artists')}, classes]" :key="url">
|
||||||
<img :src="app.getMediaItemArtwork(url, size, width)"
|
<img :src="app.getMediaItemArtwork(url, size, width)"
|
||||||
decoding="async"
|
decoding="async"
|
||||||
:style="{background: bgcolor}"
|
:style="{background: bgcolor}"
|
||||||
|
@ -61,6 +61,19 @@
|
||||||
this.getClasses()
|
this.getClasses()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
contextMenu(event) {
|
||||||
|
let self = this
|
||||||
|
app.showMenuPanel({
|
||||||
|
items: {
|
||||||
|
"save": {
|
||||||
|
name: "Open artwork in browser",
|
||||||
|
action: () => {
|
||||||
|
window.open(app.getMediaItemArtwork(self.url, 1024, 1024))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, event)
|
||||||
|
},
|
||||||
getVideoPriority() {
|
getVideoPriority() {
|
||||||
if(app.cfg.visual.animated_artwork == "always") {
|
if(app.cfg.visual.animated_artwork == "always") {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue