From ed09ee9129168bb6d160c07209e0f3b46fc50ecb Mon Sep 17 00:00:00 2001 From: "@wwwjim" Date: Tue, 28 Jul 2020 16:24:15 -0700 Subject: [PATCH] navigation: adds developer API to sidebar instead --- common/navigation-data.js | 31 ++++++++++++------------ common/svg.js | 23 ++++++++++++++++++ components/core/ApplicationHeader.js | 3 +-- components/core/ApplicationNavigation.js | 1 + pages/api/v1/upload-data/[id].js | 1 + scenes/SceneSettingsDeveloper.js | 2 ++ 6 files changed, 43 insertions(+), 18 deletions(-) diff --git a/common/navigation-data.js b/common/navigation-data.js index 2e2eb12b..d9db9762 100644 --- a/common/navigation-data.js +++ b/common/navigation-data.js @@ -73,7 +73,7 @@ export const generate = ({ library = [], slates = [] }) => [ { id: 3, name: "Slates", - pageTitle: "Your slates", + pageTitle: "Slates", decorator: "SLATES", children: constructSlatesTreeForNavigation(slates), }, @@ -82,22 +82,15 @@ export const generate = ({ library = [], slates = [] }) => [ { id: 4, name: "Local", - pageTitle: "Your local data", + pageTitle: "Local data", decorator: "LOCAL_DATA", children: [], - ignore: true, - }, - { - id: 5, - name: "Profile", - pageTitle: "Your local data", - decorator: "PROFILE_PAGE", - children: [], + ignore: true, //re-enable here. }, { id: 13, - name: "Edit account", - pageTitle: "your account", + name: "Profile & Account Settings", + pageTitle: "Your Profile & Account Settings", decorator: "EDIT_ACCOUNT", children: null, ignore: true, @@ -105,7 +98,7 @@ export const generate = ({ library = [], slates = [] }) => [ { id: 14, name: "Filecoin Settings", - pageTitle: "Your hot and cold deal settings.", + pageTitle: "Filecoin Settings.", decorator: "SETTINGS", children: null, ignore: true, @@ -120,11 +113,10 @@ export const generate = ({ library = [], slates = [] }) => [ }, { id: 16, - name: "API Key & Tokens", - pageTitle: "you", + name: "Developer API", + pageTitle: "Developer API", decorator: "SETTINGS_DEVELOPER", children: null, - ignore: true, }, { id: 17, @@ -134,4 +126,11 @@ export const generate = ({ library = [], slates = [] }) => [ children: null, ignore: true, }, + { + id: 5, + name: "Profile", + pageTitle: "Profile Page", + decorator: "PROFILE_PAGE", + children: [], + }, ]; diff --git a/common/svg.js b/common/svg.js index 506bfcf0..b77571e2 100644 --- a/common/svg.js +++ b/common/svg.js @@ -1,3 +1,26 @@ +export const SettingsDeveloper = (props) => { + return ( + + + + + + + + + ); +}; + export const ProfileUser = (props) => { return ( diff --git a/components/core/ApplicationNavigation.js b/components/core/ApplicationNavigation.js index 68c9a7c3..a2eb134b 100644 --- a/components/core/ApplicationNavigation.js +++ b/components/core/ApplicationNavigation.js @@ -26,6 +26,7 @@ const IconMap = { SLATE: , LOCAL_DATA: , PROFILE_PAGE: , + SETTINGS_DEVELOPER: , }; const STYLES_NAVIGATION = css` diff --git a/pages/api/v1/upload-data/[id].js b/pages/api/v1/upload-data/[id].js index b2fdc49f..8defe85a 100644 --- a/pages/api/v1/upload-data/[id].js +++ b/pages/api/v1/upload-data/[id].js @@ -176,6 +176,7 @@ export default async (req, res) => { decorator: "V1_UPLOAD_DATA_TO_SLATE", data: updated, slate: update, + url: `https://hub.textile.io${updated.ipfs}`, }); }); }; diff --git a/scenes/SceneSettingsDeveloper.js b/scenes/SceneSettingsDeveloper.js index 765642cb..b5512fea 100644 --- a/scenes/SceneSettingsDeveloper.js +++ b/scenes/SceneSettingsDeveloper.js @@ -152,6 +152,8 @@ const response = await fetch(url, { }); const json = await response.json(); + +// NOTE: you will receive a url you can use right away. console.log(json);`; export default class SceneSettingsDeveloper extends React.Component {