Fixed formatting

This commit is contained in:
Marco van Dijk 2022-04-23 22:16:07 +02:00
parent 86db25caee
commit fe439fed90
4 changed files with 52 additions and 77 deletions

View File

@ -36,8 +36,7 @@ const OrchDelegatorViewer = (obj) => {
const totalPages = (delegators.length + (itemsPerPage - (delegators.length % itemsPerPage))) / itemsPerPage;
return (
<div className="row">
<div className="strokeSmollLeft fullMargin" style={{ paddingBottom: 0, marginBottom: 0 }}>
<div className="strokeSmollLeft" style={{ paddingBottom: 0, marginBottom: 0 }}>
<div className="row">
<h3>{delegators.length} Current Delegators</h3>
</div>
@ -76,7 +75,6 @@ const OrchDelegatorViewer = (obj) => {
: null}
</div>
</div>
</div>
)
}
return (

View File

@ -2,6 +2,8 @@ import React from "react";
import Stat from "./statViewer";
import Address from "./OrchAddressViewer";
import { useSelector } from 'react-redux';
import { Text } from "@mantine/core";
import ScrollContainer from "react-indiana-drag-scroll";
function updateClipboard(newClip) {
navigator.clipboard.writeText(newClip).then(
@ -111,11 +113,7 @@ const OrchInfoViewer = (obj) => {
let ensUrl;
if (hasENS) {
if (thisInfo.description) {
ensDescription =
<div className="stroke">
<div className="verticalDivider" />
<span>{thisInfo.description}</span>
</div>
ensDescription = thisInfo.description
}
if (thisInfo.url) {
if (!thisInfo.url.startsWith('http')) {
@ -132,11 +130,7 @@ const OrchInfoViewer = (obj) => {
}
} else if (hasThreeBox) {
if (thisInfo.description) {
ensDescription =
<div className="stroke">
<div className="verticalDivider" />
<span>{thisInfo.description}</span>
</div>
ensDescription = thisInfo.description
}
if (thisInfo.website) {
if (!thisInfo.website.startsWith('http')) {
@ -162,7 +156,16 @@ const OrchInfoViewer = (obj) => {
</div>
<Address address={thisID} />
{ensUrl}
<div className="verticalDivider" />
<div className="content-wrapper" style={{maxWidth: '350px', maxHeight: '300px', height: ' 100%' }}>
<ScrollContainer activationDistance={1} className="overflow-container" hideScrollbars={false} style={{ overflowX: 'hidden', justifyContent: 'center' }}>
<div className="overflow-content" style={{ cursor: 'grab', padding: 0, maxHeight: '200px', maxWidth: '300px' }}>
<p className="darkText" style={{ overflowWrap: 'break-word' }}>
{ensDescription}
</p>
</div>
</ScrollContainer>
</div>
<div className="stretchAndBetween" style={{ borderTop: '2px solid rgba(15,15,15,0.05)', marginTop: '0.2em' }} >
<Stat header={"Earned Fees"} content1={totalVolumeETH + " Eth"} content2={"$" + totalVolumeUSD} />
</div>

View File

@ -6,7 +6,7 @@ const Orchestrator = (obj) => {
if (obj.thisOrchestrator) {
if (obj.forceVertical) {
return (
<div className="hostInfo sideMargin mobileNoSideMargin">
<div className="hostInfo">
<div className="flexContainer" style={{ justifyContent: 'flex-start', alignItems: 'flex-start', flexDirection: 'column' }}>
<OrchInfoViewer
rewardCut={obj.thisOrchestrator.rewardCut}
@ -22,7 +22,7 @@ const Orchestrator = (obj) => {
)
} else {
return (
<div className="hostInfo sideMargin mobileNoSideMargin">
<div className="hostInfo">
<div className="flexContainer" style={{ justifyContent: 'flex-start', alignItems: 'flex-start', flexDirection: 'column' }}>
<OrchInfoViewer
rewardCut={obj.thisOrchestrator.rewardCut}

View File

@ -5,7 +5,6 @@ import { useSelector, useDispatch } from 'react-redux';
import { getOrchestratorInfo, clearOrchestrator } from "../actions/livepeer";
import EventViewer from "../components/eventViewer";
import Orchestrator from "../components/orchestratorViewer";
import ContractPrices from '../components/ContractPrices';
import { Dialog, ScrollArea, Stack } from '@mantine/core';
import ScrollContainer from 'react-indiana-drag-scroll';
@ -46,24 +45,6 @@ const Livepeer = (obj) => {
headerString = "Livepeer Orchestrator Explorer";
}
let sidebar;
if (showSidebar && false) {
sidebar = <div id='sideContent'>
<div className="verticalDivider" />
<div className="strokeSmollLeft sideMargin">
<div className="row">
<div className="row">
<Orchestrator thisOrchestrator={thisOrchObj} rootOnly={false} forceVertical={true} />
</div>
</div>
<div className="verticalDivider" />
<div className="row">
<ContractPrices quotes={livepeer.quotes} blockchains={livepeer.blockchains} />
</div>
</div>
</div >
}
return (
<div style={{ margin: 0, padding: 0, height: '100%', width: '100%', overflow: 'hidden' }}>
@ -116,19 +97,12 @@ const Livepeer = (obj) => {
<ScrollContainer activationDistance={1} className="overflow-container" hideScrollbars={false} style={{ width: '100%', overflowX: 'hidden' }}>
<div className="overflow-content" style={{ cursor: 'grab', padding: 0, width: '100%' }}>
<div className="verticalDivider" />
<div className="strokeSmollLeft sideMargin">
<div className="row">
<div className="row">
<Orchestrator thisOrchestrator={thisOrchObj} rootOnly={false} forceVertical={true} />
</div>
</div>
<div className="verticalDivider" />
</div>
</div>
</ScrollContainer>
</div>
</Dialog>
{sidebar}
<div className="mainContent">
<EventViewer searchTerm={searchTerm} setSearchTerm={setSearchTerm}
forceVertical={true} setShowFilter={setShowFilter} showFilter={showFilter} setAmountFilter={setAmountFilter} amountFilter={amountFilter}