renamed slates to collections on front end

This commit is contained in:
Martina 2021-04-22 22:18:46 -07:00
parent 7900ec9fc8
commit 7516175d15
32 changed files with 152 additions and 148 deletions

View File

@ -48,7 +48,7 @@ const response = await fetch(url, {
const SLATE_EXAMPLE_CODE_PY = (key, slateId) => `import requests
url = "https://uploads.slate.host/api/public/${slateId}" # collection ID
url = "https://uploads.slate.host/api/public/${slateId}" # collection ID. Omit this to just upload without adding to a specific collection
files = {
"file": open("example-file.txt", "rb")
}
@ -78,7 +78,7 @@ export default class APIDocsUploadToSlate extends React.Component {
style={{ maxWidth: 640, marginTop: 64 }}
label="Upload"
description={
"This API endpoint allows you to upload file(s) to your data. This uses our data transfer microservice to interact with Textile Buckets and upload data to the IPFS/Filecoin network."
"This API endpoint allows you to upload a file to your data. This uses our data transfer microservice to interact with Textile Buckets and upload data to the IPFS/Filecoin network."
}
/>
<CodeBlock
@ -94,7 +94,7 @@ export default class APIDocsUploadToSlate extends React.Component {
children={slateUploadCode}
style={{ maxWidth: "820px" }}
language={language}
title="Upload"
title="Upload to collection"
multiLang="true"
onLanguageChange={this.props.onLanguageChange}
/>

View File

@ -6,14 +6,14 @@ import CodeBlock from "~/components/system/CodeBlock";
const EXAMPLE_CODE_JS = (
key,
slateId
) => `const response = await fetch('https://slate.host/api/v2/get-slate', {
) => `const response = await fetch('https://slate.host/api/v2/get-collection', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Basic ${key}',
},
body: JSON.stringify({ data: {
id: '${slateId}' // slate ID
id: '${slateId}' // collection ID
}})
});
@ -25,13 +25,13 @@ const json = await response.json();
if (json.error) {
console.log(json.error);
} else {
const slate = json.slate;
const collection = json.collection;
}`;
const EXAMPLE_CODE_PY = (key, slateId) => `import requests
import json as JSON
url = 'https://slate.host/api/v2/get-slate'
url = 'https://slate.host/api/v2/get-collection'
headers = {
'content-type': 'application/json',
'Authorization': 'Basic ${key}'
@ -39,13 +39,13 @@ headers = {
json = {
"data": {
"id": "${slateId}" # slate ID
"id": "${slateId}" # collection ID
}
}
r = requests.post(url, headers=headers, json=json)`;
export default class APIDocsGetSlate extends React.Component {
export default class APIDocsGetCollection extends React.Component {
render() {
let APIKey = this.props.APIKey;
let slateId = this.props.slateId;
@ -60,14 +60,14 @@ export default class APIDocsGetSlate extends React.Component {
<React.Fragment>
<System.DescriptionGroup
style={{ maxWidth: 640, marginTop: 64 }}
label="Get slate by ID"
description="This API request will return a specific slate. You can save the response locally and send this JSON back to our API server using the route /api/v2/update-slate to update your slate."
label="Get collection by ID"
description="This API request will return a specific collection. You can save the response locally and send this JSON back to our API server using the route /api/v2/update-collection to update your collection."
/>
<CodeBlock
children={code}
style={{ maxWidth: "820px" }}
language={language}
title="Get slate by ID"
title="Get collection by ID"
onLanguageChange={this.props.onLanguageChange}
multiLang="true"
/>

View File

@ -19,7 +19,7 @@ const json = await response.json();
if (json.error) {
console.log(json.error);
} else {
const slates = json.slates;
const collections = json.collections;
const user = json.user;
}`;
@ -60,7 +60,7 @@ const EXAMPLE_RESPONSE = `
],
ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
data: {
body: "just a public slate, nothing special",
body: "just a public collection, nothing special",
name: "Public Example",
layouts: {
ver: "2.0",
@ -120,7 +120,7 @@ export default class APIDocsGet extends React.Component {
<System.DescriptionGroup
style={{ maxWidth: 640, marginTop: 64 }}
label="Get your data"
description="This API request returns your user data and slates. If the request body is omitted, the request will return only your public slates by default."
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}

View File

@ -4,12 +4,12 @@ import * as System from "~/components/system";
import CodeBlock from "~/components/system/CodeBlock";
const EXAMPLE_CODE_JS = (key, slateId) => {
return `const SLATE_ID = "${slateId}"
return `const COLLECTION_ID = "${slateId}"
const slateResponseData = getSlateById(SLATE_ID);
const collectionResponseData = getCollectionById(COLLECTION_ID);
const slate = slateResponseData.slate;
const file = slate.objects[0];
const collection = collectionResponseData.collection;
const file = collection.objects[0];
file.data.name = "New filename";
const response = await fetch('https://slate.host/api/v2/update-file', {
@ -30,16 +30,16 @@ headers = {
"Authorization": "Basic ${key}", // API key
}
json = { "id": "${slateId}" } # slate ID
json = { "id": "${slateId}" } # collection ID
get_slate = requests.post(
"https://slate.host/api/v2/get-slate", headers=headers, json=json
get_collection = requests.post(
"https://slate.host/api/v2/get-collection", headers=headers, json=json
)
get_slate_response = get_slate.json()
get_collection_response = get_collection.json()
slate = get_slate_response["slate"]
file = slate["objects"][0];
collection = get_collection_response["collection"]
file = collection["objects"][0];
file["data"]["name"] = "New filename"
postJson = { "data": file }
@ -63,7 +63,7 @@ export default class APIDocsUpdateFile extends React.Component {
<System.DescriptionGroup
style={{ maxWidth: 640, marginTop: 64 }}
label="Update file"
description="This API endpoint allows you to modify a file by saving the slate object in the response from get-slate, modifying it, and sending it back"
description="This API endpoint allows you to modify a file by saving the collection object in the response from get-collection, modifying it, and sending it back"
/>
<CodeBlock
children={code}

View File

@ -4,20 +4,20 @@ import * as System from "~/components/system";
import CodeBlock from "~/components/system/CodeBlock";
const EXAMPLE_CODE_JS = (key, slateId) => {
return `const SLATE_ID = "${slateId}"
return `const COLLECTION_ID = "${slateId}"
const slateResponseData = getSlateById(SLATE_ID);
const collectionResponseData = getCollectionById(COLLECTION_ID);
const slate = slateResponseData.slate;
slate.data.name = "New title"
const collection = collectionResponseData.collection;
collection.data.name = "New title"
const response = await fetch('https://slate.host/api/v2/update-slate', {
const response = await fetch('https://slate.host/api/v2/update-collection', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Basic ${key}', // API key
},
body: JSON.stringify({ data: slate })
body: JSON.stringify({ data: collection })
});`;
};
@ -29,25 +29,25 @@ headers = {
"Authorization": "Basic ${key}", // API key
}
json = { "id": "${slateId}" } # slate ID
json = { "id": "${slateId}" } # collection ID
get_slate = requests.post(
"https://slate.host/api/v2/get-slate", headers=headers, json=json
get_collection = requests.post(
"https://slate.host/api/v2/get-collection", headers=headers, json=json
)
get_slate_response = get_slate.json()
get_collection_response = get_collection.json()
slate = get_slate_response["slate"]
slate["data"]["name"] = "New title"
collection = get_collection_response["collection"]
collection["data"]["name"] = "New title"
postJson = { "data": slate }
postJson = { "data": collection }
url = "https://slate.host/api/v2/update-slate"
url = "https://slate.host/api/v2/update-collection"
r = requests.post(url, headers=headers, json=postJson)`;
export default class APIDocsUpdateSlate extends React.Component {
export default class APIDocsUpdateCollection extends React.Component {
render() {
let language = this.props.language;
let key = this.props.APIKey;
@ -61,14 +61,14 @@ export default class APIDocsUpdateSlate extends React.Component {
<React.Fragment>
<System.DescriptionGroup
style={{ maxWidth: 640, marginTop: 64 }}
label="Update slate"
description="This API endpoint allows you to modify a slate by saving the response from get-slate, modifying it, and sending it back"
label="Update collection"
description="This API endpoint allows you to modify a collection by saving the response from get-collection, modifying it, and sending it back"
/>
<CodeBlock
children={code}
style={{ maxWidth: "820px" }}
language={language}
title="Update slate"
title="Update collection"
multiLang="true"
onLanguageChange={this.props.onLanguageChange}
/>

View File

@ -32,7 +32,7 @@ r = requests.post(url, headers=headers, files=files)`;
const SLATE_EXAMPLE_CODE_JS = (
key,
slateId
) => `const url = 'https://uploads.slate.host/api/public/${slateId}'; // slate ID
) => `const url = 'https://uploads.slate.host/api/public/${slateId}'; // collection ID
let file = e.target.files[0];
let data = new FormData();
@ -48,7 +48,7 @@ const response = await fetch(url, {
const SLATE_EXAMPLE_CODE_PY = (key, slateId) => `import requests
url = "https://uploads.slate.host/api/public/${slateId}" # slate ID
url = "https://uploads.slate.host/api/public/${slateId}" # collection ID
files = {
"file": open("example-file.txt", "rb")
}
@ -78,7 +78,7 @@ export default class APIDocsUploadToSlate extends React.Component {
style={{ maxWidth: 640, marginTop: 64 }}
label="Upload"
description={
"This API endpoint allows you to upload file(s) to your slate. This uses our data transfer microservice to interact with Textile Buckets and upload data to the IPFS/Filecoin network."
"This API endpoint allows you to upload file(s) to your collection. This uses our data transfer microservice to interact with Textile Buckets and upload data to the IPFS/Filecoin network."
}
/>
<CodeBlock
@ -94,7 +94,7 @@ export default class APIDocsUploadToSlate extends React.Component {
children={slateUploadCode}
style={{ maxWidth: "820px" }}
language={language}
title="Upload to slate"
title="Upload to collection"
multiLang="true"
onLanguageChange={this.props.onLanguageChange}
/>

View File

@ -452,7 +452,7 @@ class CarouselSidebar extends React.Component {
_handleDelete = () => {
if (this.props.external || !this.props.isOwner) return;
const message =
"Are you sure you want to delete this? It will be removed from your slates as well";
"Are you sure you want to delete this? It will be removed from your collections as well";
if (!window.confirm(message)) {
return;
}
@ -538,7 +538,7 @@ class CarouselSidebar extends React.Component {
}
}
const slateNames = publicSlateNames.join(", ");
const message = `Making this file private will remove it from the following public slates: ${slateNames}. Do you wish to continue?`;
const message = `Making this file private will remove it from the following public collections: ${slateNames}. Do you wish to continue?`;
if (!window.confirm(message)) {
return;
}
@ -697,7 +697,7 @@ class CarouselSidebar extends React.Component {
}
>
<SVG.Slate height="24px" />
<span style={{ marginLeft: 16 }}>Go to slate</span>
<span style={{ marginLeft: 16 }}>Go to collection</span>
</div>
)
: null;
@ -738,7 +738,7 @@ class CarouselSidebar extends React.Component {
actions.push(
<div key="remove" css={STYLES_ACTION} onClick={this._handleRemove}>
<SVG.DismissCircle height="24px" />
<span style={{ marginLeft: 16 }}>Remove from slate</span>
<span style={{ marginLeft: 16 }}>Remove from collection</span>
</div>
);
}
@ -866,7 +866,7 @@ class CarouselSidebar extends React.Component {
>
<SVG.ChevronDown height="24px" display="block" />
</span>
<span>Add to slate</span>
<span>Add to collection</span>
</div>
{this.state.showConnectedSection && (
<div style={{ width: "100%", margin: "24px 0 44px 0" }}>

View File

@ -475,7 +475,7 @@ export default class DataView extends React.Component {
};
_handleDelete = (id) => {
const message = `Are you sure you want to delete these files? They will be deleted from your slates as well`;
const message = `Are you sure you want to delete these files? They will be deleted from your collections as well`;
if (!window.confirm(message)) {
return;
}
@ -653,7 +653,7 @@ export default class DataView extends React.Component {
style={{ color: Constants.system.white }}
onClick={this._handleAddToSlate}
>
Add to slate
Add to collection
</ButtonPrimary>
<ButtonPrimary
transparent

View File

@ -90,7 +90,7 @@ export class OnboardingModal extends React.Component {
{
title: "New On Slate: Grid System 2.0",
text:
"We just introduced a completely new layout engine that gives you total control over the way you can organize and display your slates.",
"We just introduced a completely new layout engine that gives you total control over the way you can organize and display your collections.",
image: (
<img
src="https://slate.textile.io/ipfs/bafybeigb7pd2dh64ty7l2yhnzu5kjupgxbfzqzjjb2gtprexfxzkwx4nle"

View File

@ -554,7 +554,7 @@ export default class Profile extends React.Component {
<div css={STYLES_STAT}>
<div style={{ fontFamily: `${Constants.font.text}` }}>
{user.slates?.length || 0}{" "}
<span style={{ color: `${Constants.system.darkGray}` }}>Slates</span>
<span style={{ color: `${Constants.system.darkGray}` }}>Collections</span>
</div>
</div>
</div>
@ -576,7 +576,7 @@ export default class Profile extends React.Component {
)}
<div css={STYLES_PROFILE}>
<TabGroup
tabs={["Files", "Slates", "Peers"]}
tabs={["Files", "Collections", "Peers"]}
value={tab}
onChange={this._handleSwitchTab}
style={{ marginTop: 0, marginBottom: 32 }}
@ -619,7 +619,7 @@ export default class Profile extends React.Component {
{tab === 1 ? (
<div>
<SecondaryTabGroup
tabs={["Slates", "Following"]}
tabs={["Collections", "Following"]}
value={this.state.slateTab}
onChange={(value) => {
this.setState({ slateTab: value }, () => {
@ -647,14 +647,14 @@ export default class Profile extends React.Component {
<React.Fragment>
<SVG.Slate height="24px" style={{ marginBottom: 24 }} />
{this.state.slateTab === 0
? `This user does not have any public slates yet`
: `This user is not following any slates yet`}
? `This user does not have any public collections yet`
: `This user is not following any collections yet`}
</React.Fragment>
) : (
<LoaderSpinner style={{ height: 24, width: 24 }} />
)}
</EmptyState>
<div css={STYLES_EXPLORE}>Explore Slates</div>
<div css={STYLES_EXPLORE}>Explore Collections</div>
<SlatePreviewBlocks
isOwner={false}
external={this.props.external}
@ -669,8 +669,8 @@ export default class Profile extends React.Component {
<React.Fragment>
<SVG.Slate height="24px" style={{ marginBottom: 24 }} />
{this.state.slateTab === 0
? `This user does not have any public slates yet`
: `This user is not following any slates yet`}
? `This user does not have any public collections yet`
: `This user is not following any collections yet`}
</React.Fragment>
) : (
<LoaderSpinner style={{ height: 24, width: 24 }} />

View File

@ -115,7 +115,7 @@ const UserPreview = ({ user }) => {
<div css={STYLES_PREVIEW_TEXT}>@{user.username}</div>
{user.data.slates ? (
<div css={STYLES_PREVIEW_TEXT}>
{user.data.slates.length} Slate{user.data.slates.length === 1 ? "" : "s"}
{user.data.slates.length} Collection{user.data.slates.length === 1 ? "" : "s"}
</div>
) : null}
</div>
@ -266,7 +266,7 @@ const FilePreview = ({ file, slate, user, viewerId }) => {
<div css={STYLES_PREVIEW_TEXT}>Owner: {user.data.name || `@${user.username}`}</div>
) : null}
{slate ? (
<div css={STYLES_PREVIEW_TEXT}>Slate: {slate.data.name || slate.slatename}</div>
<div css={STYLES_PREVIEW_TEXT}>Collection: {slate.data.name || slate.slatename}</div>
) : user?.id === viewerId ? (
<div css={STYLES_PREVIEW_TEXT}>In your files</div>
) : null}
@ -955,7 +955,7 @@ export class SearchModal extends React.Component {
{this.state.typeFilter ? (
<div css={STYLES_INLINE_TAG}>
{this.state.typeFilter === "SLATE"
? "Slates:"
? "Collections:"
: this.state.typeFilter === "USER"
? "Users:"
: this.state.typeFilter === "FILE"
@ -971,9 +971,9 @@ export class SearchModal extends React.Component {
value={this.state.inputValue}
placeholder={`Search for ${
!this.state.typeFilter
? "slates, users, and files..."
? "collections, users, and files..."
: this.state.typeFilter === "SLATE"
? "slates..."
? "collections..."
: this.state.typeFilter === "USER"
? "users..."
: this.state.typeFilter === "FILE"
@ -1013,7 +1013,7 @@ export class SearchModal extends React.Component {
>
<SVG.Layers height="16px" />
<span css={STYLES_MOBILE_HIDDEN} style={{ marginLeft: 8 }}>
Search slates
Search collections
</span>
</div>
<div

View File

@ -1050,7 +1050,7 @@ export class SlateLayout extends React.Component {
};
_handleDeleteFiles = async (e, i) => {
const message = `Are you sure you want to delete these files? They will be deleted from your data and slates.`;
const message = `Are you sure you want to delete these files? They will be deleted from your data and collections.`;
if (!window.confirm(message)) {
return;
}
@ -1384,7 +1384,7 @@ export class SlateLayout extends React.Component {
}
>
{this.state.tooltip === `${i}-remove`
? "Remove from slate"
? "Remove from collection"
: this.state.tooltip === `${i}-view`
? "View file"
: this.state.tooltip === `${i}-download`
@ -1509,7 +1509,7 @@ export class SlateLayout extends React.Component {
}
>
{this.state.tooltip === `${i}-add`
? "Add to slate"
? "Add to collection"
: this.state.tooltip === `${i}-copy`
? "Copy link"
: this.state.tooltip === `${i}-download`
@ -1690,7 +1690,7 @@ export class SlateLayout extends React.Component {
style={{ marginLeft: 8, color: Constants.system.white }}
onClick={this._handleAddToSlate}
>
Add to slate
Add to collection
</ButtonPrimary>
<ButtonWarning
transparent
@ -1725,7 +1725,7 @@ export class SlateLayout extends React.Component {
onClick={this._handleAddToSlate}
style={{ color: Constants.system.white }}
>
Add to slate
Add to collection
</ButtonPrimary>
<ButtonPrimary
transparent

View File

@ -123,7 +123,7 @@ export class SlatePicker extends React.Component {
pointerEvents: "none",
}}
/>
<div>Create new slate</div>
<div>Create new collection</div>
</div>
{this.props.slates.length ? (

View File

@ -278,7 +278,7 @@ export class SlatePreviewBlock extends React.Component {
}}
navigation={[
{
text: "Copy slate ID",
text: "Copy collection ID",
onClick: (e) => this._handleCopy(e, this.props.slate.id),
},
]}
@ -368,7 +368,7 @@ export class SlatePreviewBlock extends React.Component {
}}
>
<Logo style={{ height: 18, marginRight: 32, position: "relative", top: 2 }} />
No files in this slate
No files in this collection
</div>
)}
</span>

View File

@ -75,7 +75,7 @@ export default class SidebarAddFileToSlate extends React.Component {
marginBottom: 36,
}}
>
Add files to slate
Add files to collection
</System.P>
<System.P css={STYLES_HEADER}>Slates</System.P>
@ -89,11 +89,11 @@ export default class SidebarAddFileToSlate extends React.Component {
{Object.keys(this.state.selected).length ? (
<ButtonPrimary full onClick={this._handleSubmit} style={{ marginTop: 32 }}>
Add to slates
Add to collections
</ButtonPrimary>
) : (
<ButtonDisabled full style={{ marginTop: 32 }}>
Add to slates
Add to collections
</ButtonDisabled>
)}
</div>

View File

@ -111,7 +111,7 @@ export default class SidebarCreateSlate extends React.Component {
marginBottom: 36,
}}
>
Create slate
Create collection
</System.P>
<div css={STYLES_GROUPING}>
@ -122,12 +122,12 @@ export default class SidebarCreateSlate extends React.Component {
marginTop: 12,
}}
>
Give your slate a name so you and others can find it on Slate and on the web.
Give your collection a name so you and others can find it on Slate and on the web.
</System.P>
<System.Input
autoFocus
placeholder="Slate name..."
placeholder="Collection name..."
style={{ marginTop: 12 }}
name="name"
value={this.state.name}
@ -155,12 +155,12 @@ export default class SidebarCreateSlate extends React.Component {
marginTop: 12,
}}
>
Give your slate a description, add links, and connect it to other slates.
Give your collection a description, add links, and connect it to other collections.
</System.P>
<System.Textarea
style={{ marginTop: 12 }}
placeholder="Slate description..."
placeholder="Collection description..."
name="body"
value={this.state.body}
onChange={this._handleChange}
@ -176,11 +176,11 @@ export default class SidebarCreateSlate extends React.Component {
marginTop: 12,
}}
>
Add tags to a slate to categorize it.
Add tags to a collection to categorize it.
</System.P>
<System.Tag
name="tags"
placeholder={`Edit tags for ${this.state.name ? this.state.name : "this slate"}`}
placeholder={`Edit tags for ${this.state.name ? this.state.name : "this collection"}`}
tags={this.state.tags}
suggestions={this.state.suggestions}
style={{ marginTop: 12 }}
@ -198,8 +198,8 @@ export default class SidebarCreateSlate extends React.Component {
marginTop: 12,
}}
>
All slates are public by default. This means they can be discovered and seen by anyone
on the internet. If you make it private, only you will be able to see it.
All collections are public by default. This means they can be discovered and seen by
anyone on the internet. If you make it private, only you will be able to see it.
</System.P>
<RadioGroup
name="isPublic"

View File

@ -36,7 +36,7 @@ export default class SidebarDragDropNotice extends React.Component {
<FileTypeGroup style={{ margin: "64px 0px" }} />
<System.P style={{ marginTop: 24 }}>
Drag and drop a file anywhere on the screen to add it to your data. Dropping a file while
on a slate page will add it to that slate.
on a collection page will add it to that collection.
</System.P>
<SidebarWarningMessage />

View File

@ -109,7 +109,9 @@ export default class SidebarSingleSlateSettings extends React.Component {
_handleDelete = async (e) => {
if (
!window.confirm("Are you sure you want to delete this Slate? This action is irreversible.")
!window.confirm(
"Are you sure you want to delete this Collection? This action is irreversible."
)
) {
return;
}
@ -160,7 +162,7 @@ export default class SidebarSingleSlateSettings extends React.Component {
marginBottom: 36,
}}
>
Slate settings
Collection settings
</System.P>
<div css={STYLES_GROUPING}>
@ -171,11 +173,11 @@ export default class SidebarSingleSlateSettings extends React.Component {
marginTop: 12,
}}
>
Give your slate a name so you and others can find it on Slate and on the web.
Give your collection a name so you and others can find it on Slate and on the web.
</System.P>
<System.Input
placeholder="Slate name..."
placeholder="Collection name..."
style={{ marginTop: 12 }}
name="tags"
value={this.state.name}
@ -203,13 +205,13 @@ export default class SidebarSingleSlateSettings extends React.Component {
marginTop: 12,
}}
>
Give your slate a description, add links, and connect it to other slates.
Give your collection a description, add links, and connect it to other collections.
</System.P>
<System.Textarea
style={{ marginTop: 12 }}
name="body"
placeholder="Slate description..."
placeholder="Collection description..."
value={this.state.body}
onChange={this._handleChange}
onSubmit={this._handleSubmit}
@ -224,7 +226,7 @@ export default class SidebarSingleSlateSettings extends React.Component {
marginTop: 12,
}}
>
Add tags to a slate to categorize it.
Add tags to a collection to categorize it.
</System.P>
<System.Tag
name="tags"
@ -244,8 +246,8 @@ export default class SidebarSingleSlateSettings extends React.Component {
marginTop: 12,
}}
>
This is the cover image for your slate. You can select a different cover image using the
"Make cover image" button.
This is the cover image for your collection. You can select a different cover image
using the "Make cover image" button.
</System.P>
<div css={STYLES_IMAGE_BOX} style={{ marginTop: 24 }}>
@ -263,8 +265,8 @@ export default class SidebarSingleSlateSettings extends React.Component {
marginTop: 12,
}}
>
All slates are public by default. This means they can be discovered and seen by anyone
on the internet. If you make it private, only you will be able to see it.
All collections are public by default. This means they can be discovered and seen by
anyone on the internet. If you make it private, only you will be able to see it.
</System.P>
<RadioGroup
name="isPublic"
@ -302,7 +304,7 @@ export default class SidebarSingleSlateSettings extends React.Component {
<div style={{ marginTop: 16 }}>
<System.ButtonWarning full onClick={this._handleDelete} style={{ overflow: "hidden" }}>
Delete slate
Delete collection
</System.ButtonWarning>
</div>
</div>

View File

@ -85,7 +85,7 @@ export const createSlate = ({ user, slate }) => {
const userProfileURL = `https://slate.host/${user.username}`;
const userURL = `<${userProfileURL}|${user.username}>`;
const message = `*${userURL}* created a slate: https://slate.host/${user.username}/${slate.slatename}`;
const message = `*${userURL}* created a collection: https://slate.host/${user.username}/${slate.slatename}`;
Social.sendSlackMessage(message);
} catch (e) {
@ -180,7 +180,6 @@ export const createSlate = ({ user, slate }) => {
export const createSlateObjects = ({ slate, user, files }) => {
// Data.createOrUpdateStats(new Date(), { objects: files.length });
console.log("inside create slate objects");
if (!slate.isPublic) return;
let activityItems = [];
@ -307,7 +306,7 @@ export const subscribeSlate = ({ user, targetSlate }) => {
const targetSlatePageURL = `https://slate.host/$/${targetSlate.id}`;
const targetSlateURL = `<${targetSlatePageURL}|${targetSlate.slateId}>`;
const message = `*${userURL}* subscribed to slate:${targetSlateURL}`;
const message = `*${userURL}* subscribed to collection:${targetSlateURL}`;
Social.sendSlackMessage(message);
} catch (e) {
console.log(e);

View File

@ -135,7 +135,7 @@ export default class NotFoundPage extends React.Component {
<div css={STYLES_MIDDLE}>
<h1 css={STYLES_GLITCH}>403</h1>
<h2>You do not have access to this Slate.</h2>
<h2>You do not have access to this collection.</h2>
</div>
<WebsitePrototypeFooter />

View File

@ -125,7 +125,7 @@ const STYLES_MIDDLE = css`
export default class NotFoundPage extends React.Component {
render() {
const title = `404`;
const description = "This page no longer exists.";
const description = "The page you are looking for does not exist";
const url = "https://slate.host/404";
return (
@ -135,7 +135,7 @@ export default class NotFoundPage extends React.Component {
<div css={STYLES_MIDDLE}>
<h1 css={STYLES_GLITCH}>404</h1>
<h2>The page you are looking for does not exist.</h2>
<h2>The page you are looking for does not exist</h2>
</div>
<WebsitePrototypeFooter />

View File

@ -47,31 +47,31 @@ export default async (req, res) => {
let slate;
if (Strings.isEmpty(slateId)) {
return res.status(400).send({ decorator: "V2_GET_SLATE_NO_ID_PROVIDED", error: true });
return res.status(400).send({ decorator: "NO_ID_PROVIDED", error: true });
}
slate = await Data.getSlateById({ id: slateId, includeFiles: true, sanitize: true });
if (!slate) {
return res.status(404).send({
decorator: "SLATE_NOT_FOUND",
decorator: "COLLECTION_NOT_FOUND",
error: true,
});
}
if (slate.error) {
return res.status(500).send({
decorator: "ERROR_WHILE_LOCATING_SLATE",
decorator: "ERROR_WHILE_LOCATING_COLLECTION",
error: true,
});
}
if (!slate.isPublic) {
return res.status(400).send({
decorator: "SLATE_IS_PRIVATE",
decorator: "COLLECTION_IS_PRIVATE",
error: true,
});
}
return res.status(200).send({ decorator: "V2_GET_SLATE", slate });
return res.status(200).send({ decorator: "V2_GET_COLLECTION", collection: slate });
};

View File

@ -55,14 +55,14 @@ export default async (req, res) => {
if (!slates) {
return res.status(404).send({
decorator: "COULD_NOT_FETCH_SLATES",
decorator: "COULD_NOT_FETCH_COLLECTIONS",
error: true,
});
}
if (slates.error) {
return res.status(500).send({
decorator: "COULD_NOT_FETCH_SLATES",
decorator: "COULD_NOT_FETCH_COLLECTIONS",
error: true,
});
}
@ -72,5 +72,5 @@ export default async (req, res) => {
return each;
});
return res.status(200).send({ decorator: "V2_GET", user, slates });
return res.status(200).send({ decorator: "V2_GET", user, collections: slates });
};

View File

@ -52,7 +52,7 @@ export default async (req, res) => {
if (!req.body.data) {
return res.status(500).send({
decorator: "V2_UPDATE_SLATE_MUST_PROVIDE_DATA",
decorator: "V2_UPDATE_COLLECTION_MUST_PROVIDE_DATA",
error: true,
});
}
@ -60,16 +60,16 @@ export default async (req, res) => {
const slate = await Data.getSlateById({ id: req.body.data.id, includeFiles: true });
if (!slate) {
return res.status(404).send({ decorator: "SLATE_NOT_FOUND", error: true });
return res.status(404).send({ decorator: "COLLECTION_NOT_FOUND", error: true });
}
if (slate.error) {
return res.status(500).send({ decorator: "SLATE_NOT_FOUND", error: true });
return res.status(500).send({ decorator: "COLLECTION_NOT_FOUND", error: true });
}
if (slate.ownerId !== user.id) {
return res.status(400).send({
decorator: "NOT_SLATE_OWNER_UPDATE_NOT_PERMITTED",
decorator: "NOT_COLLECTION_OWNER_UPDATE_NOT_PERMITTED",
error: true,
});
}
@ -92,11 +92,11 @@ export default async (req, res) => {
});
if (!privacyResponse) {
return res.status(404).send({ decorator: "UPDATE_SLATE_PRIVACY_FAILED", error: true });
return res.status(404).send({ decorator: "UPDATE_COLLECTION_PRIVACY_FAILED", error: true });
}
if (privacyResponse.error) {
return res.status(500).send({ decorator: "UPDATE_SLATE_PRIVACY_FAILED", error: true });
return res.status(500).send({ decorator: "UPDATE_COLLECTION_PRIVACY_FAILED", error: true });
}
if (!updates.isPublic) {
@ -125,7 +125,7 @@ export default async (req, res) => {
if (updates.data.name && updates.data.name !== slate.data.name) {
if (!Validations.slatename(slate.data.name)) {
return res.status(400).send({
decorator: "INVALID_SLATE_NAME",
decorator: "INVALID_COLLECTION_NAME",
error: true,
});
}
@ -137,7 +137,7 @@ export default async (req, res) => {
if (existingSlate) {
return res.status(500).send({
decorator: "SLATE_NAME_TAKEN",
decorator: "COLLECTION_NAME_TAKEN",
error: true,
});
} else {
@ -148,11 +148,11 @@ export default async (req, res) => {
let updatedSlate = await Data.updateSlateById(updates);
if (!updatedSlate) {
return res.status(404).send({ decorator: "UPDATE_SLATE_FAILED", error: true });
return res.status(404).send({ decorator: "UPDATE_COLLECTION_FAILED", error: true });
}
if (updatedSlate.error) {
return res.status(500).send({ decorator: "UPDATE_SLATE_FAILED", error: true });
return res.status(500).send({ decorator: "UPDATE_COLLECTION_FAILED", error: true });
}
if (slate.isPublic && !updates.isPublic) {
@ -165,5 +165,5 @@ export default async (req, res) => {
ViewerManager.hydratePartial(user.id, { slates: true });
return res.status(200).send({ decorator: "V2_UPDATE_SLATE", slate: updatedSlate });
return res.status(200).send({ decorator: "V2_UPDATE_COLLECTION", collection: updatedSlate });
};

View File

@ -728,7 +728,7 @@ method: 'POST',
Authorization: 'Basic SLATE-API-KEY-FROM-ACCOUNT-SETTINGS',
},
body: JSON.stringify({ data: {
// NOTE: optional, if you want your private slates too.
// NOTE: optional, if you want your private collections too.
private: false
}})
});

View File

@ -429,7 +429,7 @@ export default class IndexPage extends React.Component {
<div css={STYLES_TEXT_BLOCK}>
<h2 css={STYLES_H1}>
<span css={STYLES_HIGHLIGHT_YELLOW}>Collect, organize and share</span> <br />
your slates
your collections
</h2>
<p css={STYLES_P} style={{ opacity: 0.7 }}>
A modular interface for your files, an interface that gives you complete

View File

@ -138,8 +138,8 @@ export default class TermsPage extends React.Component {
</a>
</li>
<li>
<a css={STYLES_LINK} href="#Your account and slates">
Your account and slates
<a css={STYLES_LINK} href="#Your account and collections">
Your account and collections
</a>
</li>
<li>

View File

@ -390,7 +390,7 @@ export default class SceneActivity extends React.Component {
<TabGroup
tabs={[
{ title: "Files", value: "NAV_DATA" },
{ title: "Slates", value: "NAV_SLATES" },
{ title: "Collections", value: "NAV_SLATES" },
{ title: "Activity", value: "NAV_ACTIVITY" },
]}
value={2}
@ -403,7 +403,7 @@ export default class SceneActivity extends React.Component {
<PrimaryTabGroup
tabs={[
{ title: "Files", value: "NAV_DATA" },
{ title: "Slates", value: "NAV_SLATES" },
{ title: "Collections", value: "NAV_SLATES" },
{ title: "Activity", value: "NAV_ACTIVITY" },
]}
value={2}
@ -517,7 +517,7 @@ export default class SceneActivity extends React.Component {
<EmptyState>
<SVG.Users height="24px" />
<div style={{ marginTop: 24 }}>
Start following people and slates to see their activity here
Start following people and collections to see their activity here
</div>
</EmptyState>
)}

View File

@ -305,7 +305,8 @@ export default class SceneDirectory extends React.Component {
) : (
<EmptyState>
<SVG.Users height="24px" style={{ marginBottom: 24 }} />
You can follow any user on the network to be updated on their new uploads and slates.
You can follow any user on the network to be updated on their new uploads and
collections.
</EmptyState>
)
) : null}

View File

@ -244,7 +244,7 @@ export default class SceneFilesFolder extends React.Component {
<TabGroup
tabs={[
{ title: "Files", value: "NAV_DATA" },
{ title: "Slates", value: "NAV_SLATES" },
{ title: "Collections", value: "NAV_SLATES" },
{ title: "Activity", value: "NAV_ACTIVITY" },
]}
value={0}
@ -257,7 +257,7 @@ export default class SceneFilesFolder extends React.Component {
<PrimaryTabGroup
tabs={[
{ title: "Files", value: "NAV_DATA" },
{ title: "Slates", value: "NAV_SLATES" },
{ title: "Collections", value: "NAV_SLATES" },
{ title: "Activity", value: "NAV_ACTIVITY" },
]}
value={0}

View File

@ -183,8 +183,8 @@ export default class SceneSlate extends React.Component {
<SVG.Layers height="24px" style={{ marginBottom: 24 }} />
<div>
{this.state.accessDenied
? "You do not have access to that slate"
: "We were unable to locate that slate"}
? "You do not have access to that collection"
: "We were unable to locate that collection"}
</div>
</EmptyState>
</ScenePage>
@ -467,7 +467,9 @@ class SlatePage extends React.Component {
<div>
<EmptyState>
<FileTypeGroup />
<div style={{ marginTop: 24 }}>Drag and drop files to add them to this slate</div>
<div style={{ marginTop: 24 }}>
Drag and drop files to add them to this collection
</div>
</EmptyState>
</div>
) : (

View File

@ -41,7 +41,7 @@ export default class SceneSlates extends React.Component {
<TabGroup
tabs={[
{ title: "Files", value: "NAV_DATA" },
{ title: "Slates", value: "NAV_SLATES" },
{ title: "Collections", value: "NAV_SLATES" },
{ title: "Activity", value: "NAV_ACTIVITY" },
]}
value={1}
@ -54,7 +54,7 @@ export default class SceneSlates extends React.Component {
<PrimaryTabGroup
tabs={[
{ title: "Files", value: "NAV_DATA" },
{ title: "Slates", value: "NAV_SLATES" },
{ title: "Collections", value: "NAV_SLATES" },
{ title: "Activity", value: "NAV_ACTIVITY" },
]}
value={1}
@ -69,7 +69,7 @@ export default class SceneSlates extends React.Component {
</SquareButtonGray>
<SecondaryTabGroup
tabs={[
{ title: "My Slates", value: "NAV_SLATES" },
{ title: "My Collections", value: "NAV_SLATES" },
{ title: "Subscribed", value: "NAV_SLATES_FOLLOWING" },
]}
value={this.props.tab}
@ -102,10 +102,10 @@ export default class SceneSlates extends React.Component {
<EmptyState>
<FileTypeGroup />
<div style={{ marginTop: 24 }}>
Use slates to create mood boards, share files, and organize research.
Use collections to create mood boards, share files, and organize research.
</div>
<ButtonSecondary onClick={this._handleAdd} style={{ marginTop: 32 }}>
Create slate
Create collection
</ButtonSecondary>
</EmptyState>
)
@ -120,9 +120,9 @@ export default class SceneSlates extends React.Component {
/>
) : (
<EmptyState>
You can follow any public slates on the network.
You can follow any public collections on the network.
<ButtonSecondary onClick={this._handleSearch} style={{ marginTop: 32 }}>
Browse slates
Browse collections
</ButtonSecondary>
</EmptyState>
)