mirror of
https://github.com/filecoin-project/slate.git
synced 2024-09-11 22:07:08 +03:00
Merge branch 'main' into @aminejv/activity
This commit is contained in:
commit
671a230c89
@ -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} />
|
||||
|
@ -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} />
|
||||
|
@ -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 });
|
||||
|
Loading…
Reference in New Issue
Block a user