Commit b11c2493 authored by Dan Notestein's avatar Dan Notestein
Browse files

Merge branch 'proposal-page-improvement' into 'develop'

Add missing 'receiver', show proposal's funding type

See merge request !51
parents 57298a69 ff446c4e
......@@ -37,7 +37,7 @@ export const DEFAULT_CURRENCY = 'USD';
export const ALLOWED_CURRENCIES = ['USD'];
export const FRACTION_DIGITS = 2; // default amount of decimal digits
export const FRACTION_DIGITS_MARKET = 3; // accurate amount of deciaml digits (example: used in market)
export const REFUND_ACCOUNTS = ['steem.dao', 'hive.fund'];
// meta info
export const TWITTER_HANDLE = '@hiveblocks';
export const SHARE_IMAGE =
......
......@@ -7,7 +7,7 @@ import tt from 'counterpart';
import cx from 'classnames';
import Userpic, { SIZE_SMALL } from 'app/components/elements/Userpic';
import { numberWithCommas } from 'app/utils/StateFunctions';
import { APP_URL } from 'app/client_config';
import { APP_URL, REFUND_ACCOUNTS } from 'app/client_config';
import Icon from 'app/components/elements/Icon';
......@@ -42,6 +42,7 @@ export function Proposal(props) {
total_vesting_shares,
total_vesting_fund_hive
);
const fundingType = REFUND_ACCOUNTS.includes(receiver) ? 'refund' : 'burn';
const classUp = cx('Voting__button', 'Voting__button-up', {
'Voting__button--upvoted': isUpVoted,
......@@ -81,14 +82,23 @@ export function Proposal(props) {
>
{startedOrFinished(start, end)}
</span>
<span
className={cx('status', 'funding-type', fundingType)}
title={tt(`proposals.${fundingType}`)}
>
{tt(`proposals.${fundingType}`)}
</span>
</div>
<div className="proposals__row details">
<Userpic account={creator} size={SIZE_SMALL} />
<div className="creator">
{tt('proposals.by')}&nbsp;{linkifyUsername(creator)}
{creator != receiver
? ` ${tt('proposals.for')} `
: null}
{creator != receiver ? (
<span>
&nbsp;{tt('proposals.for')}&nbsp;
{linkifyUsername(receiver)}
</span>
) : null}
</div>
</div>
</div>
......
......@@ -140,13 +140,23 @@
display: flex;
align-items: center;
padding: 0 0.2rem;
margin: 0 1rem 0 0.5rem;
margin: 0 0 0 0.5rem;
border-radius: 0.3rem;
font-size: 0.7rem;
@include themify($themes) {
border: 1px solid themed('colorAccent');
color: themed('colorAccent');
}
&.funding-type {
&.burn {
border: 1px solid $color-orange;
color: $color-orange;
}
&.refund {
border: 1px solid green;
color: green;
}
}
}
@media only screen and (max-width: 768px) {
......
......@@ -784,6 +784,8 @@
"title": "Proposals",
"status": "Status",
"order": "Order by",
"refund": "refund",
"burn": "burn",
"status_options": {
"all": "All",
"active": "Active",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment