-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update block view in mobile * update models / add block extension view
- Loading branch information
Showing
22 changed files
with
294 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
client/src/components/block/block-extension/block-extension.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import * as React from 'react'; | ||
import { FormattedMessage } from 'react-intl'; | ||
import { BlockExtension } from '../../../models/generated/blockExtension'; | ||
|
||
|
||
interface IBlockExtProps { | ||
extension: BlockExtension; | ||
} | ||
|
||
import './block-extension.scss'; | ||
|
||
export class BlockExtensionComponent extends React.Component<IBlockExtProps> { | ||
render (): JSX.Element { | ||
|
||
return ( | ||
<div className='bi-block-ext'> | ||
<div className='bi-block-ext__table bi-table'> | ||
<div className='bi-block-ext__row bi-table__row'> | ||
<div className='bi-block-ext__cell bi-block-ext__cell--header bi-table__cell'> | ||
<FormattedMessage id='common.block.headerId'/> | ||
</div> | ||
|
||
<div className='bi-block-ext__cell bi-table__cell'> | ||
{ this.props.extension.headerId } | ||
</div> | ||
</div> | ||
<div className='bi-block-ext__row bi-table__row'> | ||
<div className='bi-block-ext__cell bi-block-ext__cell--header bi-table__cell'> | ||
<FormattedMessage id='common.block.digest'/> | ||
</div> | ||
|
||
<div className='bi-block-ext__cell bi-table__cell'> | ||
{ this.props.extension.digest } | ||
</div> | ||
</div> | ||
<div className='bi-block-ext__row bi-table__row'> | ||
<div className='bi-block-ext__cell bi-block-ext__cell--header bi-table__cell'> | ||
<FormattedMessage id='common.block.fields'/> | ||
</div> | ||
|
||
<div className='bi-block-ext__cell bi-table__cell'> | ||
{this.props.extension.fields.map((i) => <div key={i[0]}> | ||
<b>{i[0]}</b>: {i[1]} | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
client/src/components/block/block-extension/block-extension.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
@import '~styles/base/variables'; | ||
|
||
// #BLOCK EXTENSION | ||
//------------------------------------- | ||
$block-ext-bg-color: #ffffff; | ||
$block-ext-row-hover-bg-color: #f8f8f8; | ||
$block-ext-border-color: #eeeeee; | ||
$block-table-title-color: $theme-primary-color; | ||
$block-table-cell-color: $theme-primary-color; | ||
$block-table-cell-border-color: $theme-color-blue; | ||
|
||
.bi-block-ext { | ||
font-family: $theme-main-font; | ||
|
||
// [ Components ] | ||
//-------------------------------------------------- | ||
&__table { | ||
width: 100%; | ||
border: 1px solid $block-ext-border-color; | ||
background-color: $block-ext-bg-color; | ||
} | ||
|
||
&__row { | ||
border-bottom: 1px solid $block-ext-border-color; | ||
|
||
&:hover { | ||
background-color: $block-ext-row-hover-bg-color; | ||
|
||
.bi-block-ext__cell:first-child:after { | ||
visibility: visible; | ||
} | ||
} | ||
} | ||
|
||
&__cell { | ||
position: relative; | ||
padding: $grid-offset-step * 4; | ||
border: 1px solid $block-ext-border-color; | ||
border-right: 0; | ||
border-left: 0; | ||
color: $block-table-cell-color; | ||
font-size: 15px; | ||
|
||
&:first-child:after { | ||
visibility: hidden; | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
width: 2px; | ||
background-color: $block-table-cell-border-color; | ||
content: ''; | ||
} | ||
} | ||
|
||
&__interlink { | ||
display: block; | ||
} | ||
|
||
&__cell--header { | ||
width: 200px; | ||
font-size: 14px; | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
@media screen and (max-width: $mobile-device-width) { | ||
.bi-block-ext { | ||
&__cell { | ||
padding: ($grid-offset-step * 2) ($grid-offset-step * 2); | ||
border-bottom: 0; | ||
} | ||
|
||
&__cell--header + &__cell { | ||
border-top: 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nt/src/components/transaction/transaction-io-summary/transaction-io-summary.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Ergo blockchain explorer | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* OpenAPI spec version: 2.0.0 | ||
* | ||
* | ||
* NOTE: This class is auto generated by the swagger code generator program. | ||
* https://github.com/swagger-api/swagger-codegen.git | ||
* Do not edit the class manually. | ||
*/import { Digest32 } from './digest32'; | ||
import { KeyValueItem } from './keyValueItem'; | ||
import { ModifierId } from './modifierId'; | ||
|
||
|
||
export interface BlockExtension { | ||
headerId: ModifierId; | ||
digest: Digest32; | ||
/** | ||
* List of key-value records | ||
*/ | ||
fields: Array<KeyValueItem>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.