mirror of
https://github.com/filecoin-project/slate.git
synced 2024-09-11 22:07:08 +03:00
design system: cleanup, adds license
This commit is contained in:
parent
c5241e00f9
commit
f0dcd556ad
19
LICENSE-MIT
Normal file
19
LICENSE-MIT
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
@ -49,12 +49,12 @@ const STYLES_ICON_ELEMENT = css`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const STYLES_ICON_ELEMENT_CUSTOM = css`
|
const STYLES_ICON_ELEMENT_CUSTOM = css`
|
||||||
|
background-color: ${Constants.system.brand};
|
||||||
height: 48px;
|
height: 48px;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: ${Constants.system.black};
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
`;
|
`;
|
||||||
|
@ -24,16 +24,12 @@ const STYLES_BODY = css`
|
|||||||
const STYLES_ICON_ELEMENT = css`
|
const STYLES_ICON_ELEMENT = css`
|
||||||
height: 88px;
|
height: 88px;
|
||||||
width: 88px;
|
width: 88px;
|
||||||
border-radius: 88px;
|
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: ${Constants.system.brand};
|
background-color: ${Constants.system.brand};
|
||||||
color: ${Constants.system.white};
|
color: ${Constants.system.white};
|
||||||
user-select: none;
|
user-select: none;
|
||||||
background-image: url("/public/static/cube_f7f7f7.jpg");
|
|
||||||
background-size: cover;
|
|
||||||
background-position: 50% 50%;
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const STYLES_SIDEBAR = css`
|
const STYLES_SIDEBAR = css`
|
||||||
@ -189,35 +185,35 @@ export default class SystemPage extends React.Component {
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
<span css={STYLES_LABEL}>Experiences</span>
|
<span css={STYLES_LABEL}>Experiences</span>
|
||||||
<SidebarLink
|
|
||||||
url={url}
|
|
||||||
href="/experiences/peers-list"
|
|
||||||
title="Peers List"
|
|
||||||
/>
|
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
url={url}
|
url={url}
|
||||||
href="/experiences/create-address"
|
href="/experiences/create-address"
|
||||||
title="Create Filecoin Address"
|
title="CreateFilecoinAddress"
|
||||||
/>
|
/>
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
url={url}
|
url={url}
|
||||||
href="/experiences/make-storage-deal"
|
href="/experiences/make-storage-deal"
|
||||||
title="Make a Storage Deal"
|
title="CreateFilecoinStorageDeal"
|
||||||
/>
|
/>
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
url={url}
|
url={url}
|
||||||
href="/experiences/generate-powergate-token"
|
href="/experiences/generate-powergate-token"
|
||||||
title="Generate Powergate token"
|
title="CreateToken"
|
||||||
/>
|
|
||||||
<SidebarLink
|
|
||||||
url={url}
|
|
||||||
href="/experiences/send-address-filecoin"
|
|
||||||
title="Send an Address Filecoin"
|
|
||||||
/>
|
/>
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
url={url}
|
url={url}
|
||||||
href="/experiences/filecoin-wallet-balances"
|
href="/experiences/filecoin-wallet-balances"
|
||||||
title="Filecoin Wallet Balances"
|
title="FilecoinBalancesList"
|
||||||
|
/>
|
||||||
|
<SidebarLink
|
||||||
|
url={url}
|
||||||
|
href="/experiences/peers-list"
|
||||||
|
title="PeersList"
|
||||||
|
/>
|
||||||
|
<SidebarLink
|
||||||
|
url={url}
|
||||||
|
href="/experiences/send-address-filecoin"
|
||||||
|
title="SendAddressFilecoin"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span css={STYLES_LABEL}>
|
<span css={STYLES_LABEL}>
|
||||||
@ -254,16 +250,7 @@ export default class SystemPage extends React.Component {
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
css={STYLES_SMALL_LINK}
|
css={STYLES_SMALL_LINK}
|
||||||
onClick={() => {
|
|
||||||
window.open("https://filscan.io/");
|
|
||||||
}}
|
|
||||||
style={{ marginTop: 48 }}
|
style={{ marginTop: 48 }}
|
||||||
>
|
|
||||||
<SVG.ExpandBox height="12px" style={{ marginRight: 10 }} />
|
|
||||||
Block Explorer
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
css={STYLES_SMALL_LINK}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.open("https://github.com/filecoin-project/slate");
|
window.open("https://github.com/filecoin-project/slate");
|
||||||
}}
|
}}
|
||||||
|
@ -76,6 +76,40 @@ export default class SystemPageRoot extends React.Component {
|
|||||||
{`import { ButtonPrimary } from 'slate-react-system'
|
{`import { ButtonPrimary } from 'slate-react-system'
|
||||||
|
|
||||||
const Component = () => <ButtonPrimary>Hello World</ButtonPrimary>`}
|
const Component = () => <ButtonPrimary>Hello World</ButtonPrimary>`}
|
||||||
|
</System.CodeBlock>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
And easily integrate Powergate <br />
|
||||||
|
<br />
|
||||||
|
<System.CodeBlock>
|
||||||
|
{`import * as React from 'react';
|
||||||
|
import * as System from 'slate-react-system';
|
||||||
|
import { createPow } from "@textile/powergate-client";
|
||||||
|
|
||||||
|
class Example extends React.Component {
|
||||||
|
_PG = null;
|
||||||
|
|
||||||
|
state = {
|
||||||
|
token: null
|
||||||
|
}
|
||||||
|
|
||||||
|
_handleCreateToken = () => {
|
||||||
|
this._PG = createPow({ host: 'http://0.0.0.0:6002' });
|
||||||
|
const FFS = await this._PG.ffs.create();
|
||||||
|
const token = FFS.token ? FFS.token : null;
|
||||||
|
PowerGate.setToken(token);
|
||||||
|
this.setState({ token });
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<System.CreateToken
|
||||||
|
token={this.state.token}
|
||||||
|
onClick={this._handleCreateToken} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`}
|
||||||
</System.CodeBlock>
|
</System.CodeBlock>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
@ -106,48 +140,7 @@ const Component = () => <ButtonPrimary>Hello World</ButtonPrimary>`}
|
|||||||
.
|
.
|
||||||
</System.LI>
|
</System.LI>
|
||||||
</System.UL>
|
</System.UL>
|
||||||
<br /> <br /> <br />
|
<br /> <br />
|
||||||
<System.H2>How do I use Slate?</System.H2>
|
|
||||||
<br />
|
|
||||||
<System.P>
|
|
||||||
If you are running this{" "}
|
|
||||||
<a href="https://github.com/filecoin-project/slate" target="_blank">
|
|
||||||
repository locally
|
|
||||||
</a>
|
|
||||||
, visit https://localhost:1337 in your browser. If you are redirected
|
|
||||||
here, that means you have not followed all of the instructions or
|
|
||||||
something went wrong on our end.
|
|
||||||
</System.P>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<System.H2>License</System.H2>
|
|
||||||
<br />
|
|
||||||
<System.P>
|
|
||||||
Copyright © 2020 Protocol Labs
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
</System.P>
|
|
||||||
</SystemPage>
|
</SystemPage>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user