Removes Testnet vocabulary used on Slate

This commit is contained in:
jimmylee 2020-10-18 12:57:39 -07:00
parent ba5037da21
commit 361a387941
6 changed files with 72 additions and 136 deletions

View File

@ -34,9 +34,7 @@ const STYLES_WARNING = css`
${STYLES_ALERT}
background-color: ${Constants.system.red};
@supports (
(-webkit-backdrop-filter: blur(25px)) or (backdrop-filter: blur(25px))
) {
@supports ((-webkit-backdrop-filter: blur(25px)) or (backdrop-filter: blur(25px))) {
-webkit-backdrop-filter: blur(25px);
backdrop-filter: blur(25px);
background-color: rgba(255, 212, 201, 0.75);
@ -48,9 +46,7 @@ const STYLES_INFO = css`
${STYLES_ALERT}
background-color: ${Constants.system.brand};
@supports (
(-webkit-backdrop-filter: blur(25px)) or (backdrop-filter: blur(25px))
) {
@supports ((-webkit-backdrop-filter: blur(25px)) or (backdrop-filter: blur(25px))) {
-webkit-backdrop-filter: blur(25px);
backdrop-filter: blur(25px);
background-color: rgba(212, 233, 250, 0.75);
@ -63,9 +59,7 @@ const STYLES_MESSAGE = css`
background-color: ${Constants.system.foreground};
color: ${Constants.system.grayBlack};
@supports (
(-webkit-backdrop-filter: blur(25px)) or (backdrop-filter: blur(25px))
) {
@supports ((-webkit-backdrop-filter: blur(25px)) or (backdrop-filter: blur(25px))) {
-webkit-backdrop-filter: blur(25px);
backdrop-filter: blur(25px);
background-color: rgba(244, 244, 244, 0.75);
@ -78,9 +72,7 @@ const STYLES_TEXT = css`
max-width: ${Constants.sizes.mobile}px;
width: 100%;
@supports (
(-webkit-backdrop-filter: blur(25px)) or (backdrop-filter: blur(25px))
) {
@supports ((-webkit-backdrop-filter: blur(25px)) or (backdrop-filter: blur(25px))) {
border-bottom: 1px solid ${Constants.system.brand};
}
`;
@ -113,9 +105,7 @@ export class Alert extends React.Component {
});
} else {
this.setState({
message:
e.detail.alert.message ||
"Whoops something went wrong! Please try again.",
message: e.detail.alert.message || "Whoops something went wrong! Please try again.",
status: e.detail.alert.status || null,
});
}
@ -131,31 +121,16 @@ export class Alert extends React.Component {
render() {
if (!this.state.message) {
if (
!this.props.fileLoading ||
!Object.keys(this.props.fileLoading).length
) {
if (!this.props.fileLoading || !Object.keys(this.props.fileLoading).length) {
if (this.props.noWarning) {
return null;
}
// NOTE(jim): Replaces the filecoin banner on some navigation pages.
if (this.props.filecoin) {
return (
<div css={STYLES_MESSAGE} style={this.props.style}>
<div css={STYLES_MESSAGE_BOX} style={{ fontSize: 14 }}>
You are on the Filecoin Testnet. Test FIL may take a moment to
reach your wallet.
</div>
</div>
);
}
return (
<div css={STYLES_MESSAGE} style={this.props.style}>
<div css={STYLES_MESSAGE_BOX} style={{ fontSize: 14 }}>
Please don't upload sensitive information to Slate yet. Private
storage is coming soon.
Please don't upload sensitive information to Slate yet. Private storage is coming
soon.
</div>
</div>
);

View File

@ -7,10 +7,8 @@ import * as Strings from "~/common/strings";
import { css } from "@emotion/react";
import { LoaderSpinner } from "~/components/system/components/Loaders";
import Section from "~/components/core/Section";
import ScenePage from "~/components/core/ScenePage";
import ScenePageHeader from "~/components/core/ScenePageHeader";
import TestnetBanner from "~/components/core/TestnetBanner";
const STYLES_LABEL = css`
font-family: ${Constants.font.semiBold};
@ -23,12 +21,9 @@ let mounted = false;
export default class SceneArchive extends React.Component {
state = {
networkViewer: null,
allow_filecoin_directory_listing: this.props.viewer
.allow_filecoin_directory_listing,
allow_automatic_data_storage: this.props.viewer
.allow_automatic_data_storage,
allow_encrypted_data_storage: this.props.viewer
.allow_encrypted_data_storage,
allow_filecoin_directory_listing: this.props.viewer.allow_filecoin_directory_listing,
allow_automatic_data_storage: this.props.viewer.allow_automatic_data_storage,
allow_encrypted_data_storage: this.props.viewer.allow_encrypted_data_storage,
};
async componentDidMount() {
@ -58,8 +53,7 @@ export default class SceneArchive extends React.Component {
await Actions.updateViewer({
data: {
allow_filecoin_directory_listing: this.state
.allow_filecoin_directory_listing,
allow_filecoin_directory_listing: this.state.allow_filecoin_directory_listing,
allow_automatic_data_storage: this.state.allow_automatic_data_storage,
allow_encrypted_data_storage: this.state.allow_encrypted_data_storage,
},
@ -102,9 +96,8 @@ export default class SceneArchive extends React.Component {
return (
<ScenePage>
<ScenePageHeader title="Filecoin">
Use this section to archive all of your data on to Filecoin through a
storage deal. Once you make a storage deal, you can view the logs
here. <br />
Use this section to archive all of your data on to Filecoin through a storage deal. Once
you make a storage deal, you can view the logs here. <br />
</ScenePageHeader>
{this.state.networkViewer ? (
@ -133,8 +126,7 @@ export default class SceneArchive extends React.Component {
value={this.state.allow_filecoin_directory_listing}
onChange={this._handleCheckboxChange}
>
Show your successful deals on a directory page where others can
retrieve them.
Show your successful deals on a directory page where others can retrieve them.
</System.CheckBox>
<System.CheckBox
@ -143,8 +135,8 @@ export default class SceneArchive extends React.Component {
value={this.state.allow_automatic_data_storage}
onChange={this._handleCheckboxChange}
>
Allow Slate to make archive storage deals on your behalf to the
Filecoin Network. You will get a receipt in the Filecoin section.
Allow Slate to make archive storage deals on your behalf to the Filecoin Network. You
will get a receipt in the Filecoin section.
</System.CheckBox>
<System.CheckBox
@ -153,8 +145,8 @@ export default class SceneArchive extends React.Component {
value={this.state.allow_encrypted_data_storage}
onChange={this._handleCheckboxChange}
>
Force encryption on archive storage deals (only you can see
retrieved data from the Filecoin network).
Force encryption on archive storage deals (only you can see retrieved data from the
Filecoin network).
</System.CheckBox>
<div style={{ marginTop: 24 }}>

View File

@ -17,7 +17,6 @@ import { dispatchCustomEvent } from "~/common/custom-events";
import Section from "~/components/core/Section";
import ScenePage from "~/components/core/ScenePage";
import ScenePageHeader from "~/components/core/ScenePageHeader";
import TestnetBanner from "~/components/core/TestnetBanner";
const STAGING_DEAL_BUCKET = "stage-deal";
@ -58,8 +57,7 @@ const STYLES_RIGHT = css`
}
`;
const DEFAULT_ERROR_MESSAGE =
"We could not make your deal. Please try again later.";
const DEFAULT_ERROR_MESSAGE = "We could not make your deal. Please try again later.";
let mounted = false;
export default class SceneMakeFilecoinDeal extends React.Component {
@ -391,8 +389,7 @@ export default class SceneMakeFilecoinDeal extends React.Component {
/>
<ScenePageHeader title="Make an one-off Filecoin Storage Deal">
Upload data and make one-off storage deals in the Filecoin network
here.
Upload data and make one-off storage deals in the Filecoin network here.
</ScenePageHeader>
{this.state.networkViewer ? (
@ -436,10 +433,7 @@ export default class SceneMakeFilecoinDeal extends React.Component {
<span css={STYLES_LEFT} target="_blank">
{file.cid}
</span>
<span
css={STYLES_RIGHT}
onClick={() => this._handleRemove(file.cid)}
>
<span css={STYLES_RIGHT} onClick={() => this._handleRemove(file.cid)}>
<SVG.Dismiss height="16px" />
</span>
</div>
@ -475,27 +469,23 @@ export default class SceneMakeFilecoinDeal extends React.Component {
width: "100%",
},
],
rows: this.state.settings_cold_default_trusted_miners.map(
(miner) => {
return {
miner: (
<div css={STYLES_ROW} key={miner}>
<span css={STYLES_LEFT} target="_blank">
{miner}
</span>
<span
css={STYLES_RIGHT}
onClick={() =>
this._handleRemoveTrustedMiner(miner)
}
>
<SVG.Dismiss height="16px" />
</span>
</div>
),
};
}
),
rows: this.state.settings_cold_default_trusted_miners.map((miner) => {
return {
miner: (
<div css={STYLES_ROW} key={miner}>
<span css={STYLES_LEFT} target="_blank">
{miner}
</span>
<span
css={STYLES_RIGHT}
onClick={() => this._handleRemoveTrustedMiner(miner)}
>
<SVG.Dismiss height="16px" />
</span>
</div>
),
};
}),
}}
/>
</Section>
@ -518,27 +508,23 @@ export default class SceneMakeFilecoinDeal extends React.Component {
width: "100%",
},
],
rows: this.state.settings_cold_default_excluded_miners.map(
(miner) => {
return {
miner: (
<div css={STYLES_ROW} key={miner}>
<span css={STYLES_LEFT} target="_blank">
Excluding: {miner}
</span>
<span
css={STYLES_RIGHT}
onClick={() =>
this._handleRemoveExcludedMiner(miner)
}
>
<SVG.Dismiss height="16px" />
</span>
</div>
),
};
}
),
rows: this.state.settings_cold_default_excluded_miners.map((miner) => {
return {
miner: (
<div css={STYLES_ROW} key={miner}>
<span css={STYLES_LEFT} target="_blank">
Excluding: {miner}
</span>
<span
css={STYLES_RIGHT}
onClick={() => this._handleRemoveExcludedMiner(miner)}
>
<SVG.Dismiss height="16px" />
</span>
</div>
),
};
}),
}}
/>
</Section>
@ -546,9 +532,7 @@ export default class SceneMakeFilecoinDeal extends React.Component {
<System.DescriptionGroup
style={{ marginTop: 64, maxWidth: 688 }}
label="Configure your deal"
description={`Your deal will come out of your wallet address: ${
this.state.settings_cold_default_address
}`}
description={`Your deal will come out of your wallet address: ${this.state.settings_cold_default_address}`}
/>
<System.Input
@ -597,8 +581,7 @@ export default class SceneMakeFilecoinDeal extends React.Component {
value={this.state.encryption}
onChange={this._handleChange}
>
Encrypt this storage deal. Accessing the contents will require
decryption.
Encrypt this storage deal. Accessing the contents will require decryption.
</System.CheckBox>
<System.ButtonPrimary

View File

@ -39,11 +39,11 @@ export default class SceneSentinel extends React.Component {
return (
<ScenePage>
<ScenePageHeader title="Network API">
Slate provides access to live data on the Filecoin Testnet Network through Sentinel. Each
of these API endpoints can be used programatically.
Slate provides access to recent data on the Filecoin Network through Sentinel. Each of
these API endpoints can be used programatically.
</ScenePageHeader>
<Section title="Filecoin Testnet API routes" style={{ maxWidth: 960, minWidth: "auto" }}>
<Section title="Filecoin API routes" style={{ maxWidth: 960, minWidth: "auto" }}>
<System.Table
data={{
columns: [

View File

@ -6,10 +6,8 @@ import * as Strings from "~/common/strings";
import { css } from "@emotion/react";
import { LoaderSpinner } from "~/components/system/components/Loaders";
import Section from "~/components/core/Section";
import ScenePage from "~/components/core/ScenePage";
import ScenePageHeader from "~/components/core/ScenePageHeader";
import TestnetBanner from "~/components/core/TestnetBanner";
const STYLES_GROUP = css`
display: flex;
@ -49,14 +47,11 @@ export const createState = (config) => {
settings_cold_default_address: config.cold.filecoin.addr,
settings_cold_default_duration: config.cold.filecoin.dealMinDuration,
settings_cold_default_replication_factor: config.cold.filecoin.repFactor,
settings_cold_default_excluded_miners:
config.cold.filecoin.excludedMinersList,
settings_cold_default_trusted_miners:
config.cold.filecoin.trustedMinersList,
settings_cold_default_excluded_miners: config.cold.filecoin.excludedMinersList,
settings_cold_default_trusted_miners: config.cold.filecoin.trustedMinersList,
settings_cold_default_max_price: config.cold.filecoin.maxPrice,
settings_cold_default_auto_renew: config.cold.filecoin.renew.enabled,
settings_cold_default_auto_renew_max_price:
config.cold.filecoin.renew.threshold,
settings_cold_default_auto_renew_max_price: config.cold.filecoin.renew.threshold,
};
};
@ -111,8 +106,7 @@ export default class SceneSettings extends React.Component {
addr: this.state.settings_cold_default_address,
dealMinDuration: this.state.settings_cold_default_duration,
repFactor: this.state.settings_cold_default_replication_factor,
excludedMinersList: this.state
.settings_cold_default_excluded_miners,
excludedMinersList: this.state.settings_cold_default_excluded_miners,
trustedMinersList: this.state.settings_cold_default_trusted_miners,
maxPrice: this.state.settings_cold_default_max_price,
renew: {
@ -137,8 +131,8 @@ export default class SceneSettings extends React.Component {
return (
<ScenePage>
<ScenePageHeader title="Deal settings (read-only)">
We do not allow changes to your deal settings at the moment. This is
to ensure that your storage deals have the maximum chance of success.
We do not allow changes to your deal settings at the moment. This is to ensure that your
storage deals have the maximum chance of success.
</ScenePageHeader>
{this.state.networkViewer ? (

View File

@ -11,7 +11,6 @@ import { LoaderSpinner } from "~/components/system/components/Loaders";
import Section from "~/components/core/Section";
import ScenePage from "~/components/core/ScenePage";
import ScenePageHeader from "~/components/core/ScenePageHeader";
import TestnetBanner from "~/components/core/TestnetBanner";
const STYLES_GROUP = css`
padding: 24px;
@ -163,14 +162,13 @@ export default class SceneWallet extends React.Component {
return (
<ScenePage>
<ScenePageHeader title="Wallet">
This is your receive only wallet address. You can deposit Filecoin to
your address here.
This is your receive only wallet address. You can deposit Filecoin to your address here.
</ScenePageHeader>
{networkViewer ? (
<Section
onAction={this.props.onAction}
title="Your Filecoin Testnet address"
title="Your Filecoin address"
style={{ maxWidth: `688px`, minWidth: "auto" }}
buttons={
[
@ -211,8 +209,7 @@ export default class SceneWallet extends React.Component {
<div style={{ marginTop: 24 }}>
<div css={STYLES_FOCUS}>
{selected.name}{" "}
{networkViewer.settings_cold_default_address ===
selected.addr ? (
{networkViewer.settings_cold_default_address === selected.addr ? (
<strong css={STYLES_FOCUS_EMPAHSIS}>(Primary)</strong>
) : null}
</div>
@ -239,17 +236,12 @@ export default class SceneWallet extends React.Component {
onClick={this._handleMakeAddressVisible}
style={{
marginRight: 16,
backgroundColor: this.state.visible
? null
: Constants.system.brand,
backgroundColor: this.state.visible ? null : Constants.system.brand,
}}
>
<SVG.Privacy height="16px" />
</span>
<span
css={STYLES_CIRCLE_BUTTON}
onClick={() => this._handleCopy(selected.address)}
>
<span css={STYLES_CIRCLE_BUTTON} onClick={() => this._handleCopy(selected.address)}>
<SVG.CopyAndPaste height="16px" />
</span>
</div>