diff --git a/src/pages/Fiber/Peer/index.module.scss b/src/pages/Fiber/Peer/index.module.scss index 9839c7629..7313b7d28 100644 --- a/src/pages/Fiber/Peer/index.module.scss +++ b/src/pages/Fiber/Peer/index.module.scss @@ -70,6 +70,20 @@ } } + .overview { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + background: #fff; + border-radius: 6px; + padding: 16px; + box-shadow: 0 2px 6px 0 #4d4d4d33; + + .fields { + overflow: hidden; + } + } + .id, .connectId { overflow: hidden; @@ -81,15 +95,50 @@ } } - .channels, - .transactions { + .activities { + display: flex; + gap: 16px; margin-top: 16px; - border-top: 1px solid #ccc; - padding-top: 16px; - h3 { - margin: 0; - padding: 0; + .channels, + .transactions { + flex: 1; + background: #fff; + border-radius: 6px; + padding: 16px; + box-shadow: 0 2px 6px 0 #4d4d4d33; + + h3 { + margin: 0; + padding: 0; + } + } + + @media screen and (width < 960px) { + flex-direction: column; + } + + @media screen and (width < 500px) { + thead { + display: none; + } + + tbody { + tr { + display: flex; + flex-direction: column; + padding: 16px 0; + + &:not(:last-child) { + border-bottom: 1px solid #ccc; + } + + td { + text-align: left; + padding: 0; + } + } + } } } diff --git a/src/pages/Fiber/Peer/index.tsx b/src/pages/Fiber/Peer/index.tsx index f7e94ee0a..e096dee4d 100644 --- a/src/pages/Fiber/Peer/index.tsx +++ b/src/pages/Fiber/Peer/index.tsx @@ -88,99 +88,103 @@ const Peer = () => { return (
-
-
-
{t('fiber.peer.peer_id')}
-
- {peer.peerId} - -
-
-
-
- -
-
- - - - - -
-
- {connectId ? ( +
+
-
{t('fiber.peer.connect_id')}
-
- - {connectId} - -
- ) : null} +
+
+ +
+
+ + + + + +
+
+ {connectId ? ( +
+
{t('fiber.peer.connect_id')}
+
+ + {connectId} + + +
+
+ ) : null} +
+
{t('fiber.peer.open_time')}
+
+ Coming soon +
+
+
+
{t('fiber.peer.update_time')}
+
+ Coming soon +
+
+
{connectId ? (
) : null} -
-
{t('fiber.peer.open_time')}
-
- Coming soon -
-
-
-
{t('fiber.peer.update_time')}
-
- Coming soon -
-
-
-
-

{`${t('fiber.peer.channels')}(${channels.length})`}

- - - - - - - - - {channels.map(c => { - return ( - - - - - ) - })} - -
{t('fiber.channel.channel_id')}{t('fiber.channel.state')}
- - - {`${c.channelId.slice(0, 10)}...${c.channelId.slice(-10)}`} - - - {c.stateName}
-
-

Open | Close Transactions

- Coming soon +
+
+

{`${t('fiber.peer.channels')}(${channels.length})`}

+ + + + + + + + + {channels.map(c => { + return ( + + + + + ) + })} + +
{t('fiber.channel.channel_id')}{t('fiber.channel.state')}
+ + + {`${c.channelId.slice(0, 10)}...${c.channelId.slice(-10)}`} + + + {c.stateName}
+
+
+

Open | Close Transactions

+ Coming soon +
diff --git a/src/services/ExplorerService/fetcher.ts b/src/services/ExplorerService/fetcher.ts index d35b812df..21e109d99 100644 --- a/src/services/ExplorerService/fetcher.ts +++ b/src/services/ExplorerService/fetcher.ts @@ -1206,10 +1206,10 @@ export const apiFetcher = { toCamelcase< Response.Response<{ fiberPeers: Fiber.Peer.ItemInList[] - // meta: { - // total: number - // pageSize: number - // } + meta: { + total: number + pageSize: number + } }> >(res.data), )