Forward-port low-hanging breaks (#673)
* Pull in media from jg-ui-break * Test apps, pull in flex-media settings
This commit is contained in:
parent
136ce9cf8a
commit
d873512ccc
@ -39,7 +39,7 @@ class Summary extends React.PureComponent<Props> {
|
||||
{formatNumber(democracy_referendumCount.sub(democracy_nextTally))}
|
||||
</CardSummary>
|
||||
</section>
|
||||
<section>
|
||||
<section className='ui--media-medium'>
|
||||
<CardSummary
|
||||
label={t('voting period')}
|
||||
progress={{
|
||||
|
||||
@ -40,7 +40,7 @@ export default class BlockHeader extends React.PureComponent<Props> {
|
||||
: textNumber
|
||||
} </div>
|
||||
<div className='hash'>{hashHex}</div>
|
||||
<div className='author'>{
|
||||
<div className='author ui--media-small'>{
|
||||
author
|
||||
? <AddressMini value={author} />
|
||||
: undefined
|
||||
|
||||
@ -22,7 +22,7 @@ class Main extends React.PureComponent<Props> {
|
||||
<>
|
||||
<Summary />
|
||||
<Query />
|
||||
<div className='explorer--Overview'>
|
||||
<div className='explorer--Overview ui--flex-medium'>
|
||||
<div className='column'>
|
||||
<h1>{t('recent blocks')}</h1>
|
||||
<BlockHeaders />
|
||||
|
||||
@ -22,7 +22,7 @@ class Summary extends React.PureComponent<Props> {
|
||||
className={className}
|
||||
style={style}
|
||||
>
|
||||
<section>
|
||||
<section className='ui--media-small'>
|
||||
<CardSummary label={t('target')}>
|
||||
<TimePeriod />
|
||||
</CardSummary>
|
||||
@ -30,7 +30,7 @@ class Summary extends React.PureComponent<Props> {
|
||||
<TimeNow />
|
||||
</CardSummary>
|
||||
</section>
|
||||
<section>
|
||||
<section className='ui--media-large'>
|
||||
<SummarySession />
|
||||
</section>
|
||||
<section>
|
||||
|
||||
@ -89,12 +89,9 @@
|
||||
}
|
||||
|
||||
.explorer--Overview {
|
||||
display: flex;
|
||||
|
||||
.column {
|
||||
flex: 0 0 50%;
|
||||
min-width: 0;
|
||||
max-width: 50%;
|
||||
padding: 0 1em 1em;
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ class Summary extends React.PureComponent<Props, State> {
|
||||
|
||||
return (
|
||||
<summary>
|
||||
<section>
|
||||
<section className='ui--media-medium'>
|
||||
<CardSummary label={t('refresh in')}>
|
||||
<Elapsed value={nextRefresh} />
|
||||
</CardSummary>
|
||||
@ -68,7 +68,7 @@ class Summary extends React.PureComponent<Props, State> {
|
||||
}
|
||||
</CardSummary>
|
||||
</section>
|
||||
<section>
|
||||
<section className='ui--media-large'>
|
||||
<CardSummary label={t('queued tx')}>
|
||||
{
|
||||
info.extrinsics
|
||||
|
||||
@ -26,7 +26,7 @@ type Props = I18nProps & {
|
||||
class CurrentList extends React.PureComponent<Props> {
|
||||
render () {
|
||||
return (
|
||||
<div className='validator--ValidatorsList'>
|
||||
<div className='validator--ValidatorsList ui--flex-medium'>
|
||||
<div className='validator--current'>
|
||||
{this.renderCurrent()}
|
||||
</div>
|
||||
|
||||
@ -39,10 +39,10 @@ class Summary extends React.PureComponent<Props> {
|
||||
{intentions.length}
|
||||
</CardSummary>
|
||||
</section>
|
||||
<section>
|
||||
<section className='ui--media-medium'>
|
||||
<SummarySession withBroken={false} />
|
||||
</section>
|
||||
<section>
|
||||
<section className='ui--media-large'>
|
||||
<CardSummary label={t('balances')}>
|
||||
{this.renderBalances()}
|
||||
</CardSummary>
|
||||
|
||||
@ -49,10 +49,7 @@
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.validator--IntensionsList,
|
||||
.validator--ValidatorsList {
|
||||
display: flex;
|
||||
|
||||
article {
|
||||
position: relative;
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ class Transfer extends React.PureComponent<Props, State> {
|
||||
return (
|
||||
<div className='transfer--Transfer'>
|
||||
<div className='transfer--Transfer-info'>
|
||||
{this.renderAddress(accountId)}
|
||||
{this.renderAddress(accountId, 'medium')}
|
||||
<div className='transfer--Transfer-data'>
|
||||
<InputAddress
|
||||
label={t('from my source account')}
|
||||
@ -80,13 +80,13 @@ class Transfer extends React.PureComponent<Props, State> {
|
||||
)}
|
||||
</QueueConsumer>
|
||||
</div>
|
||||
{this.renderAddress(recipientId)}
|
||||
{this.renderAddress(recipientId, 'large')}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
private renderAddress (accountId: string | null) {
|
||||
private renderAddress (accountId: string | null, media: 'large' | 'medium') {
|
||||
if (!accountId) {
|
||||
return null;
|
||||
}
|
||||
@ -98,7 +98,7 @@ class Transfer extends React.PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='transfer--Transfer-address'>
|
||||
<div className={`transfer--Transfer-address ui--media-${media}`}>
|
||||
<AddressSummary
|
||||
value={accountId}
|
||||
withCopy={false}
|
||||
|
||||
@ -10,5 +10,6 @@ import './styles/theme/substrate.css';
|
||||
|
||||
import './styles/app.css';
|
||||
import './styles/form.css';
|
||||
import './styles/media.css';
|
||||
import './styles/rx.css';
|
||||
import './styles/components.css';
|
||||
|
||||
@ -220,8 +220,14 @@ header .ui--Button-Group {
|
||||
margin-left: 0.25rem !important;
|
||||
}
|
||||
|
||||
.ui--DropdownLinked-Items {
|
||||
padding-left: 0.5rem;
|
||||
.ui--DropdownLinked.ui--row {
|
||||
.small .ui.selection.dropdown {
|
||||
min-width: 5rem;
|
||||
}
|
||||
|
||||
.ui--DropdownLinked-Items {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ui--Input {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
.ui--row {
|
||||
align-items: stretch;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
text-align: left;
|
||||
|
||||
55
packages/ui-app/src/styles/media.css
Normal file
55
packages/ui-app/src/styles/media.css
Normal file
@ -0,0 +1,55 @@
|
||||
/* Copyright 2017-2019 @polkadot/ui-app authors & contributors
|
||||
/* This software may be modified and distributed under the terms
|
||||
/* of the Apache-2.0 license. See the LICENSE file for details. */
|
||||
|
||||
/* block by default, flex as per media queries below */
|
||||
.ui--flex-large,
|
||||
.ui--flex-medium,
|
||||
.ui--flex-small {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* hide all by default, add as per media queries below */
|
||||
.ui--media-large,
|
||||
.ui--media-medium,
|
||||
.ui--media-small {
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 1281px) {
|
||||
.ui--flex-large {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.ui--media-large {
|
||||
height: auto;
|
||||
visibility: visible;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1025px) {
|
||||
.ui--flex-medium {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.ui--media-medium {
|
||||
height: auto;
|
||||
visibility: visible;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.ui--flex-small {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.ui--media-small {
|
||||
height: auto;
|
||||
visibility: visible;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user