Compare commits

..

No commits in common. "fcb248a5feb7b7404ca5923aae17f6d3f8d3cc96" and "b28952cb2582bd4eb44e91d0676e2803c458cf31" have entirely different histories.

3 changed files with 21 additions and 23 deletions

View File

@ -195,6 +195,10 @@ html[dir="rtl"] #listing {
align-items: center; align-items: center;
} }
#listing.list .item p.name:not(#listing.list .item.header .name) {
margin-right: -3em;
}
#listing.list .item .name { #listing.list .item .name {
width: 50%; width: 50%;
} }
@ -223,18 +227,18 @@ html[dir="rtl"] #listing {
border-bottom: 1px solid var(--borderPrimary); border-bottom: 1px solid var(--borderPrimary);
} }
#listing.list .item.header > div { #listing.list .item.header > div:first-child {
width: 100%; width: 0;
}
#listing.list .item.header .name {
margin-right: 3em;
} }
#listing.list .header a { #listing.list .header a {
color: inherit; color: inherit;
} }
#listing.list .item.header > div:first-child {
width: 0;
}
#listing.list .name { #listing.list .name {
font-weight: normal; font-weight: normal;
word-wrap: break-word; word-wrap: break-word;

View File

@ -162,6 +162,7 @@
> >
<div> <div>
<div class="item header"> <div class="item header">
<div></div>
<div> <div>
<p <p
:class="{ active: nameSorted }" :class="{ active: nameSorted }"

View File

@ -60,7 +60,7 @@
<div v-if="isEpub" class="epub-reader"> <div v-if="isEpub" class="epub-reader">
<vue-reader <vue-reader
:location="location" :location="location"
:url="previewUrl" :url="raw"
:get-rendition="getRendition" :get-rendition="getRendition"
:epubInitOptions="{ :epubInitOptions="{
requestCredentials: true, requestCredentials: true,
@ -87,14 +87,11 @@
<span>{{ size }}%</span> <span>{{ size }}%</span>
</div> </div>
</div> </div>
<ExtendedImage <ExtendedImage v-else-if="fileStore.req?.type == 'image'" :src="raw" />
v-else-if="fileStore.req?.type == 'image'"
:src="previewUrl"
/>
<audio <audio
v-else-if="fileStore.req?.type == 'audio'" v-else-if="fileStore.req?.type == 'audio'"
ref="player" ref="player"
:src="previewUrl" :src="raw"
controls controls
:autoplay="autoPlay" :autoplay="autoPlay"
@play="autoPlay = true" @play="autoPlay = true"
@ -102,12 +99,12 @@
<VideoPlayer <VideoPlayer
v-else-if="fileStore.req?.type == 'video'" v-else-if="fileStore.req?.type == 'video'"
ref="player" ref="player"
:source="previewUrl" :source="raw"
:subtitles="subtitles" :subtitles="subtitles"
:options="videoOptions" :options="videoOptions"
> >
</VideoPlayer> </VideoPlayer>
<object v-else-if="isPdf" class="pdf" :data="previewUrl"></object> <object v-else-if="isPdf" class="pdf" :data="raw"></object>
<div v-else-if="fileStore.req?.type == 'blob'" class="info"> <div v-else-if="fileStore.req?.type == 'blob'" class="info">
<div class="title"> <div class="title">
<i class="material-icons">feedback</i> <i class="material-icons">feedback</i>
@ -122,7 +119,7 @@
</a> </a>
<a <a
target="_blank" target="_blank"
:href="previewUrl" :href="raw"
class="button button--flat" class="button button--flat"
v-if="!fileStore.req?.isDir" v-if="!fileStore.req?.isDir"
> >
@ -259,20 +256,16 @@ const downloadUrl = computed(() =>
fileStore.req ? api.getDownloadURL(fileStore.req, false) : "" fileStore.req ? api.getDownloadURL(fileStore.req, false) : ""
); );
const previewUrl = computed(() => { const raw = computed(() => {
if (!fileStore.req) { if (fileStore.req?.type === "image" && !fullSize.value) {
return "";
}
if (fileStore.req.type === "image" && !fullSize.value) {
return api.getPreviewURL(fileStore.req, "big"); return api.getPreviewURL(fileStore.req, "big");
} }
if (isEpub.value) { if (isEpub.value) {
return createURL("api/raw" + fileStore.req.path, {}); return createURL("api/raw" + fileStore.req?.path, {});
} }
return api.getDownloadURL(fileStore.req, true); return downloadUrl.value;
}); });
const isPdf = computed(() => fileStore.req?.extension.toLowerCase() == ".pdf"); const isPdf = computed(() => fileStore.req?.extension.toLowerCase() == ".pdf");