Skip to content

Commit

Permalink
Merge pull request #24 from PortalNetwork/develop
Browse files Browse the repository at this point in the history
v0.1.2
  • Loading branch information
PhyrexTsai authored Oct 18, 2018
2 parents 2bd26e6 + 7985831 commit af19aef
Show file tree
Hide file tree
Showing 14 changed files with 28,881 additions and 25 deletions.
6 changes: 5 additions & 1 deletion src/components/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ table {
img {
display: block; }

@font-face {
font-family: "SFProText";
src: url("../font/SFProText-Regular.ttf"); }

a, h1, h2, h3, h4, h5, h6, span, p, a, input, label, button, div, span {
font-family: sans-serif, 'Arial', 'Microsoft JhengHei';
font-family: "SFProText", 'Arial', sans-serif;
font-size: 14px;
font-weight: 400; }

Expand Down
4 changes: 2 additions & 2 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SearchBar from './SearchBar/SearchBar';
import { Warning } from './Warning/Warning';
import Connect from './Connect/Connect';
import './App.css';
import logo from '../images/logo.png';
import logo from '../images/ic-ens-manager.svg';
import Clients from '../components/Clients';
import Footer from '../components/Footer';
import SetResolver from "./SetResolver";
Expand Down Expand Up @@ -181,7 +181,7 @@ class App extends Component {


</FilterDiv>
{isEditResover && <SetResolver EditResCloseFn={this.EditResCloseFn} reoverData={reoverData} />}
{isEditResover && <SetResolver EditResCloseFn={this.EditResCloseFn} reoverData={reoverData}/>}
{isTransferOwner && <TransferOwnerPop TransferOwnerClose={this.TransferOwnerClose} reoverData={reoverData}/>}
{isSetSubdomain && <SetSubdomainPop SetSubdomainPopClose={this.SetSubdomainPopClose} reoverData={reoverData}/>}
{isSetAddress && <SetAddressPop SetAddressClose={this.SetAddressClose} reoverData={reoverData}/>}
Expand Down
10 changes: 8 additions & 2 deletions src/components/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,14 @@ img {
display: block;
}


@font-face {
font-family: "SFProText";
src: url("../font/SFProText-Regular.ttf");
}

a,h1,h2,h3,h4,h5,h6,span,p,a,input,label,button,div,span {
font-family: sans-serif, 'Arial', 'Microsoft JhengHei';
font-family: "SFProText", 'Arial', sans-serif;
font-size: 14px;
font-weight: 400;
}
Expand Down Expand Up @@ -135,4 +141,4 @@ body {
color: #ffffff;
font-size: 12px;
}
}
}
16 changes: 9 additions & 7 deletions src/components/SetAddressPop/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default class extends Component {
return;
}

const { searchValue, metaMask, web3 } = this.props.reoverData;
const { searchValue, metaMask, web3, handleWarningOpen } = this.props.reoverData;
const to = getEthereumResolverAddress();
const addressData = setAddress(searchValue, this.state.address);

Expand All @@ -113,16 +113,18 @@ export default class extends Component {
value: 0,
data: addressData
}, (err, result)=> {
if (err) return alert(err.message);
alert("Success");
window.open(getEtherscanUrl(result));
if (err) return handleWarningOpen(err.message);
// alert("Success");
// window.open(getEtherscanUrl(result));
this.props.SetAddressClose();
// const tx = <span className="tx">Tx: <a href={`https://etherscan.io/tx/${result}`} target="_blank">{result}</a></span>;
// this.props.handleWarningOpen(tx);
const tx = <span className="tx">Tx: <a href={getEtherscanUrl(result)} target="_blank">{result}</a></span>;
handleWarningOpen(tx);
});
}


componentDidMount(){
console.log(this.props);
}

SetDefaultBtn = (account) =>{
this.setState({address: account},()=> this.handleSetAddress());
Expand Down
10 changes: 6 additions & 4 deletions src/components/SetIpfsPop/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class extends Component {
return;
}

const { metaMask, web3, searchValue } = this.props.reoverData;
const { metaMask, web3, searchValue, handleWarningOpen } = this.props.reoverData;
const to = getEthereumResolverAddress();
const ipfsData = setContent(searchValue, this.state.hash);
web3.eth.sendTransaction({
Expand All @@ -104,10 +104,12 @@ export default class extends Component {
value: 0,
data: ipfsData
},(err, result)=> {
if (err) return alert(err.message);
alert("Success");
window.open(getEtherscanUrl(result));
if (err) return handleWarningOpen(err.message);
// alert("Success");
// window.open(getEtherscanUrl(result));
this.props.SetIpfsClose();
const tx = <span className="tx">Tx: <a href={getEtherscanUrl(result)} target="_blank">{result}</a></span>;
handleWarningOpen(tx);
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/SetResolver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default class extends Component {
}, (err, result)=> {
if (err) {
EditResCloseFn();
return alert(err.message);
return handleWarningOpen(err.message);
}
const tx = <span className="tx">Tx: <a href={getEtherscanUrl(result)} target="_blank">{result}</a></span>;
EditResCloseFn();
Expand Down
10 changes: 6 additions & 4 deletions src/components/SetSubdomainPop/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default class extends Component {

handleSetSubnodeOwner = () => {
if (/[a-zA-Z0-9]+/g.test(this.state.subnode) === false) return alert('Subdomain incorrect');
const { searchValue, metaMask, web3, owner } = this.props.reoverData;
const { searchValue, metaMask, web3, owner, handleWarningOpen } = this.props.reoverData;
const to = getEthereumRegistryAddress();
const subnodeData = setSubnodeOwner(searchValue, this.state.subnode, owner);

Expand All @@ -103,10 +103,12 @@ export default class extends Component {
value: 0,
data: subnodeData
},(err, result)=> {
if (err) return alert(err.message);
alert("Success");
window.open(getEtherscanUrl(result));
if (err) return handleWarningOpen(err.message);
// alert("Success");
// window.open(getEtherscanUrl(result));
this.props.SetSubdomainPopClose();
const tx = <span className="tx">Tx: <a href={getEtherscanUrl(result)} target="_blank">{result}</a></span>;
handleWarningOpen(tx);
});

}
Expand Down
10 changes: 6 additions & 4 deletions src/components/TransferOwnerPop/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class extends Component {
seedTransFerAddress = () =>{
if(this.state.address === "") return alert("Address must not be empty");
if(this.state.address.length < 42) return alert("Address format error");
const { searchValue, web3, metaMask } = this.props.reoverData;
const { searchValue, web3, metaMask, handleWarningOpen } = this.props.reoverData;
const to = getEthereumRegistrarAddress();
const subnodeData = transfer(searchValue.replace(".eth", ""), this.state.address);
web3.eth.sendTransaction({
Expand All @@ -127,10 +127,12 @@ export default class extends Component {
value: 0,
data: subnodeData
},(err, result)=> {
if (err) return alert(err.message);
alert("Success");
window.open(getEtherscanUrl(result));
if (err) return handleWarningOpen(err.message);
// alert("Success");
// window.open(getEtherscanUrl(result));
this.props.TransferOwnerClose();
const tx = <span className="tx">Tx: <a href={getEtherscanUrl(result)} target="_blank">{result}</a></span>;
handleWarningOpen(tx);
});
}

Expand Down
Binary file added src/font/SFProText-Regular.eot
Binary file not shown.
Binary file added src/font/SFProText-Regular.otf
Binary file not shown.
Loading

0 comments on commit af19aef

Please sign in to comment.