mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-22 03:56:49 +03:00
feat(Constants): update ifps gateway to ipfs.io
This commit is contained in:
parent
4ae04243cc
commit
3359b9ad5b
@ -191,7 +191,7 @@ export const theme = {
|
||||
};
|
||||
|
||||
export const gateways = {
|
||||
ipfs: "https://slate.textile.io/ipfs",
|
||||
ipfs: "https://ipfs.io/ipfs",
|
||||
};
|
||||
|
||||
export const hostname = "https://slate.host";
|
||||
@ -234,8 +234,7 @@ export const grids = {
|
||||
},
|
||||
};
|
||||
|
||||
export const profileDefaultPicture =
|
||||
"https://slate.textile.io/ipfs/bafkreick3nscgixwfpq736forz7kzxvvhuej6kszevpsgmcubyhsx2pf7i";
|
||||
export const profileDefaultPicture = `${gateways.ipfs}/bafkreick3nscgixwfpq736forz7kzxvvhuej6kszevpsgmcubyhsx2pf7i`;
|
||||
|
||||
export const textile = {
|
||||
threadName: "buckets",
|
||||
|
@ -6,12 +6,12 @@ import { css } from "@emotion/react";
|
||||
export const injectGlobalStyles = () => css`
|
||||
@font-face {
|
||||
font-family: 'mono';
|
||||
src: url('https://slate.textile.io/ipfs/bafkreialkhtjtpwocdadbmra3o7mii47bzgl3k2v2ossrpvhk3qqsbqtza');
|
||||
src: url('${Constants.gateways.ipfs}/bafkreialkhtjtpwocdadbmra3o7mii47bzgl3k2v2ossrpvhk3qqsbqtza');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'mono-bold';
|
||||
src: url('https://slate.textile.io/ipfs/bafkreigaktonxehwl5bzah5ze4iruw272qybj22wpy32pgrcka3y4jvhc4');
|
||||
src: url('${Constants.gateways.ipfs}/bafkreigaktonxehwl5bzah5ze4iruw272qybj22wpy32pgrcka3y4jvhc4');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
@ -36,22 +36,22 @@ export const injectGlobalStyles = () => css`
|
||||
|
||||
@font-face {
|
||||
font-family: 'fira-code-regular';
|
||||
src: url('https://slate.textile.io/ipfs/bafkreibtxh3xdwh6rp2k2uhtjssialbm25girhsck7qks2psycnzwvmtke');
|
||||
src: url('${Constants.gateways.ipfs}/bafkreibtxh3xdwh6rp2k2uhtjssialbm25girhsck7qks2psycnzwvmtke');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'fira-code-bold';
|
||||
src: url('https://slate.textile.io/ipfs/bafkreidyich64vyb4nqzvn6uvfcgsbegafe7dqd2ks4wjtcg5jwte6aetm');
|
||||
src: url('${Constants.gateways.ipfs}/bafkreidyich64vyb4nqzvn6uvfcgsbegafe7dqd2ks4wjtcg5jwte6aetm');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'jet-brains-regular';
|
||||
src: url('https://slate.textile.io/ipfs/bafkreiabqv4534pnjhohcc2aclsgbp2twugldrlzg6wqdehajerrcwgu7e');
|
||||
src: url('${Constants.gateways.ipfs}/bafkreiabqv4534pnjhohcc2aclsgbp2twugldrlzg6wqdehajerrcwgu7e');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'jet-brains-bold';
|
||||
src: url('https://slate.textile.io/ipfs/bafkreiejfxvbejf4a56x5tdo6w3n2kkrynwniv65rkkmrozxujroq6v4am');
|
||||
src: url('${Constants.gateways.ipfs}/bafkreiejfxvbejf4a56x5tdo6w3n2kkrynwniv65rkkmrozxujroq6v4am');
|
||||
}
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
|
@ -1,5 +1,6 @@
|
||||
import * as React from "react";
|
||||
import * as System from "~/components/system";
|
||||
import * as Constants from "~/common/constants";
|
||||
|
||||
import CodeBlock from "~/components/system/CodeBlock";
|
||||
|
||||
@ -81,7 +82,7 @@ const EXAMPLE_RESPONSE = `
|
||||
{
|
||||
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
"cid": "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a",
|
||||
"url": "https://slate.textile.io/ipfs/cid-goes-here",
|
||||
"url": "${Constants.gateways.ipfs}/cid-goes-here",
|
||||
"name": "door.jpg",
|
||||
"size": 33676,
|
||||
"type": "image/jpeg",
|
||||
@ -98,7 +99,7 @@ const EXAMPLE_RESPONSE = `
|
||||
"user": {
|
||||
"username": "devexamples",
|
||||
"data": {
|
||||
"photo": "https://slate.textile.io/ipfs/cid-goes-here",
|
||||
"photo": "${Constants.gateways.ipfs}/cid-goes-here",
|
||||
"body": "A user of slate",
|
||||
"name": "Bob Smith"
|
||||
}
|
||||
@ -107,8 +108,8 @@ const EXAMPLE_RESPONSE = `
|
||||
|
||||
export default class APIDocsGet extends React.Component {
|
||||
render() {
|
||||
let APIKey = this.props.APIKey;
|
||||
let language = this.props.language;
|
||||
let { APIKey } = this.props;
|
||||
let { language } = this.props;
|
||||
|
||||
let code = {
|
||||
javascript: EXAMPLE_CODE_JS(APIKey),
|
||||
|
@ -1,5 +1,6 @@
|
||||
import * as React from "react";
|
||||
import * as System from "~/components/system";
|
||||
import * as Constants from "~/common/constants";
|
||||
|
||||
import CodeBlock from "~/components/system/CodeBlock";
|
||||
|
||||
@ -48,7 +49,7 @@ const EXAMPLE_RESPONSE = `
|
||||
objects: [
|
||||
{
|
||||
id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "${Constants.gateways.ipfs}/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||
filename: "door.jpg",
|
||||
ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
data: {
|
||||
@ -72,7 +73,7 @@ const EXAMPLE_RESPONSE = `
|
||||
library: [
|
||||
{
|
||||
id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "${Constants.gateways.ipfs}/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||
filename: "door.jpg",
|
||||
ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
data: {
|
||||
@ -84,7 +85,7 @@ const EXAMPLE_RESPONSE = `
|
||||
},
|
||||
],
|
||||
data: {
|
||||
photo: "https://slate.textile.io/ipfs/cid-goes-here",
|
||||
photo: "${Constants.gateways.ipfs}/cid-goes-here",
|
||||
body: "A user of slate",
|
||||
name: "Bob Smith",
|
||||
},
|
||||
@ -93,8 +94,8 @@ const EXAMPLE_RESPONSE = `
|
||||
|
||||
export default class APIDocsGet extends React.Component {
|
||||
render() {
|
||||
let APIKey = this.props.APIKey;
|
||||
let language = this.props.language;
|
||||
let { APIKey } = this.props;
|
||||
let { language } = this.props;
|
||||
|
||||
let code = {
|
||||
javascript: EXAMPLE_CODE_JS(APIKey),
|
||||
@ -109,20 +110,22 @@ export default class APIDocsGet extends React.Component {
|
||||
description="This API request returns your user data and collections. If the request body is omitted, the request will return only your public collections by default."
|
||||
/>
|
||||
<CodeBlock
|
||||
children={code}
|
||||
language={language}
|
||||
style={{ maxWidth: "820px" }}
|
||||
title="Get your data"
|
||||
multiLang="true"
|
||||
onLanguageChange={this.props.onLanguageChange}
|
||||
/>
|
||||
>
|
||||
{code}
|
||||
</CodeBlock>
|
||||
<br />
|
||||
<CodeBlock
|
||||
children={EXAMPLE_RESPONSE}
|
||||
style={{ maxWidth: "820px" }}
|
||||
language="javascript"
|
||||
title="Get your data response"
|
||||
/>
|
||||
>
|
||||
{EXAMPLE_RESPONSE}
|
||||
</CodeBlock>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import * as React from "react";
|
||||
import * as System from "~/components/system";
|
||||
import * as Constants from "~/common/constants";
|
||||
|
||||
import CodeBlock from "~/components/system/CodeBlock";
|
||||
|
||||
@ -48,7 +49,7 @@ const EXAMPLE_RESPONSE = `
|
||||
objects: [
|
||||
{
|
||||
id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "ipfs gateway/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||
filename: "door.jpg",
|
||||
ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
name: "Door",
|
||||
@ -68,7 +69,7 @@ const EXAMPLE_RESPONSE = `
|
||||
library: [
|
||||
{
|
||||
id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "ipfs gateway/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||
filename: "door.jpg",
|
||||
ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
name: "Door",
|
||||
@ -77,7 +78,7 @@ const EXAMPLE_RESPONSE = `
|
||||
blurhash: "U6BzILt700IADjWBx]oz00f6?bs:00Rj_Nt7",
|
||||
},
|
||||
],
|
||||
photo: "https://slate.textile.io/ipfs/cid-goes-here",
|
||||
photo: "${Constants.gateways.ipfs}/cid-goes-here",
|
||||
body: "A user of slate",
|
||||
name: "Bob Smith",
|
||||
},
|
||||
@ -86,8 +87,8 @@ const EXAMPLE_RESPONSE = `
|
||||
|
||||
export default class APIDocsGet extends React.Component {
|
||||
render() {
|
||||
let APIKey = this.props.APIKey;
|
||||
let language = this.props.language;
|
||||
let { APIKey } = this.props;
|
||||
let { language } = this.props;
|
||||
|
||||
let code = {
|
||||
javascript: EXAMPLE_CODE_JS(APIKey),
|
||||
@ -102,20 +103,22 @@ export default class APIDocsGet extends React.Component {
|
||||
description="This API request returns your user data and collections. If the request body is omitted, the request will return only your public collections by default."
|
||||
/>
|
||||
<CodeBlock
|
||||
children={code}
|
||||
language={language}
|
||||
style={{ maxWidth: "820px" }}
|
||||
title="Get your data"
|
||||
multiLang="true"
|
||||
onLanguageChange={this.props.onLanguageChange}
|
||||
/>
|
||||
>
|
||||
{code}
|
||||
</CodeBlock>
|
||||
<br />
|
||||
<CodeBlock
|
||||
children={EXAMPLE_RESPONSE}
|
||||
style={{ maxWidth: "820px" }}
|
||||
language="javascript"
|
||||
title="Get your data response"
|
||||
/>
|
||||
>
|
||||
{EXAMPLE_RESPONSE}
|
||||
</CodeBlock>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -2,19 +2,20 @@ import * as React from "react";
|
||||
import * as Utilities from "common/utilities";
|
||||
import * as System from "~/components/system";
|
||||
import * as Styles from "~/common/styles";
|
||||
import * as Constants from "~/common/constants";
|
||||
|
||||
import { css } from "@emotion/react";
|
||||
import { FullHeightLayout } from "~/components/system/components/FullHeightLayout";
|
||||
|
||||
const AUTH_BACKGROUNDS = [
|
||||
"https://slate.textile.io/ipfs/bafybeigostprfkuuvuqlehutki32fnvshm2dyy4abqotmlffsca4f7qs7a",
|
||||
"https://slate.textile.io/ipfs/bafybeicmokw3bl5six6u7eflbxcdblpgbx3fat24djrqg6n3hmbleidks4",
|
||||
"https://slate.textile.io/ipfs/bafybeibkttaavlkjxgtafqndyrbgvwqcng67zvd4v36w7fvpajwmdgmxcu",
|
||||
"https://slate.textile.io/ipfs/bafybeicpk7hkbeqdgbwkx3dltlz3akf3qbjpqgfphbnry4b6txnailtlpq",
|
||||
"https://slate.textile.io/ipfs/bafybeibb2xknh3iwwetrro73hw3xfzjgwbi4n4c63wqmwt5hvaloqnh33u",
|
||||
"https://slate.textile.io/ipfs/bafybeig4mij32vyda2jbh6zua3r2rkdpby6wtvninwgxvsejjdnls4wpc4",
|
||||
"https://slate.textile.io/ipfs/bafybeihmoycn4a6zafd2k3fjcadskrxwvri5cwhabatzbyzteouh3s7igi",
|
||||
"https://slate.textile.io/ipfs/bafybeigxssjsv3tmdhz4bj6vl2ca5c6rrhdkepw3mifvlllb7orpx5cfou",
|
||||
`${Constants.gateways.ipfs}/bafybeigostprfkuuvuqlehutki32fnvshm2dyy4abqotmlffsca4f7qs7a`,
|
||||
`${Constants.gateways.ipfs}/bafybeicmokw3bl5six6u7eflbxcdblpgbx3fat24djrqg6n3hmbleidks4`,
|
||||
`${Constants.gateways.ipfs}/bafybeibkttaavlkjxgtafqndyrbgvwqcng67zvd4v36w7fvpajwmdgmxcu`,
|
||||
`${Constants.gateways.ipfs}/bafybeicpk7hkbeqdgbwkx3dltlz3akf3qbjpqgfphbnry4b6txnailtlpq`,
|
||||
`${Constants.gateways.ipfs}/bafybeibb2xknh3iwwetrro73hw3xfzjgwbi4n4c63wqmwt5hvaloqnh33u`,
|
||||
`${Constants.gateways.ipfs}/bafybeig4mij32vyda2jbh6zua3r2rkdpby6wtvninwgxvsejjdnls4wpc4`,
|
||||
`${Constants.gateways.ipfs}/bafybeihmoycn4a6zafd2k3fjcadskrxwvri5cwhabatzbyzteouh3s7igi`,
|
||||
`${Constants.gateways.ipfs}/bafybeigxssjsv3tmdhz4bj6vl2ca5c6rrhdkepw3mifvlllb7orpx5cfou`,
|
||||
];
|
||||
|
||||
const backgroundIdx = Utilities.getRandomNumberBetween(0, AUTH_BACKGROUNDS.length - 1);
|
||||
|
@ -88,8 +88,8 @@ export default class SlateMediaObjectPreview extends React.Component {
|
||||
};
|
||||
|
||||
setImage = () => {
|
||||
let type = this.props.file.type;
|
||||
let coverImage = this.props.file.coverImage;
|
||||
let { type } = this.props.file;
|
||||
let { coverImage } = this.props.file;
|
||||
let url;
|
||||
if (type && Validations.isPreviewableImage(type)) {
|
||||
url = Strings.getURLfromCID(this.props.file.cid);
|
||||
@ -104,7 +104,7 @@ export default class SlateMediaObjectPreview extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const file = this.props.file;
|
||||
const { file } = this.props;
|
||||
const coverImage = this.props.file?.coverImage;
|
||||
|
||||
let url = Utilities.getImageUrlIfExists(file);
|
||||
@ -208,7 +208,7 @@ export default class SlateMediaObjectPreview extends React.Component {
|
||||
fallback={
|
||||
<div style={{ display: "flex", alignItems: "center", justifyContent: "center" }}>
|
||||
<img
|
||||
src="https://slate.textile.io/ipfs/bafkreib5mnvds3cpe7ot7ibrakmrnja2hv5tast3giiarpl5nun7jpdt5m"
|
||||
src={`${Constants.gateways.ipfs}/bafkreib5mnvds3cpe7ot7ibrakmrnja2hv5tast3giiarpl5nun7jpdt5m`}
|
||||
alt=""
|
||||
height={this.props.previewPanel ? "80" : "64"}
|
||||
/>
|
||||
@ -247,7 +247,7 @@ export default class SlateMediaObjectPreview extends React.Component {
|
||||
>
|
||||
<div style={{ display: "flex", alignItems: "center", justifyContent: "center" }}>
|
||||
<img
|
||||
src="https://slate.textile.io/ipfs/bafkreib5mnvds3cpe7ot7ibrakmrnja2hv5tast3giiarpl5nun7jpdt5m"
|
||||
src={`${Constants.gateways.ipfs}/bafkreib5mnvds3cpe7ot7ibrakmrnja2hv5tast3giiarpl5nun7jpdt5m`}
|
||||
alt=""
|
||||
height={this.props.previewPanel ? "80" : "64"}
|
||||
/>
|
||||
|
@ -14,8 +14,7 @@ import { Link } from "~/components/core/Link";
|
||||
import ProcessedText from "~/components/core/ProcessedText";
|
||||
import SlateMediaObjectPreview from "~/components/core/SlateMediaObjectPreview";
|
||||
|
||||
const placeholder =
|
||||
"https://slate.textile.io/ipfs/bafkreidq27ycqubd4pxbo76n3rv5eefgxl3a2lh3wfvdgtil4u47so3nqe";
|
||||
const placeholder = `${Constants.gateways.ipfs}/bafkreidq27ycqubd4pxbo76n3rv5eefgxl3a2lh3wfvdgtil4u47so3nqe`;
|
||||
|
||||
const STYLES_IMAGE_ROW = css`
|
||||
overflow: hidden;
|
||||
@ -39,8 +38,10 @@ const STYLES_ITEM_BOX = css`
|
||||
const STYLES_PLACEHOLDER = css`
|
||||
width: 100%;
|
||||
height: 320px;
|
||||
${"" /* background-size: cover;
|
||||
background-position: 50% 50%; */}
|
||||
${
|
||||
"" /* background-size: cover;
|
||||
background-position: 50% 50%; */
|
||||
}
|
||||
${"" /* margin-bottom: 4px; */}
|
||||
background-color: #d2d7db;
|
||||
font-family: ${Constants.font.text};
|
||||
@ -57,7 +58,7 @@ const STYLES_PLACEHOLDER = css`
|
||||
|
||||
export class SlatePreviewRow extends React.Component {
|
||||
render() {
|
||||
let objects = this.props.objects;
|
||||
let { objects } = this.props;
|
||||
let components = objects.slice(1).map((each) => (
|
||||
<div key={each.id} css={STYLES_ITEM_BOX}>
|
||||
<SlateMediaObjectPreview
|
||||
@ -245,7 +246,7 @@ export class SlatePreviewBlock extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const slate = this.props.slate;
|
||||
const { slate } = this.props;
|
||||
let objects = [];
|
||||
if (slate.coverImage) {
|
||||
objects = [slate.coverImage];
|
||||
|
@ -143,7 +143,7 @@ export default class SystemPage extends React.Component {
|
||||
<meta property="og:description" content={description} />
|
||||
<meta
|
||||
property="og:image"
|
||||
content="https://slate.textile.io/ipfs/bafkreifknnc7rs7u7qrwc72dzaazzk3f3r4dnp3m4cuzdnr5zfckaet3se"
|
||||
content={`${Constants.gateways.ipfs}/bafkreifknnc7rs7u7qrwc72dzaazzk3f3r4dnp3m4cuzdnr5zfckaet3se`}
|
||||
/>
|
||||
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
@ -152,7 +152,7 @@ export default class SystemPage extends React.Component {
|
||||
<meta property="twitter:description" content={description} />
|
||||
<meta
|
||||
property="twitter:image"
|
||||
content="https://slate.textile.io/ipfs/bafkreifknnc7rs7u7qrwc72dzaazzk3f3r4dnp3m4cuzdnr5zfckaet3se"
|
||||
content={`${Constants.gateways.ipfs}/bafkreifknnc7rs7u7qrwc72dzaazzk3f3r4dnp3m4cuzdnr5zfckaet3se`}
|
||||
/>
|
||||
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
export const POLLING_RATE = 5000;
|
||||
export const MAX_BUCKET_COUNT = 100;
|
||||
export const POWERGATE_HOST = "https://grpcweb.slate.textile.io";
|
||||
export const IPFS_GATEWAY_URL = "https://slate.textile.io/ipfs";
|
||||
export const IPFS_GATEWAY_URL = "https://ipfs.io/ipfs";
|
||||
export const FILE_STORAGE_URL = "./public/static/files/";
|
||||
export const GITHUB_URL = "https://github.com/filecoin-project/slate";
|
||||
export const ANALYTICS_URL = "https://slate-stats-dev.azurewebsites.net/";
|
||||
|
@ -14,7 +14,7 @@ export default class SystemPageRoot extends React.Component {
|
||||
url="https://slate.host/_/system"
|
||||
>
|
||||
<img
|
||||
src="https://slate.textile.io/ipfs/bafybeidu5v3ytcy3ynghrmu7zftfinpt3s5pghqmpytrohmpk57ba4suye"
|
||||
src={`${Constants.gateways.ipfs}/bafybeidu5v3ytcy3ynghrmu7zftfinpt3s5pghqmpytrohmpk57ba4suye`}
|
||||
style={{
|
||||
display: "inline-flex",
|
||||
width: "100%",
|
||||
@ -29,7 +29,7 @@ export default class SystemPageRoot extends React.Component {
|
||||
The <strong>Slate Design System</strong> is an open source resource with examples of
|
||||
components, constants, and experiences. Any code changes made to the components in the
|
||||
Design System will change the appearance and function of{" "}
|
||||
<a href="https://slate.host" target="_blank">
|
||||
<a href="https://slate.host" target="_blank" rel="noreferrer">
|
||||
Slate
|
||||
</a>{" "}
|
||||
in production. <br />
|
||||
@ -38,11 +38,15 @@ export default class SystemPageRoot extends React.Component {
|
||||
freely use the code to make their own applications on top of the{" "}
|
||||
<a href="https://filecoin.io">Filecoin Network</a>. A lot of the functionality of Slate is
|
||||
made possible by{" "}
|
||||
<a href="https://github.com/textileio/js-powergate-client" target="_blank">
|
||||
<a
|
||||
href="https://github.com/textileio/js-powergate-client"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Textile's Powergate
|
||||
</a>{" "}
|
||||
and{" "}
|
||||
<a href="https://github.com/textileio/js-hub" target="_blank">
|
||||
<a href="https://github.com/textileio/js-hub" target="_blank" rel="noreferrer">
|
||||
Textile's Hub
|
||||
</a>
|
||||
.
|
||||
@ -54,7 +58,11 @@ export default class SystemPageRoot extends React.Component {
|
||||
<System.P1>
|
||||
You can use these components, experiences, and constants in your own React projects.
|
||||
First, install the{" "}
|
||||
<a href="https://www.npmjs.com/package/slate-react-system" target="_blank">
|
||||
<a
|
||||
href="https://www.npmjs.com/package/slate-react-system"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
npm module
|
||||
</a>
|
||||
:
|
||||
|
@ -3,6 +3,7 @@ import * as Strings from "~/common/strings";
|
||||
import * as Styles from "~/common/styles";
|
||||
import * as Actions from "~/common/actions";
|
||||
import * as Events from "~/common/custom-events";
|
||||
import * as Constants from "~/common/constants";
|
||||
|
||||
import WebsitePrototypeWrapper from "~/components/core/WebsitePrototypeWrapper";
|
||||
|
||||
@ -395,8 +396,7 @@ const Checkbox = ({ touched, value, style, isSelected, ...props }) => {
|
||||
);
|
||||
};
|
||||
|
||||
const background_image =
|
||||
"https://slate.textile.io/ipfs/bafybeiddgkvf5ta6y5b7wamrxl33mtst4detegleblw4gfduhwm3sdwdra";
|
||||
const background_image = `${Constants.gateways.ipfs}/bafybeiddgkvf5ta6y5b7wamrxl33mtst4detegleblw4gfduhwm3sdwdra`;
|
||||
|
||||
const STYLES_ROOT = css`
|
||||
display: flex;
|
||||
|
@ -207,13 +207,13 @@ const addFileColumns = async () => {
|
||||
|
||||
const defaultPhotos = [
|
||||
"https://slate.host/static/a1.jpg",
|
||||
"https://slate.textile.io/ipfs/bafkreigjofaa2wvmcoi5vbe3h32cbqh35d35wdhodfxwgmfky3gcur6s5i",
|
||||
"https://slate.textile.io/ipfs/bafkreiaycwt6m3jabhetfqnsb63z2lx65vzepp5ejk2b56vxypwxiet6c4",
|
||||
"https://slate.textile.io/ipfs/bafkreifvdvygknj66bfqdximxmxobqelwhd3xejiq3vfplhzkopcfdetrq",
|
||||
"https://slate.textile.io/ipfs/bafkreihm3srxvhfppm2dvldw224v4m3prcc3b6pwe3rtuxpsu6wwjpgzpa",
|
||||
"https://slate.textile.io/ipfs/bafkreiardkkfxj3ip373ee2tf6ffivjqclq7ionemt6pw55e6hv7ws5pvu",
|
||||
"https://slate.textile.io/ipfs/bafkreick3nscgixwfpq736forz7kzxvvhuej6kszevpsgmcubyhsx2pf7i",
|
||||
"https://slate.textile.io/ipfs/bafkreibf3hoiyuk2ywjyoy24ywaaclo4k5rz53flesvr5h4qjlyzxamozm",
|
||||
`${Constants.gateways.ipfs}/bafkreigjofaa2wvmcoi5vbe3h32cbqh35d35wdhodfxwgmfky3gcur6s5i`,
|
||||
`${Constants.gateways.ipfs}/bafkreiaycwt6m3jabhetfqnsb63z2lx65vzepp5ejk2b56vxypwxiet6c4`,
|
||||
`${Constants.gateways.ipfs}/bafkreifvdvygknj66bfqdximxmxobqelwhd3xejiq3vfplhzkopcfdetrq`,
|
||||
`${Constants.gateways.ipfs}/bafkreihm3srxvhfppm2dvldw224v4m3prcc3b6pwe3rtuxpsu6wwjpgzpa`,
|
||||
`${Constants.gateways.ipfs}/bafkreiardkkfxj3ip373ee2tf6ffivjqclq7ionemt6pw55e6hv7ws5pvu`,
|
||||
`${Constants.gateways.ipfs}/bafkreick3nscgixwfpq736forz7kzxvvhuej6kszevpsgmcubyhsx2pf7i`,
|
||||
`${Constants.gateways.ipfs}/bafkreibf3hoiyuk2ywjyoy24ywaaclo4k5rz53flesvr5h4qjlyzxamozm`,
|
||||
];
|
||||
|
||||
const defaultBody = ["A user of Slate.", "", "A slate."];
|
||||
@ -226,7 +226,7 @@ const migrateUserTable = async () => {
|
||||
console.log(count);
|
||||
}
|
||||
count += 1;
|
||||
let data = user.data;
|
||||
let { data } = user;
|
||||
let newUser = {
|
||||
name: data.name,
|
||||
body: data.body.slice(0, 2000),
|
||||
@ -280,7 +280,7 @@ const migrateSlateTable = async () => {
|
||||
for (let slate of slates) {
|
||||
let coverImage = Utilities.selectSlateCoverImage(slate.objects);
|
||||
|
||||
let data = slate.data;
|
||||
let { data } = slate;
|
||||
let newSlate = {
|
||||
name: data.name,
|
||||
body: data.body ? data.body.slice(0, 2000) : null,
|
||||
@ -334,7 +334,7 @@ const migrateFileTable = async () => {
|
||||
// console.log({ unity: newFile.data.unity });
|
||||
// }
|
||||
|
||||
let coverImage = data.coverImage;
|
||||
let { coverImage } = data;
|
||||
if (coverImage) {
|
||||
// console.log({ coverImage });
|
||||
let newCoverImage = {
|
||||
|
Loading…
Reference in New Issue
Block a user