dev
truthhun 1 year ago
parent ace7f48e4d
commit 16431273d0

@ -46,6 +46,7 @@ message Document {
string ext = 28;
Attachment attachment = 30;
User user = 31;
bool enable_gzip = 32;
}
message DeleteDocumentRequest { repeated int64 id = 1; }

@ -390,9 +390,12 @@ export default {
//
const pages = []
for (let i = 1; i <= preview; i++) {
const src = doc.enable_gzip
? `/view/page/${doc.attachment.hash}/${i}.gzip.svg`
: `/view/page/${doc.attachment.hash}/${i}.svg`
pages.push({
lazySrc: `/view/page/${doc.attachment.hash}/${i}.gzip.svg`,
src: `/view/page/${doc.attachment.hash}/${i}.gzip.svg`,
lazySrc: src,
src: src,
alt: `${doc.title}${i + 1}`,
})
}
@ -634,7 +637,9 @@ export default {
if (document.fullscreenElement) startLazyLoad = 5
for (let i = this.pages.length + 1; i <= end; i++) {
j += 1
const src = `/view/page/${this.document.attachment.hash}/${i}.gzip.svg`
const src = doc.enable_gzip
? `/view/page/${this.document.attachment.hash}/${i}.gzip.svg`
: `/view/page/${this.document.attachment.hash}/${i}.svg`
this.pages.push({
//
src: j <= startLazyLoad ? src : this.loadingImage,

Loading…
Cancel
Save