Add files via upload
This commit is contained in:
parent
382b8bcfb8
commit
cd0a32afc5
@ -137,8 +137,8 @@
|
||||
>
|
||||
<i class="material-icons">chevron_right</i>
|
||||
</button>
|
||||
<link rel="prefetch" :href="rawP">
|
||||
<link rel="prefetch" :href="rawN">
|
||||
<link rel="prefetch" :href="previousRaw">
|
||||
<link rel="prefetch" :href="nextRaw">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -173,10 +173,8 @@ export default {
|
||||
navTimeout: null,
|
||||
hoverNav: false,
|
||||
autoPlay: false,
|
||||
routeDataP: "",
|
||||
routeDataN: "",
|
||||
rawP: "",
|
||||
rawN: "",
|
||||
previousRaw: "",
|
||||
nextRaw: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -307,31 +305,14 @@ export default {
|
||||
for (let j = i - 1; j >= 0; j--) {
|
||||
if (mediaTypes.includes(this.listing[j].type)) {
|
||||
this.previousLink = this.listing[j].url;
|
||||
const key = Date.parse(this.listing[j].modified);
|
||||
if (this.listing[j].type === "image" && !this.fullSize) {
|
||||
this.routeDataP = `${baseURL}/api/preview/big${this.previousLink.slice(6)}?k=${key}`;
|
||||
} else if (this.listing[j].type === "image" ) {
|
||||
this.routeDataP = `${baseURL}/api/raw${this.previousLink.slice(6)}?k=${key}`;
|
||||
} else {
|
||||
this.routeDataP = "";
|
||||
}
|
||||
this.rawP=`${this.routeDataP}&inline=true`;
|
||||
this.previousRaw=`${this.prefetchUrl(this.listing[j],this.previousLink)}&inline=true`;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (let j = i + 1; j < this.listing.length; j++) {
|
||||
if (mediaTypes.includes(this.listing[j].type)) {
|
||||
this.nextLink = this.listing[j].url;
|
||||
const key = Date.parse(this.listing[j].modified);
|
||||
if (this.listing[j].type === "image" && !this.fullSize) {
|
||||
this.routeDataN = `${baseURL}/api/preview/big${this.nextLink.slice(6)}?k=${key}`;
|
||||
} else if (this.listing[j].type === "image" ) {
|
||||
this.routeDataN = `${baseURL}/api/raw${this.nextLink.slice(6)}?k=${key}`;
|
||||
} else {
|
||||
this.routeDataN = "";
|
||||
}
|
||||
this.rawN=`${this.routeDataN}&inline=true`;
|
||||
this.nextRaw=`${this.prefetchUrl(this.listing[j],this.nextLink)}&inline=true`;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -339,6 +320,14 @@ export default {
|
||||
return;
|
||||
}
|
||||
},
|
||||
prefetchUrl: function(item,link) {
|
||||
const key = Date.parse(item.modified);
|
||||
if (item.type === "image" && !this.fullSize) {
|
||||
return `${baseURL}/api/preview/big${link.slice(6)}?k=${key}`;
|
||||
} else {
|
||||
return `${baseURL}/api/raw${link.slice(6)}?k=${key}`;
|
||||
}
|
||||
},
|
||||
openMore() {
|
||||
this.$store.commit("showHover", "more");
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user