mirror of
https://github.com/stronk-dev/LivepeerEvents.git
synced 2025-07-05 10:45:10 +02:00
Hide Orch info if selected address is not an O
This commit is contained in:
parent
019f8ddb3b
commit
a36125a842
@ -122,22 +122,22 @@ class Livepeer extends React.Component {
|
|||||||
eventsList = this.props.livepeer.events;
|
eventsList = this.props.livepeer.events;
|
||||||
}
|
}
|
||||||
|
|
||||||
let thisOrchObj = this.props.livepeer.thisOrchestrator;
|
let thisOrchObj;
|
||||||
if (this.props.livepeer.selectedOrchestrator){
|
if (this.props.livepeer.selectedOrchestrator) {
|
||||||
thisOrchObj = this.props.livepeer.selectedOrchestrator;
|
thisOrchObj = this.props.livepeer.selectedOrchestrator;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ width: '100%', height: '100%' }}>
|
<div style={{ width: '100%', height: '100%' }}>
|
||||||
<div className="row" style={{ margin: 0, padding: 0, backgroundColor: "rgba(180, 175, 252, 0.80)", boxSizing: "border-box", backdropDilter: "blur(6px)", boxSshadow: "9px 13px 18px 8px rgba(8, 7, 56, 0.692)", position: 'absolute', top: '0px', left: '0px', height: '300px', right: '0px', overflow: 'hidden' }}>
|
<div className="row" style={{ margin: 0, padding: 0, backgroundColor: "rgba(180, 175, 252, 0.80)", boxSizing: "border-box", backdropDilter: "blur(6px)", boxSshadow: "9px 13px 18px 8px rgba(8, 7, 56, 0.692)", position: 'absolute', top: '0px', left: '0px', height: '300px', right: '0px', overflow: 'hidden' }}>
|
||||||
<div className="row" style={{ margin: 0, padding: 0 }}>
|
<button className="homeButton" onClick={() => {
|
||||||
<button className="homeButton" onClick={() => {
|
this.setState({ redirectToHome: true });
|
||||||
this.setState({ redirectToHome: true });
|
}}>
|
||||||
}}>
|
<img alt="" src="livepeer.png" width="100em" height="100em" />
|
||||||
<img alt="" src="livepeer.png" width="100em" height="100em" />
|
</button>
|
||||||
</button>
|
<div className="row" style={{alignItems: 'stretch', height:'100%'}}>
|
||||||
|
<Orchestrator thisOrchestrator={thisOrchObj} />
|
||||||
</div>
|
</div>
|
||||||
<Orchestrator thisOrchestrator={thisOrchObj} />
|
|
||||||
<div className="row metaSidebar" style={{ padding: 0 }}>
|
<div className="row metaSidebar" style={{ padding: 0 }}>
|
||||||
<div className="stroke" style={{ margin: 0, padding: 0 }}>
|
<div className="stroke" style={{ margin: 0, padding: 0 }}>
|
||||||
<h3>Smart contract prices</h3>
|
<h3>Smart contract prices</h3>
|
||||||
@ -156,7 +156,7 @@ class Livepeer extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div >
|
</div >
|
||||||
<EventViewer events={eventsList} setOrchFunction={this.props.getOrchestratorInfo}/>
|
<EventViewer events={eventsList} setOrchFunction={this.props.getOrchestratorInfo} />
|
||||||
</div >
|
</div >
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -36,53 +36,65 @@ const Orchestrator = (obj) => {
|
|||||||
thisID = obj.thisOrchestrator.delegator.id;
|
thisID = obj.thisOrchestrator.delegator.id;
|
||||||
thisUrl = "https://explorer.livepeer.org/accounts/" + thisID;
|
thisUrl = "https://explorer.livepeer.org/accounts/" + thisID;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="hostInfo">
|
<div className="hostInfo">
|
||||||
<div className="strokeSmollLeft">
|
<div className="strokeSmollLeft">
|
||||||
<div style={{ flexDirection: 'row', display: "flex" }}>
|
<div style={{ flexDirection: 'row', display: "flex" }}>
|
||||||
<a href={thisUrl}>
|
<a href={thisUrl}>
|
||||||
<img alt="" src="livepeer.png" width="30" height="30" />
|
<img alt="" src="livepeer.png" width="30" height="30" />
|
||||||
<h3>Orchestrator Info</h3>
|
<h3>Orchestrator Info</h3>
|
||||||
{thisID}
|
{thisID}
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
<div className="rowAlignLeft">
|
||||||
|
<p>Earned fees {totalVolumeETH} Eth (${totalVolumeUSD})</p>
|
||||||
|
</div>
|
||||||
|
<div className="rowAlignLeft">
|
||||||
|
<p>Reward Cut {rewardCut}%</p>
|
||||||
|
<p>Fee Cut {feeCut}%</p>
|
||||||
|
</div>
|
||||||
|
<div className="rowAlignLeft">
|
||||||
|
<p>Total Stake {totalStake} LPT</p>
|
||||||
|
<p>Self stake {selfStake} LPT ({selfStakeRatio}%)</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="rowAlignLeft">
|
<div className="rowAlignLeft">
|
||||||
<p>Earned fees {totalVolumeETH} Eth (${totalVolumeUSD})</p>
|
<div className="content-wrapper">
|
||||||
</div>
|
<ScrollContainer className="overflow-container" hideScrollbars={false}>
|
||||||
<div className="rowAlignLeft">
|
<div className="overflow-content" style={{ cursor: 'grab', height: '300px' }}>
|
||||||
<p>Reward Cut {rewardCut}%</p>
|
{
|
||||||
<p>Fee Cut {feeCut}%</p>
|
delegators.map((delObj, idx) => {
|
||||||
</div>
|
return (
|
||||||
<div className="rowAlignLeft">
|
<div className="rowAlignLeft">
|
||||||
<p>Total Stake {totalStake} LPT</p>
|
<a href={"https://explorer.livepeer.org/accounts/" + delObj.id}>
|
||||||
<p>Self stake {selfStake} LPT ({selfStakeRatio}%)</p>
|
<img alt="" src="livepeer.png" width="30" height="30" />{delObj.id.substr(0, 6) + ".."}</a>
|
||||||
|
<div className="strokeSmollLeft">
|
||||||
|
<p>{parseFloat(delObj.bondedAmount).toFixed(2)} LPT since round {delObj.startRound}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</ScrollContainer>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="rowAlignLeft">
|
)
|
||||||
<div className="content-wrapper">
|
}
|
||||||
<ScrollContainer className="overflow-container" hideScrollbars={false}>
|
return (
|
||||||
<div className="overflow-content" style={{ cursor: 'grab', height: '300px' }}>
|
<div className="hostInfo" style={{ height: '100%', width: '100%', display: 'flex' }}>
|
||||||
{
|
<div style={{ flexDirection: 'strokeSmollLeft', display: "flex", height: '100%', width: '100%' }}>
|
||||||
delegators.map((delObj, idx) => {
|
<div className="rowAlignLeft">
|
||||||
return (
|
<img alt="" src="livepeer.png" width="30" height="30" />
|
||||||
<div className="rowAlignLeft">
|
<h3>Orchestrator Info</h3>
|
||||||
<a href={"https://explorer.livepeer.org/accounts/" + delObj.id}>
|
</div>
|
||||||
<img alt="" src="livepeer.png" width="30" height="30" />{delObj.id.substr(0, 6) + ".."}</a>
|
<div className="rowAlignLeft">
|
||||||
<div className="strokeSmollLeft">
|
<p>Click on an orchestrator in the list below!</p>
|
||||||
<p>{parseFloat(delObj.bondedAmount).toFixed(2)} LPT since round {delObj.startRound}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</ScrollContainer>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user