mirror of https://gitlab.com/ecentrics/concordia
Apostolos Fanakis
4 years ago
29 changed files with 787 additions and 466 deletions
@ -1,27 +1,24 @@ |
|||||
body { |
#loading-screen { |
||||
overflow: hidden; |
padding-top: 12em; |
||||
} |
|
||||
|
|
||||
.loading-screen { |
|
||||
margin-top: 12em; |
|
||||
text-align: center; |
text-align: center; |
||||
font-size: large; |
font-size: large; |
||||
|
height: 100%; |
||||
} |
} |
||||
|
|
||||
.loading-screen ul { |
#loading-screen ul { |
||||
list-style-position: inside; |
list-style-position: inside; |
||||
} |
} |
||||
|
|
||||
.loading-img { |
#loading-img { |
||||
margin-bottom: 3em; |
margin-bottom: 3em; |
||||
height: 12em; |
height: 12em; |
||||
} |
} |
||||
|
|
||||
.ui.container { |
#loading-screen-container { |
||||
height: 26em; |
height: 26em; |
||||
} |
} |
||||
|
|
||||
.ui.progress { |
#loading-screen-progress { |
||||
width: 40vw; |
width: 40vw; |
||||
margin-left: auto !important; |
margin-left: auto !important; |
||||
margin-right: auto !important; |
margin-right: auto !important; |
@ -0,0 +1,85 @@ |
|||||
|
import React, { useMemo } from 'react'; |
||||
|
import { useSelector } from 'react-redux'; |
||||
|
import { CopyToClipboard } from 'react-copy-to-clipboard'; |
||||
|
import { |
||||
|
Header, Image, Segment, Table, |
||||
|
} from 'semantic-ui-react'; |
||||
|
|
||||
|
import ipfsLogo from '../../../assets/images/ipfs_logo.svg'; |
||||
|
import './styles.css'; |
||||
|
|
||||
|
const MainLayoutIPFSStatus = () => { |
||||
|
const ipfsId = useSelector((state) => state.ipfs.id); |
||||
|
const peerIds = useSelector((state) => state.ipfs.peers); |
||||
|
const bootstrapPeerIds = useSelector((state) => state.ipfs.bootstrapPeers); |
||||
|
const peers = useMemo(() => peerIds |
||||
|
.map((peerId) => ( |
||||
|
<Table.Row className="status-value"> |
||||
|
<Table.Cell> |
||||
|
<CopyToClipboard text={peerId}> |
||||
|
<span>{peerId}</span> |
||||
|
</CopyToClipboard> |
||||
|
</Table.Cell> |
||||
|
</Table.Row> |
||||
|
|
||||
|
)), [peerIds]); |
||||
|
|
||||
|
const bootstrapPeers = useMemo(() => bootstrapPeerIds |
||||
|
.map((bootstrapPeerId) => ( |
||||
|
<Table.Row className="status-value"> |
||||
|
<Table.Cell> |
||||
|
<CopyToClipboard text={bootstrapPeerId}> |
||||
|
<span>{bootstrapPeerId}</span> |
||||
|
</CopyToClipboard> |
||||
|
</Table.Cell> |
||||
|
</Table.Row> |
||||
|
|
||||
|
)), [bootstrapPeerIds]); |
||||
|
|
||||
|
return ( |
||||
|
<Segment padded> |
||||
|
<Header textAlign="center"> |
||||
|
<Image src={ipfsLogo} size="small" /> |
||||
|
IPFS Status |
||||
|
</Header> |
||||
|
<Table className="status-table" compact textAlign="center" columns={1}> |
||||
|
<Table.Body> |
||||
|
<Table.Row> |
||||
|
<Table.Cell className="status-key">Peer ID</Table.Cell> |
||||
|
</Table.Row> |
||||
|
<Table.Row> |
||||
|
<Table.Cell |
||||
|
className="status-value" |
||||
|
> |
||||
|
<CopyToClipboard text={ipfsId}> |
||||
|
<span>{ipfsId}</span> |
||||
|
</CopyToClipboard> |
||||
|
</Table.Cell> |
||||
|
</Table.Row> |
||||
|
<Table.Row> |
||||
|
<Table.Cell className="status-key">Peers</Table.Cell> |
||||
|
</Table.Row> |
||||
|
{peers.length === 0 |
||||
|
? ( |
||||
|
<Table.Row> |
||||
|
<Table.Cell>-</Table.Cell> |
||||
|
</Table.Row> |
||||
|
) : null} |
||||
|
{peers} |
||||
|
<Table.Row> |
||||
|
<Table.Cell className="status-key">Bootstrap Peers</Table.Cell> |
||||
|
</Table.Row> |
||||
|
{bootstrapPeers.length === 0 |
||||
|
? ( |
||||
|
<Table.Row> |
||||
|
<Table.Cell>-</Table.Cell> |
||||
|
</Table.Row> |
||||
|
) : null} |
||||
|
{bootstrapPeers} |
||||
|
</Table.Body> |
||||
|
</Table> |
||||
|
</Segment> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default MainLayoutIPFSStatus; |
@ -0,0 +1,18 @@ |
|||||
|
.status-table { |
||||
|
border: 1px solid var(--secondary-color) !important; |
||||
|
} |
||||
|
|
||||
|
.status-key { |
||||
|
background-color: var(--secondary-color); |
||||
|
color: white; |
||||
|
font-weight: 700; |
||||
|
} |
||||
|
|
||||
|
.status-value { |
||||
|
font-size: 0.95rem; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
.status-value:hover { |
||||
|
color: grey; |
||||
|
} |
@ -1,3 +1,11 @@ |
|||||
#main-layout { |
#main-layout { |
||||
height: 100%; |
height: auto; |
||||
} |
min-height: 100%; |
||||
|
background-color: #E6E6E6; |
||||
|
padding-bottom: 4rem; |
||||
|
} |
||||
|
|
||||
|
#main-layout-grid{ |
||||
|
margin-right: 0; |
||||
|
margin-left: 0; |
||||
|
} |
||||
|
@ -1,3 +1,7 @@ |
|||||
#app-logo{ |
#about-segment{ |
||||
|
padding: 3rem; |
||||
|
} |
||||
|
|
||||
|
#about-app-logo{ |
||||
margin-bottom: 1rem; |
margin-bottom: 1rem; |
||||
} |
} |
||||
|
File diff suppressed because it is too large
Loading…
Reference in new issue