From 7900ec9fc87593aca345db84b1d35f66f7b08a53 Mon Sep 17 00:00:00 2001 From: Martina Date: Thu, 22 Apr 2021 21:18:02 -0700 Subject: [PATCH 1/2] saving work --- README.md | 2 +- common/messages.js | 51 +++++++++++++------------- common/navigation-data.js | 12 +++--- common/strings.js | 4 +- components/api-docs/v1/get-slate.js | 12 +++--- components/api-docs/v1/get.js | 10 ++--- components/api-docs/v1/update-slate.js | 26 ++++++------- components/api-docs/v1/upload.js | 8 ++-- 8 files changed, 64 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index afc9053e..d04509c6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Slate is the first open source file storage application designed to encourage co Slate is tightly scoped for the present and more broadly thought out for the future. Our primary objective is to create a best-in-class experience for uploading, collecting, and sharing media. Additional filetypes will be supported, but our focus is to start with the pieces that apply to everyone and then dial into more specific formats. -- Example slate: https://slate.host/tara/loom +- Example collection: https://slate.host/tara/loom - Example user profile: https://slate.host/gndclouds - New brand: https://slate.host/narative/slate-brand-identity - Monet on Filecoin: https://slate.host/slate/monet diff --git a/common/messages.js b/common/messages.js index 0d2e1071..04e4443f 100644 --- a/common/messages.js +++ b/common/messages.js @@ -65,56 +65,57 @@ export const error = { //Add to slate SERVER_ADD_TO_SLATE_NO_SLATE: - "We ran into issues while adding files to that slate. No slate was specified", - SERVER_ADD_TO_SLATE_SLATE_NOT_FOUND: "We're having trouble locating that slate right now", + "We ran into issues while adding files to that collection. No collection was specified", + SERVER_ADD_TO_SLATE_SLATE_NOT_FOUND: "We're having trouble locating that collection right now", SERVER_ADD_TO_SLATE_NO_FILES: - "We ran into issues while adding files to that slate. No files selected", - SERVER_ADD_TO_SLATE_FAILED: "We're having trouble adding those files to that slate right now", + "We ran into issues while adding files to that collection. No files selected", + SERVER_ADD_TO_SLATE_FAILED: + "We're having trouble adding those files to that collection right now", //Slate create SERVER_CREATE_SLATE_EXISTING_SLATE_NAME: - "You already have a slate with that name. Slate names must be unique", + "You already have a collection with that name. Collection names must be unique", SERVER_CREATE_SLATE_FAILED: - "We are having trouble creating that slate right now, please try again later", + "We are having trouble creating that collection right now, please try again later", //Slate delete SERVER_DELETE_SLATE_SLATE_NOT_FOUND: - "We're having difficulty locating that slate. It may have already been deleted", + "We're having difficulty locating that collection. It may have already been deleted", SERVER_DELETE_SLATE_FAILED: - "We're having trouble deleting that slate right now, please try again later", + "We're having trouble deleting that collection right now, please try again later", //Get slate SERVER_GET_SERIALIZED_SLATE_SLATE_NOT_FOUND: - "We were unable to locate that slate. It may be private or it may not exist", + "We were unable to locate that collection. It may be private or it may not exist", SERVER_GET_SERIALIZED_SLATE_PRIVATE_ACCESS_DENIED: - "We were unable to locate that slate. It may be private or it may not exist", + "We were unable to locate that collection. It may be private or it may not exist", SERVER_GET_SLATE_NOT_FOUND: - "We were unable to locate that slate. It may be private or it may not exist", + "We were unable to locate that collection. It may be private or it may not exist", SERVER_GET_SLATE_PRIVATE_ACCESS_DENIED: - "We were unable to locate that slate. It may be private or it may not exist", + "We were unable to locate that collection. It may be private or it may not exist", //Remove from slate SERVER_REMOVE_FROM_SLATE_NO_ID_PROVIDED: - "Unable to remove from slate because no slate was specified", - SERVER_REMOVE_FROM_SLATE_SLATE_NOT_FOUND: "We are having trouble locating that slate", - SERVER_REMOVE_FROM_SLATE_FAILED: "We are having trouble removing from that slate right now", + "Unable to remove from collection because no collection was specified", + SERVER_REMOVE_FROM_SLATE_SLATE_NOT_FOUND: "We are having trouble locating that collection", + SERVER_REMOVE_FROM_SLATE_FAILED: "We are having trouble removing from that collection right now", //Update slate layout SERVER_UPDATE_SLATE_LAYOUT_MUST_PROVIDE_DATA: "No layout was provided to update", - SERVER_UPDATE_SLATE_LAYOUT_NOT_FOUND: "We are having trouble locating that slate", + SERVER_UPDATE_SLATE_LAYOUT_NOT_FOUND: "We are having trouble locating that collection", SERVER_UPDATE_SLATE_LAYOUT: - "We are unable to update that slate's layout right now. Please try again later", + "We are unable to update that collection's layout right now. Please try again later", //Update slate SERVER_UPDATE_SLATE_MUST_PROVIDE_DATA: - "We are unable to update that slate because no data was provided", - SERVER_UPDATE_SLATE_NOT_FOUND: "We are having trouble locating that slate", + "We are unable to update that collection because no data was provided", + SERVER_UPDATE_SLATE_NOT_FOUND: "We are having trouble locating that collection", SERVER_UPDATE_SLATE_UPDATE_PRIVACY_FAILED: - "We are having trouble updating the privacy of that slate", - SERVER_UPDATE_SLATE_INVALID_NAME: "Please use a valid slate name", + "We are having trouble updating the privacy of that collection", + SERVER_UPDATE_SLATE_INVALID_NAME: "Please use a valid collection name", SERVER_UPDATE_SLATE_NAME_TAKEN: - "You already have a slate with that name. Slate names must be unique", - SERVER_UPDATE_SLATE_FAILED: "We are having trouble updating that slate right now", + "You already have a collection with that name. Collection names must be unique", + SERVER_UPDATE_SLATE_FAILED: "We are having trouble updating that collection right now", //Create user SERVER_CREATE_USER_NOT_ALLOWED: "You can only create users while on slate.host", @@ -171,10 +172,10 @@ export const error = { SERVER_SIGN_IN_WRONG_PASSWORD: "We were unable to locate that account with those credentials", //Subscribe - SERVER_SUBSCRIBE_MUST_PROVIDE_SLATE_OR_USER: "No slate or user to follow specified", + SERVER_SUBSCRIBE_MUST_PROVIDE_SLATE_OR_USER: "No collection or user to follow specified", SERVER_SUBSCRIBE_CAN_NOT_SUBSCRIBE_TO_YOURSELF: "You cannot follow yourself", SERVER_SUBSCRIBE_TARGET_USER_NOT_FOUND: "We are unable to locate that user", - SERVER_SUBSCRIBE_TARGET_SLATE_NOT_FOUND: "We are unable to locate that slate", + SERVER_SUBSCRIBE_TARGET_SLATE_NOT_FOUND: "We are unable to locate that collection", SERVER_SUBSCRIBE_SUBSCRIPTION_CHECK_ERROR: "We are having trouble editing that subscription right now", SERVER_UNSUBSCRIBE_FAILED: "We were unable to unsubscribe, please try again later", diff --git a/common/navigation-data.js b/common/navigation-data.js index 40a09613..f2aef01d 100644 --- a/common/navigation-data.js +++ b/common/navigation-data.js @@ -57,15 +57,15 @@ export const navigation = [ { id: "NAV_SLATES", decorator: "SLATES", - name: "Slates", - pageTitle: "Slates", + name: "Collections", + pageTitle: "Collections", ignore: true, }, { id: "NAV_SLATES_FOLLOWING", decorator: "SLATES_FOLLOWING", - name: "Slates", - pageTitle: "Slates", + name: "Collections following", + pageTitle: "Collections following", ignore: true, }, { @@ -84,8 +84,8 @@ export const navigation = [ { id: "NAV_SLATE", decorator: "SLATE", - name: "Slate", - pageTitle: "Slate", + name: "Collection", + pageTitle: "Collection", ignore: true, }, { diff --git a/common/strings.js b/common/strings.js index 70627af4..a93a5c1a 100644 --- a/common/strings.js +++ b/common/strings.js @@ -114,7 +114,9 @@ export const getCIDFromIPFS = (url) => { }; export const formatAsUploadMessage = (added, skipped, slate = false) => { - let message = `${added || 0} file${added !== 1 ? "s" : ""} uploaded${slate ? " to slate" : ""}. `; + let message = `${added || 0} file${added !== 1 ? "s" : ""} uploaded${ + slate ? " to collection" : "" + }. `; if (skipped) { message += `${skipped || 0} duplicate / existing file${ added !== 1 ? "s were" : " was" diff --git a/components/api-docs/v1/get-slate.js b/components/api-docs/v1/get-slate.js index c338a255..1af27724 100644 --- a/components/api-docs/v1/get-slate.js +++ b/components/api-docs/v1/get-slate.js @@ -13,7 +13,7 @@ const EXAMPLE_CODE_JS = ( Authorization: 'Basic ${key}', }, body: JSON.stringify({ data: { - id: '${slateId}' // slate ID + id: '${slateId}' // collection ID }}) }); @@ -25,7 +25,7 @@ const json = await response.json(); if (json.error) { console.log(json.error); } else { - const slate = json.slate; + const collection = json.slate; }`; const EXAMPLE_CODE_PY = (key, slateId) => `import requests @@ -39,7 +39,7 @@ headers = { json = { "data": { - "id": "${slateId}" # slate ID + "id": "${slateId}" # collection ID } } @@ -60,14 +60,14 @@ export default class APIDocsGetSlate extends React.Component { diff --git a/components/api-docs/v1/get.js b/components/api-docs/v1/get.js index 7b0b4375..b69f2848 100644 --- a/components/api-docs/v1/get.js +++ b/components/api-docs/v1/get.js @@ -10,7 +10,7 @@ const EXAMPLE_CODE_JS = (key) => `const response = await fetch('https://slate.ho Authorization: 'Basic ${key}', }, body: JSON.stringify({ data: { - private: false // set private = true to include private slates + private: false // set private = true to include private collections }}) }); @@ -22,7 +22,7 @@ const json = await response.json(); if (json.error) { console.log(json.error); } else { - const slates = json.slates; + const collections = json.slates; const user = json.user; }`; @@ -37,7 +37,7 @@ headers = { json = { "data": { - "private": "false" # set private = true to include private slates + "private": "false" # set private = true to include private collections } } @@ -53,7 +53,7 @@ const EXAMPLE_RESPONSE = ` "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "slatename": "public-example", "data": { - "body": "just a public slate, nothing special", + "body": "just a public collection, nothing special", "name": "Public Example", "public": true, "layouts": { @@ -114,7 +114,7 @@ export default class APIDocsGet extends React.Component { { - 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.slate; +collection.data.name = "New title" const response = await fetch('https://slate.host/api/v1/update-slate', { method: 'POST', @@ -17,7 +17,7 @@ const response = await fetch('https://slate.host/api/v1/update-slate', { 'Content-Type': 'application/json', Authorization: 'Basic ${key}', // API key }, - body: JSON.stringify({ data: slate }) + body: JSON.stringify({ data: collection }) });`; }; @@ -31,17 +31,17 @@ headers = { json = { "id": "${slateId}" } # slate ID -get_slate = requests.post( +get_collection = requests.post( "https://slate.host/api/v1/get-slate", 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["slate"] +collection["data"]["name"] = "New title" -postJson = { "data": slate } +postJson = { "data": collection } url = "https://slate.host/api/v1/update-slate" @@ -61,14 +61,14 @@ export default class APIDocsUpdateSlate extends React.Component { diff --git a/components/api-docs/v1/upload.js b/components/api-docs/v1/upload.js index 7c1baae6..861743fa 100644 --- a/components/api-docs/v1/upload.js +++ b/components/api-docs/v1/upload.js @@ -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 data. This uses our data transfer microservice to interact with Textile Buckets and upload data to the IPFS/Filecoin network." } /> From 7516175d1565a3aa1c01b1c902af73503cfba4af Mon Sep 17 00:00:00 2001 From: Martina Date: Thu, 22 Apr 2021 22:18:46 -0700 Subject: [PATCH 2/2] renamed slates to collections on front end --- components/api-docs/v1/upload.js | 6 ++-- components/api-docs/v2/get-slate.js | 18 +++++----- components/api-docs/v2/get.js | 6 ++-- components/api-docs/v2/update-file.js | 22 ++++++------ components/api-docs/v2/update-slate.js | 36 +++++++++---------- components/api-docs/v2/upload.js | 8 ++--- components/core/CarouselSidebar.js | 10 +++--- components/core/DataView.js | 4 +-- components/core/OnboardingModal.js | 2 +- components/core/Profile.js | 16 ++++----- components/core/SearchModal.js | 12 +++---- components/core/SlateLayout.js | 10 +++--- components/core/SlatePicker.js | 2 +- components/core/SlatePreviewBlock.js | 4 +-- components/sidebars/SidebarAddFileToSlate.js | 6 ++-- components/sidebars/SidebarCreateSlate.js | 18 +++++----- components/sidebars/SidebarDragDropNotice.js | 2 +- .../sidebars/SidebarSingleSlateSettings.js | 26 +++++++------- node_common/monitor.js | 5 ++- pages/403.js | 2 +- pages/404.js | 4 +-- .../v2/{get-slate.js => get-collection.js} | 10 +++--- pages/api/v2/get.js | 6 ++-- .../{update-slate.js => update-collection.js} | 22 ++++++------ pages/community.js | 2 +- pages/index.js | 2 +- pages/terms.js | 4 +-- scenes/SceneActivity.js | 6 ++-- scenes/SceneDirectory.js | 3 +- scenes/SceneFilesFolder.js | 4 +-- scenes/SceneSlate.js | 8 +++-- scenes/SceneSlates.js | 14 ++++---- 32 files changed, 152 insertions(+), 148 deletions(-) rename pages/api/v2/{get-slate.js => get-collection.js} (83%) rename pages/api/v2/{update-slate.js => update-collection.js} (81%) diff --git a/components/api-docs/v1/upload.js b/components/api-docs/v1/upload.js index 861743fa..f3fd0a67 100644 --- a/components/api-docs/v1/upload.js +++ b/components/api-docs/v1/upload.js @@ -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." } /> diff --git a/components/api-docs/v2/get-slate.js b/components/api-docs/v2/get-slate.js index f58801dd..9c48a476 100644 --- a/components/api-docs/v2/get-slate.js +++ b/components/api-docs/v2/get-slate.js @@ -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 { diff --git a/components/api-docs/v2/get.js b/components/api-docs/v2/get.js index c72c1694..2a2a4f53 100644 --- a/components/api-docs/v2/get.js +++ b/components/api-docs/v2/get.js @@ -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 { { - 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 { { - 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 { diff --git a/components/api-docs/v2/upload.js b/components/api-docs/v2/upload.js index 7c1baae6..50f57d53 100644 --- a/components/api-docs/v2/upload.js +++ b/components/api-docs/v2/upload.js @@ -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." } /> diff --git a/components/core/CarouselSidebar.js b/components/core/CarouselSidebar.js index 6047cebf..01d4f24e 100644 --- a/components/core/CarouselSidebar.js +++ b/components/core/CarouselSidebar.js @@ -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 { } > - Go to slate + Go to collection ) : null; @@ -738,7 +738,7 @@ class CarouselSidebar extends React.Component { actions.push(
- Remove from slate + Remove from collection
); } @@ -866,7 +866,7 @@ class CarouselSidebar extends React.Component { > - Add to slate + Add to collection {this.state.showConnectedSection && (
diff --git a/components/core/DataView.js b/components/core/DataView.js index 67bede77..117ba1e3 100644 --- a/components/core/DataView.js +++ b/components/core/DataView.js @@ -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
{user.slates?.length || 0}{" "} - Slates + Collections
@@ -576,7 +576,7 @@ export default class Profile extends React.Component { )}
{ this.setState({ slateTab: value }, () => { @@ -647,14 +647,14 @@ export default class Profile extends React.Component { {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`} ) : ( )} -
Explore Slates
+
Explore Collections
{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`} ) : ( diff --git a/components/core/SearchModal.js b/components/core/SearchModal.js index 04813fb6..9dd46086 100644 --- a/components/core/SearchModal.js +++ b/components/core/SearchModal.js @@ -115,7 +115,7 @@ const UserPreview = ({ user }) => {
@{user.username}
{user.data.slates ? (
- {user.data.slates.length} Slate{user.data.slates.length === 1 ? "" : "s"} + {user.data.slates.length} Collection{user.data.slates.length === 1 ? "" : "s"}
) : null}
@@ -266,7 +266,7 @@ const FilePreview = ({ file, slate, user, viewerId }) => {
Owner: {user.data.name || `@${user.username}`}
) : null} {slate ? ( -
Slate: {slate.data.name || slate.slatename}
+
Collection: {slate.data.name || slate.slatename}
) : user?.id === viewerId ? (
In your files
) : null} @@ -955,7 +955,7 @@ export class SearchModal extends React.Component { {this.state.typeFilter ? (
{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 { > - Search slates + Search collections
{ - 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 - Add to slate + Add to collection -
Create new slate
+
Create new collection
{this.props.slates.length ? ( diff --git a/components/core/SlatePreviewBlock.js b/components/core/SlatePreviewBlock.js index 2ea13221..502e777c 100644 --- a/components/core/SlatePreviewBlock.js +++ b/components/core/SlatePreviewBlock.js @@ -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 { }} > - No files in this slate + No files in this collection )} diff --git a/components/sidebars/SidebarAddFileToSlate.js b/components/sidebars/SidebarAddFileToSlate.js index 86bc1027..f41f385e 100644 --- a/components/sidebars/SidebarAddFileToSlate.js +++ b/components/sidebars/SidebarAddFileToSlate.js @@ -75,7 +75,7 @@ export default class SidebarAddFileToSlate extends React.Component { marginBottom: 36, }} > - Add files to slate + Add files to collection Slates @@ -89,11 +89,11 @@ export default class SidebarAddFileToSlate extends React.Component { {Object.keys(this.state.selected).length ? ( - Add to slates + Add to collections ) : ( - Add to slates + Add to collections )} diff --git a/components/sidebars/SidebarCreateSlate.js b/components/sidebars/SidebarCreateSlate.js index 7c8b4bcf..4233843a 100644 --- a/components/sidebars/SidebarCreateSlate.js +++ b/components/sidebars/SidebarCreateSlate.js @@ -111,7 +111,7 @@ export default class SidebarCreateSlate extends React.Component { marginBottom: 36, }} > - Create slate + Create collection
@@ -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. - 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. - Add tags to a slate to categorize it. + Add tags to a collection to categorize it. - 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. 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. diff --git a/components/sidebars/SidebarSingleSlateSettings.js b/components/sidebars/SidebarSingleSlateSettings.js index 41df02b7..adc6490e 100644 --- a/components/sidebars/SidebarSingleSlateSettings.js +++ b/components/sidebars/SidebarSingleSlateSettings.js @@ -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
@@ -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. - 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. - Add tags to a slate to categorize it. + Add tags to a collection to categorize it. - 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.
@@ -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. - Delete slate + Delete collection
diff --git a/node_common/monitor.js b/node_common/monitor.js index ba95fafb..92789798 100644 --- a/node_common/monitor.js +++ b/node_common/monitor.js @@ -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); diff --git a/pages/403.js b/pages/403.js index dbc00a8e..bc21cbaa 100644 --- a/pages/403.js +++ b/pages/403.js @@ -135,7 +135,7 @@ export default class NotFoundPage extends React.Component {

403

-

You do not have access to this Slate.

+

You do not have access to this collection.

diff --git a/pages/404.js b/pages/404.js index 89b493c3..067c7b91 100644 --- a/pages/404.js +++ b/pages/404.js @@ -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 {

404

-

The page you are looking for does not exist.

+

The page you are looking for does not exist

diff --git a/pages/api/v2/get-slate.js b/pages/api/v2/get-collection.js similarity index 83% rename from pages/api/v2/get-slate.js rename to pages/api/v2/get-collection.js index 3d2bcbe9..7fc56176 100644 --- a/pages/api/v2/get-slate.js +++ b/pages/api/v2/get-collection.js @@ -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 }); }; diff --git a/pages/api/v2/get.js b/pages/api/v2/get.js index bf574371..e6193ca1 100644 --- a/pages/api/v2/get.js +++ b/pages/api/v2/get.js @@ -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 }); }; diff --git a/pages/api/v2/update-slate.js b/pages/api/v2/update-collection.js similarity index 81% rename from pages/api/v2/update-slate.js rename to pages/api/v2/update-collection.js index 5a6cf2ce..dcbdf712 100644 --- a/pages/api/v2/update-slate.js +++ b/pages/api/v2/update-collection.js @@ -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 }); }; diff --git a/pages/community.js b/pages/community.js index b7a4d58c..afa5c281 100644 --- a/pages/community.js +++ b/pages/community.js @@ -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 }}) }); diff --git a/pages/index.js b/pages/index.js index 7822a019..f158068f 100644 --- a/pages/index.js +++ b/pages/index.js @@ -429,7 +429,7 @@ export default class IndexPage extends React.Component {

Collect, organize and share
- your slates + your collections

A modular interface for your files, an interface that gives you complete diff --git a/pages/terms.js b/pages/terms.js index fc27aa93..a2cf4e59 100644 --- a/pages/terms.js +++ b/pages/terms.js @@ -138,8 +138,8 @@ export default class TermsPage extends React.Component {

  • - - Your account and slates + + Your account and collections
  • diff --git a/scenes/SceneActivity.js b/scenes/SceneActivity.js index 30267e60..c843046f 100644 --- a/scenes/SceneActivity.js +++ b/scenes/SceneActivity.js @@ -390,7 +390,7 @@ export default class SceneActivity extends React.Component {
    - Start following people and slates to see their activity here + Start following people and collections to see their activity here
    )} diff --git a/scenes/SceneDirectory.js b/scenes/SceneDirectory.js index 4ca1b122..fdd303c7 100644 --- a/scenes/SceneDirectory.js +++ b/scenes/SceneDirectory.js @@ -305,7 +305,8 @@ export default class SceneDirectory extends React.Component { ) : ( - 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. ) ) : null} diff --git a/scenes/SceneFilesFolder.js b/scenes/SceneFilesFolder.js index d35f95f9..ea4c041a 100644 --- a/scenes/SceneFilesFolder.js +++ b/scenes/SceneFilesFolder.js @@ -244,7 +244,7 @@ export default class SceneFilesFolder extends React.Component {
    {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"}
    @@ -467,7 +467,9 @@ class SlatePage extends React.Component {
    -
    Drag and drop files to add them to this slate
    +
    + Drag and drop files to add them to this collection +
    ) : ( diff --git a/scenes/SceneSlates.js b/scenes/SceneSlates.js index 223f85ac..4c1ca8f8 100644 --- a/scenes/SceneSlates.js +++ b/scenes/SceneSlates.js @@ -41,7 +41,7 @@ export default class SceneSlates extends React.Component {
    - Use slates to create mood boards, share files, and organize research. + Use collections to create mood boards, share files, and organize research.
    - Create slate + Create collection ) @@ -120,9 +120,9 @@ export default class SceneSlates extends React.Component { /> ) : ( - You can follow any public slates on the network. + You can follow any public collections on the network. - Browse slates + Browse collections )