Merge branch 'main' into @aminejv/activity

This commit is contained in:
martinalong 2021-08-02 19:02:57 -07:00 committed by GitHub
commit 671a230c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 17 deletions

View File

@ -19,6 +19,10 @@ export default class WebsitePrototypeWrapper extends React.Component {
<title>{this.props.title}</title>
<meta name="title" content={this.props.title} />
<meta name="description" content={this.props.description} />
<meta
name="google-site-verification"
content="INHmYWYLRrINvdmu9BXrXaJnphG0-wF5e2YGaDx2v7k"
/>
<meta property="og:type" content="website" />
<meta property="og:url" content={this.props.url} />

View File

@ -132,6 +132,10 @@ export default class SystemPage extends React.Component {
<title>{title}</title>
<meta name="title" content={title} />
<meta name="description" content={description} />
<meta
name="google-site-verification"
content="INHmYWYLRrINvdmu9BXrXaJnphG0-wF5e2YGaDx2v7k"
/>
<meta property="og:type" content="website" />
<meta property="og:url" content={url} />

View File

@ -177,24 +177,32 @@ export const getById = async ({ id }) => {
if (cids[each.cid]) {
continue;
}
if (each.data.type && each.data.type.startsWith("image/")) {
imageBytes += each.data.size;
} else if (each.data.type && each.data.type.startsWith("video/")) {
videoBytes += each.data.size;
} else if (each.data.type && each.data.type.startsWith("audio/")) {
audioBytes += each.data.size;
} else if (each.data.type && each.data.type.startsWith("application/epub")) {
epubBytes += each.data.size;
} else if (each.data.type && each.data.type.startsWith("application/pdf")) {
pdfBytes += each.data.size;
}
let { coverImage } = each.data;
if (coverImage && !cids[coverImage.cid]) {
imageBytes += coverImage.data.size;
cids[coverImage.cid] = true;
}
bytes += each.data.size;
cids[each.cid] = true;
let size = each.data.size;
if (typeof size === "number") {
bytes += size;
if (each.data.type && each.data.type.startsWith("image/")) {
imageBytes += size;
} else if (each.data.type && each.data.type.startsWith("video/")) {
videoBytes += size;
} else if (each.data.type && each.data.type.startsWith("audio/")) {
audioBytes += size;
} else if (each.data.type && each.data.type.startsWith("application/epub")) {
epubBytes += size;
} else if (each.data.type && each.data.type.startsWith("application/pdf")) {
pdfBytes += size;
}
}
let coverImage = each.data.coverImage;
if (coverImage && !cids[coverImage.cid]) {
cids[coverImage.cid] = true;
size = coverImage.data.size;
if (typeof size === "number") {
imageBytes += size;
}
}
}
const tags = Utilities.getUserTags({ library: user.library, slates });