navigation: adds developer API to sidebar instead

This commit is contained in:
@wwwjim 2020-07-28 16:24:15 -07:00
parent 47a0e5dc8c
commit ed09ee9129
6 changed files with 43 additions and 18 deletions

View File

@ -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: [],
},
];

View File

@ -1,3 +1,26 @@
export const SettingsDeveloper = (props) => {
return (
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
height={props.height}
style={props.style}
>
<g
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="m18.25 2.251c-1.061 1.061-3.04.96-4.75-.75l-1.5 1.499 8 8 3.5-3.5z" />
<path d="m11.939 9.94-3.793-3.792.00000007-.00000015c.910118-2.01295.0160937-4.38257-1.99686-5.29269-1.04732-.473526-2.24773-.473639-3.29514-.00031106l2.146 2.145v2h-2l-2.146-2.145.00000008-.00000019c-.910118 2.01295-.0160941 4.38257 1.99686 5.29269 1.04732.473526 2.24773.47364 3.29514.00031136l3.793 3.792" />
<path d="m12.061 14.062 3.793 3.793.00000008-.00000019c-.910118 2.01295-.0160941 4.38257 1.99686 5.29269 1.04732.473526 2.24773.47364 3.29514.00031136l-2.146-2.148v-2h2l2.146 2.147.00000007-.00000015c.910118-2.01295.0160937-4.38257-1.99686-5.29269-1.04732-.473526-2.24773-.473639-3.29514-.00031106l-3.793-3.793" />
<path d="m15.439 6.44-14.5 14.5.00000001-.00000001c-.585974.585974-.585974 1.53603.00000001 2.122.585974.585974 1.53603.585974 2.122-.00000001l14.5-14.5" />
</g>
</svg>
);
};
export const ProfileUser = (props) => {
return (
<svg

View File

@ -166,9 +166,8 @@ export default class ApplicationHeader extends React.Component {
onAction={this.props.onAction}
onSignOut={this.props.onSignOut}
navigation={[
{ text: "Edit account", value: 13 },
{ text: "Profile & account settings", value: 13 },
{ text: "Filecoin settings", value: 14 },
{ text: "API Key & Tokens", value: 16 },
{ text: "Sign out", value: 0, action: "SIGN_OUT" },
]}
/>

View File

@ -26,6 +26,7 @@ const IconMap = {
SLATE: <SVG.Slates height="20px" />,
LOCAL_DATA: <SVG.HardDrive height="20px" />,
PROFILE_PAGE: <SVG.ProfileUser height="20px" />,
SETTINGS_DEVELOPER: <SVG.SettingsDeveloper height="20px" />,
};
const STYLES_NAVIGATION = css`

View File

@ -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}`,
});
});
};

View File

@ -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 {