From 06813758659c9b148f6922debaff24d5c912d756 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 10 May 2019 19:52:07 +0200 Subject: [PATCH] Explorer query updates (#1127) --- packages/app-explorer/src/BlockInfo/index.tsx | 21 +++++---- packages/app-explorer/src/Main.tsx | 2 + .../{ui-app => app-explorer}/src/Query.tsx | 47 +++++++++---------- packages/app-explorer/src/index.tsx | 1 - packages/ui-app/src/FilterOverlay.tsx | 2 +- packages/ui-app/src/Input.tsx | 7 ++- packages/ui-app/src/Tabs.tsx | 12 +---- 7 files changed, 45 insertions(+), 47 deletions(-) rename packages/{ui-app => app-explorer}/src/Query.tsx (58%) diff --git a/packages/app-explorer/src/BlockInfo/index.tsx b/packages/app-explorer/src/BlockInfo/index.tsx index 5efe27ee16..4cd1bae009 100644 --- a/packages/app-explorer/src/BlockInfo/index.tsx +++ b/packages/app-explorer/src/BlockInfo/index.tsx @@ -9,6 +9,7 @@ import { withCalls, withMulti } from '@polkadot/ui-api'; import { isHex } from '@polkadot/util'; import { BlockNumber } from '@polkadot/types'; +import Query from '../Query'; import BlockByHash from './ByHash'; import BlockByNumber from './ByNumber'; @@ -53,19 +54,19 @@ class Entry extends React.Component { return null; } - return isHex(value) - ? ( - + + - ) - : ( - - ); + + ); } } diff --git a/packages/app-explorer/src/Main.tsx b/packages/app-explorer/src/Main.tsx index 48491b8edb..8f46662eda 100644 --- a/packages/app-explorer/src/Main.tsx +++ b/packages/app-explorer/src/Main.tsx @@ -8,6 +8,7 @@ import React from 'react'; import BlockHeaders from './BlockHeaders'; import EventsRecent from './EventsRecent'; +import Query from './Query'; import Summary from './Summary'; import translate from './translate'; @@ -19,6 +20,7 @@ class Main extends React.PureComponent { return ( <> +
diff --git a/packages/ui-app/src/Query.tsx b/packages/app-explorer/src/Query.tsx similarity index 58% rename from packages/ui-app/src/Query.tsx rename to packages/app-explorer/src/Query.tsx index 1e7415675c..e98b73bac6 100644 --- a/packages/ui-app/src/Query.tsx +++ b/packages/app-explorer/src/Query.tsx @@ -5,7 +5,7 @@ import { I18nProps } from '@polkadot/ui-app/types'; import React from 'react'; -import { Button, Input } from '@polkadot/ui-app'; +import { Button, FilterOverlay, Input } from '@polkadot/ui-app'; import { isHex } from '@polkadot/util'; import translate from './translate'; @@ -34,26 +34,23 @@ class Query extends React.PureComponent { const { value, isValid } = this.state; return ( - -
-
- -
-
-
+ + +