Extract input for filtering by name or tags (#6089)
* Extract input for filtering by name or tags * Remove unnecessary div * Change width of filter input and move group buttons
This commit is contained in:
parent
4aa068eb68
commit
079ad21f6d
@ -225,46 +225,6 @@ function Overview ({ className = '', onStatusChange }: Props): React.ReactElemen
|
||||
onStatusChange={onStatusChange}
|
||||
/>
|
||||
)}
|
||||
<Button.Group>
|
||||
<Button
|
||||
icon='plus'
|
||||
isDisabled={isIpfs}
|
||||
label={t<string>('Add account')}
|
||||
onClick={_openCreateModal}
|
||||
/>
|
||||
<Button
|
||||
icon='sync'
|
||||
isDisabled={isIpfs}
|
||||
label={t<string>('Restore JSON')}
|
||||
onClick={toggleImport}
|
||||
/>
|
||||
<Button
|
||||
icon='qrcode'
|
||||
label={t<string>('Add via Qr')}
|
||||
onClick={toggleQr}
|
||||
/>
|
||||
{isLedgerEnabled && (
|
||||
<>
|
||||
<Button
|
||||
icon='project-diagram'
|
||||
label={t<string>('Add via Ledger')}
|
||||
onClick={toggleLedger}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<Button
|
||||
icon='plus'
|
||||
isDisabled={!(api.tx.multisig || api.tx.utility) || !hasAccounts}
|
||||
label={t<string>('Multisig')}
|
||||
onClick={toggleMultisig}
|
||||
/>
|
||||
<Button
|
||||
icon='plus'
|
||||
isDisabled={!api.tx.proxy || !hasAccounts}
|
||||
label={t<string>('Proxied')}
|
||||
onClick={toggleProxy}
|
||||
/>
|
||||
</Button.Group>
|
||||
<BannerExtension />
|
||||
<BannerClaims />
|
||||
<Summary balance={balances.summary} />
|
||||
@ -281,11 +241,51 @@ function Overview ({ className = '', onStatusChange }: Props): React.ReactElemen
|
||||
options={dropdownOptions()}
|
||||
sortDirection={sortFromMax ? 'ascending' : 'descending'}
|
||||
/>
|
||||
{filter}
|
||||
</section>
|
||||
<Button.Group>
|
||||
<Button
|
||||
icon='plus'
|
||||
isDisabled={isIpfs}
|
||||
label={t<string>('Add account')}
|
||||
onClick={_openCreateModal}
|
||||
/>
|
||||
<Button
|
||||
icon='sync'
|
||||
isDisabled={isIpfs}
|
||||
label={t<string>('Restore JSON')}
|
||||
onClick={toggleImport}
|
||||
/>
|
||||
<Button
|
||||
icon='qrcode'
|
||||
label={t<string>('Add via Qr')}
|
||||
onClick={toggleQr}
|
||||
/>
|
||||
{isLedgerEnabled && (
|
||||
<>
|
||||
<Button
|
||||
icon='project-diagram'
|
||||
label={t<string>('Add via Ledger')}
|
||||
onClick={toggleLedger}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<Button
|
||||
icon='plus'
|
||||
isDisabled={!(api.tx.multisig || api.tx.utility) || !hasAccounts}
|
||||
label={t<string>('Multisig')}
|
||||
onClick={toggleMultisig}
|
||||
/>
|
||||
<Button
|
||||
icon='plus'
|
||||
isDisabled={!api.tx.proxy || !hasAccounts}
|
||||
label={t<string>('Proxied')}
|
||||
onClick={toggleProxy}
|
||||
/>
|
||||
</Button.Group>
|
||||
</SummaryBox>
|
||||
<Table
|
||||
empty={!isLoading && sortedAccounts && t<string>("You don't have any accounts. Some features are currently hidden and will only become available once you have accounts.")}
|
||||
filter={filter}
|
||||
header={header.current}
|
||||
>
|
||||
{!isLoading &&
|
||||
@ -301,6 +301,20 @@ function Overview ({ className = '', onStatusChange }: Props): React.ReactElemen
|
||||
}
|
||||
|
||||
export default React.memo(styled(Overview)`
|
||||
.filter--tags {
|
||||
width: 29.5rem;
|
||||
margin-left: 1.5rem;
|
||||
|
||||
.ui--Input {
|
||||
margin: 0;
|
||||
height: 3.893rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ui--Dropdown {
|
||||
width: 15rem;
|
||||
}
|
||||
|
||||
.dropdown-section {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user