-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add csm staking * Fix content * Fix rewards
- Loading branch information
1 parent
88eaef1
commit 7413a1c
Showing
21 changed files
with
722 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,21 @@ | ||
// Copyright 2017-2021 @polkadot/apps-routing authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import type { TFunction } from 'i18next'; | ||
import type { Route } from './types'; | ||
|
||
import Component from '@polkadot/app-csmStaking'; | ||
|
||
export default function create (t: TFunction): Route { | ||
return { | ||
Component, | ||
display: { | ||
needsApi: [ | ||
] | ||
}, | ||
group: 'csmStaking', | ||
icon: '500px', | ||
name: 'csmStaking', | ||
text: t('nav.csmStaking', 'CSM Staking', { ns: 'apps-routing' }) | ||
}; | ||
} |
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
Empty file.
Empty file.
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 @@ | ||
# @polkadot/app-csmStaking |
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,11 @@ | ||
{ | ||
"name": "@polkadot/app-csmStaking", | ||
"private": true, | ||
"version": "0.74.1", | ||
"main": "index.js", | ||
"repository": "github:polkadot-js/apps", | ||
"author": "yuhui <[email protected]>", | ||
"maintainers": [], | ||
"contributors": [], | ||
"license": "Apache-2.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2017-2021 @polkadot/app-accounts authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
/* eslint-disable */ | ||
|
||
import type { ActionStatus } from '@polkadot/react-components/Status/types'; | ||
|
||
import React, { } from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
interface Props { | ||
className?: string; | ||
onStatusChange: (status: ActionStatus) => void; | ||
} | ||
|
||
|
||
function Actions ({ }: Props): React.ReactElement<Props> { | ||
|
||
return ( | ||
<div className={'comingsoon'}/> | ||
); | ||
} | ||
|
||
export default React.memo(styled(Actions)` | ||
.filter--tags { | ||
.ui--Dropdown { | ||
padding-left: 0; | ||
label { | ||
left: 1.55rem; | ||
} | ||
} | ||
} | ||
`); |
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,93 @@ | ||
// Copyright 2017-2021 @polkadot/app-staking authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
/* eslint-disable */ | ||
|
||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
import { CardSummary, Spinner, SummaryBox } from '@polkadot/react-components'; | ||
import { useTranslation } from '@polkadot/apps/translate'; | ||
|
||
interface Props { | ||
nominators?: string[]; | ||
} | ||
|
||
function Summary({ }: Props): React.ReactElement<Props> { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<SummaryBox> | ||
<section className='media--800'> | ||
<CardSummary label={t<string>('Total Rewards')}> | ||
{<>{`54,000 CRU`}</>} | ||
</CardSummary> | ||
</section> | ||
<section> | ||
<CardSummary | ||
className='media--1000' | ||
label={t<string>('Issued Rewards')} | ||
> | ||
<Spinner noLabel /> | ||
</CardSummary> | ||
</section> | ||
<section> | ||
<CardSummary | ||
className='media--1100' | ||
label={t<string>('Pending Rewards')} | ||
> | ||
<Spinner noLabel /> | ||
</CardSummary> | ||
</section> | ||
<section> | ||
<CardSummary | ||
className='media--1100' | ||
label={t<string>('Daily Rewards')} | ||
> | ||
{<>{`400 CRU`}</>} | ||
</CardSummary> | ||
</section> | ||
<section> | ||
|
||
<CardSummary | ||
className='media--1100' | ||
label={t<string>('Storage Rewards')} | ||
> | ||
<Spinner noLabel /> | ||
</CardSummary> | ||
</section> | ||
<section> | ||
|
||
<CardSummary | ||
className='media--1100' | ||
label={t<string>('Effective stake')} | ||
> | ||
<Spinner noLabel /> | ||
</CardSummary> | ||
</section> | ||
<section> | ||
<CardSummary | ||
className='media--1100' | ||
label={t<string>('Daily Rewards per 1K CSM')} | ||
> | ||
<Spinner noLabel /> | ||
</CardSummary> | ||
</section> | ||
</SummaryBox> | ||
); | ||
} | ||
|
||
export default React.memo(styled(Summary)` | ||
.validator--Account-block-icon { | ||
display: inline-block; | ||
margin-right: 0.75rem; | ||
margin-top: -0.25rem; | ||
vertical-align: middle; | ||
} | ||
.validator--Summary-authors { | ||
.validator--Account-block-icon+.validator--Account-block-icon { | ||
margin-left: -1.5rem; | ||
} | ||
} | ||
`); |
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,39 @@ | ||
// Copyright 2017-2021 @polkadot/app-accounts authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
/* eslint-disable */ | ||
|
||
import type { ActionStatus } from '@polkadot/react-components/Status/types'; | ||
|
||
import React, { } from 'react'; | ||
import styled from 'styled-components'; | ||
import promotional from '../images/promotional.png'; | ||
import Summary from './Summary'; | ||
|
||
interface Props { | ||
className?: string; | ||
onStatusChange: (status: ActionStatus) => void; | ||
} | ||
|
||
|
||
function Overview ({ }: Props): React.ReactElement<Props> { | ||
|
||
return (<> | ||
{/* <div className={'promotional'}/> */} | ||
<img src={promotional as string} style={{ "marginRight":"auto", 'textAlign': 'center', 'display': 'block'}}></img> | ||
<Summary></Summary> | ||
<div className={'comingsoon'}/> | ||
</> | ||
); | ||
} | ||
|
||
export default React.memo(styled(Overview)` | ||
.filter--tags { | ||
.ui--Dropdown { | ||
padding-left: 0; | ||
label { | ||
left: 1.55rem; | ||
} | ||
} | ||
} | ||
`); |
Oops, something went wrong.