Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/ResolveRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import GDPRUserList from './utils/GDPRUserList';

export const routeRegex = {
UserProfile1: /^\/(@[\w\.\d-]+)\/?$/,
UserProfile2: /^\/(@[\w\.\d-]+)\/(transfers|curation-rewards|author-rewards|permissions|communities|password|settings|delegations)\/?$/,
UserProfile2: /^\/(@[\w\.\d-]+)\/(transfers|curation-rewards|author-rewards|permissions|communities|password|settings|delegations|proposals|witnesses|steem_tools)\/?$/,
};

export default function resolveRoute(path) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/ResolveRoute.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('routeRegex', () => {
['UserProfile1', /^\/(@[\w\.\d-]+)\/?$/],
[
'UserProfile2',
/^\/(@[\w\.\d-]+)\/(transfers|curation-rewards|author-rewards|permissions|communities|password|settings|delegations)\/?$/,
/^\/(@[\w\.\d-]+)\/(transfers|curation-rewards|author-rewards|permissions|communities|password|settings|delegations|proposals|witnesses|steem_tools)\/?$/,
],
];

Expand Down
24 changes: 24 additions & 0 deletions src/app/assets/stylesheets/_themes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ $themes: (
backgroundColorOpaque: $color-background-off-white,
backgroundTransparent: transparent,
backgroundColorWarning: $color-background-warning,
backgroundColorDanger: $alert-color,
backgroundColorSecondary: $color-white,
moduleBackgroundColor: $color-white,
sectionBackgroundColor: $color-white,
menuBackgroundColor: $color-background-dark,
moduleMediumBackgroundColor: $color-white,
navBackgroundColor: $color-white,
Expand All @@ -20,6 +23,7 @@ $themes: (
borderDark: 1px solid $color-text-gray,
borderAccent: 1px solid $color-blue,
borderWarning: 1px solid $color-text-warning,
borderDanger: 1px solid $alert-color,
borderTransparent: transparent,
roundedCorners: 5px,
roundedCornersTop: 5px 5px 0 0,
Expand All @@ -30,13 +34,17 @@ $themes: (
textColorAccent: $color-text-blue,
textColorAccentHover: $color-blue-original-dark,
textColorError: $color-text-red,
textColorOnDanger: $color-white,
contentBorderAccent: $color-transparent,
buttonBackground: $color-blue-original-dark,
buttonBackgroundHover: $color-blue-original-light,
buttonText: $color-text-white,
buttonTextShadow: 0 1px 0 rgba(0,0,0,0.20),
buttonTextHover: $color-text-white,
buttonBoxShadow: $color-transparent,
overlayBackground: rgba(0, 0, 0, 0.35),
codeBlockBackground: #1e1e1e,
codeBlockText: #d4d4d4,
),
light: (
colorAccent: $color-teal,
Expand All @@ -48,7 +56,10 @@ $themes: (
backgroundColorOpaque: $color-background-off-white,
backgroundTransparent: transparent,
backgroundColorWarning: $color-background-warning,
backgroundColorDanger: $alert-color,
backgroundColorSecondary: $color-white,
moduleBackgroundColor: $color-white,
sectionBackgroundColor: $color-white,
menuBackgroundColor: $color-background-dark,
moduleMediumBackgroundColor: $color-transparent,
navBackgroundColor: $color-white,
Expand All @@ -59,6 +70,7 @@ $themes: (
borderDark: 1px solid $color-text-gray,
borderAccent: 1px solid $color-teal,
borderWarning: 1px solid $color-text-warning,
borderDanger: 1px solid $alert-color,
borderTransparent: transparent,
roundedCorners: 5px,
roundedCornersTop: 5px 5px 0 0,
Expand All @@ -69,6 +81,7 @@ $themes: (
textColorAccent: $color-text-teal,
textColorAccentHover: $color-teal,
textColorError: $color-text-red,
textColorOnDanger: $color-white,
contentBorderAccent: $color-teal,
buttonBackground: $color-blue-black,
buttonBackgroundHover: $color-teal,
Expand All @@ -77,6 +90,9 @@ $themes: (
buttonTextHover: $color-white,
buttonBoxShadow: $color-teal,
buttonBoxShadowHover: $color-blue-black,
overlayBackground: rgba(0, 0, 0, 0.35),
codeBlockBackground: #1e1e1e,
codeBlockText: #d4d4d4,
),
dark: (
colorAccent: $color-teal,
Expand All @@ -87,7 +103,10 @@ $themes: (
backgroundColorEmphasis: $color-background-super-dark,
backgroundColorOpaque: $color-blue-dark,
backgroundColorWarning: $color-background-warning-dark,
backgroundColorDanger: $alert-color,
backgroundColorSecondary: $color-blue-dark,
moduleBackgroundColor: $color-background-dark,
sectionBackgroundColor: $color-blue-dark,
backgroundTransparent: transparent,
menuBackgroundColor: $color-blue-dark,
moduleMediumBackgroundColor: $color-background-dark,
Expand All @@ -99,6 +118,7 @@ $themes: (
borderDark: 1px solid $color-text-gray-light,
borderAccent: 1px solid $color-teal,
borderWarning: 1px solid $color-background-warning-dark,
borderDanger: 1px solid $alert-color,
borderTransparent: transparent,
roundedCorners: 5px,
roundedCornersTop: 5px 5px 0 0,
Expand All @@ -109,6 +129,7 @@ $themes: (
textColorAccent: $color-teal,
textColorAccentHover: $color-teal-light,
textColorError: $color-text-red,
textColorOnDanger: $color-white,
contentBorderAccent: $color-teal,
buttonBackground: $color-white,
buttonBackgroundHover: $color-teal,
Expand All @@ -118,6 +139,9 @@ $themes: (
buttonBoxShadow: $color-teal,
buttonBoxShadowHover: $color-white,
inputPriceWarning: rgba(255, 153, 0, 0.83),
overlayBackground: rgba(0, 0, 0, 0.35),
codeBlockBackground: #10151b,
codeBlockText: #d4d4d4,
),
);

Expand Down
4 changes: 4 additions & 0 deletions src/app/client_config.js
Comment thread
VictorVonFrankenstein marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ export const SITE_DESCRIPTION =

// various
export const SUPPORT_EMAIL = 'support@' + APP_DOMAIN;

// External links
export const STEEMDB_BLOCK_URL = "https://steemdb.io/block";
export const STEEMDB_TRANSACTION_URL = "https://steemdb.io/tx";
4 changes: 4 additions & 0 deletions src/app/components/all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
@import './elements/OutgoingDelegations';
@import './elements/VotersModal';
@import './elements/ProposalCreatorModal';
@import './elements/RouteSettings';
@import './elements/WithdrawRoutesModal';
@import './elements/SteemToolsContent/SteemToolsContent';
@import './elements/SteemToolsContent/SteemToolsMenu';

// modules
@import './modules/Header/styles';
Expand Down
11 changes: 10 additions & 1 deletion src/app/components/cards/TransferHistoryRow/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ import Memo from 'app/components/elements/Memo';
import { numberWithCommas, vestsToSp } from 'app/utils/StateFunctions';
import tt from 'counterpart';
import GDPRUserList from 'app/utils/GDPRUserList';
import { STEEMDB_BLOCK_URL, STEEMDB_TRANSACTION_URL } from 'app/client_config';

class TransferHistoryRow extends React.Component {
render() {
const {
op,
context,
block,
trx,
curation_reward,
author_reward,
benefactor_reward,
Expand Down Expand Up @@ -287,8 +290,14 @@ class TransferHistoryRow extends React.Component {
}
return (
<tr key={op[0]} className="Trans">
<td>
<td style={{ whiteSpace: 'nowrap', width: '1%' }}>
<TimeAgoWrapper date={op[1].timestamp} />
{block && (<div>
Block: <a href={`${STEEMDB_BLOCK_URL}/${block}`} target="_blank" >{block}</a>
</div>)}
{(trx && trx !== '0000000000000000000000000000000000000000') && (<div>
TxID: <a href={`${STEEMDB_TRANSACTION_URL}/${trx}`} target="_blank" >{trx}</a>
</div>)}
</td>
<td
className="TransferHistoryRow__text"
Expand Down
76 changes: 76 additions & 0 deletions src/app/components/elements/ConfirmAuthorityManagement/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import React from 'react';
import PropTypes from 'prop-types';
import tt from 'counterpart';

const LABELS = {
action: () =>
tt('steem_tools.authority_management.confirm_action', {
fallback: 'Action',
}),
account: () =>
tt('steem_tools.authority_management.account_to_modify', {
fallback: 'Account',
}),
authority_type: () =>
tt('steem_tools.authority_management.authority_type', {
fallback: 'Authority Type',
}),
target_account: () =>
tt('steem_tools.authority_management.add_account_authority', {
fallback: 'Account Authority',
}),
weight: () =>
tt('steem_tools.authority_management.weight', {
fallback: 'Weight',
}),
weight_threshold: () =>
tt('steem_tools.authority_management.weight_threshold', {
fallback: 'Weight Threshold',
}),
};

const ConfirmAuthorityManagement = ({ operation }) => {
const fields = Object.keys(operation).filter((key) => {
const value = operation[key];
return value !== undefined && value !== null && value !== '';
});

return (
<div className="info">
{fields.map((key, index) => (
<div
key={`authority-management-group-${index}`}
className="input-group"
>
<span
className="input-group-label"
key={`authority-management-label-${index}`}
>
{LABELS[key] ? LABELS[key]() : key}
</span>
<input
className="input-group-field"
type="text"
required
value={String(operation[key])}
disabled={true}
key={`authority-management-input-${index}`}
/>
</div>
))}
</div>
);
};

ConfirmAuthorityManagement.propTypes = {
operation: PropTypes.shape({
action: PropTypes.string,
account: PropTypes.string,
authority_type: PropTypes.string,
target_account: PropTypes.string,
weight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
weight_threshold: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
}).isRequired,
};

export default ConfirmAuthorityManagement;
87 changes: 87 additions & 0 deletions src/app/components/elements/ConfirmCreateWitness/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import React from 'react';
import PropTypes from 'prop-types';
import tt from 'counterpart';

const ConfirmCreateWitness = ({ operation }) => {
const {
owner,
url,
new_signing_key,
account_creation_fee,
maximum_block_size,
sbd_interest_rate,
mode,
} = operation;

const modeLabel =
mode === 'update'
? tt('steem_tools.create_witness.confirm_mode_update')
: tt('steem_tools.create_witness.confirm_mode_create');

return (
<div className="info">
<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.create_witness.witness_account')}
</span>
<input className="input-group-field" type="text" value={`@${owner}`} disabled={true} />
</div>

<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.create_witness.confirm_mode')}
</span>
<input className="input-group-field" type="text" value={modeLabel} disabled={true} />
</div>

<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.create_witness.block_signing_key')}
</span>
<input className="input-group-field" type="text" value={new_signing_key} disabled={true} />
</div>

<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.create_witness.witness_url')}
</span>
<input className="input-group-field" type="text" value={url} disabled={true} />
</div>

<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.create_witness.account_creation_fee')}
</span>
<input className="input-group-field" type="text" value={account_creation_fee} disabled={true} />
</div>

<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.create_witness.maximum_block_size')}
</span>
<input className="input-group-field" type="text" value={String(maximum_block_size)} disabled={true} />
</div>

<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.create_witness.sbd_interest_rate')}
</span>
<input className="input-group-field" type="text" value={String(sbd_interest_rate)} disabled={true} />
</div>
</div>
);
};

ConfirmCreateWitness.propTypes = {
operation: PropTypes.shape({
owner: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
new_signing_key: PropTypes.string.isRequired,
account_creation_fee: PropTypes.string.isRequired,
maximum_block_size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
sbd_interest_rate: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
mode: PropTypes.oneOf(['create', 'update']).isRequired,
}).isRequired,
};

export default ConfirmCreateWitness;
42 changes: 42 additions & 0 deletions src/app/components/elements/ConfirmDisableWitness/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React from 'react';
import PropTypes from 'prop-types';
import tt from 'counterpart';

const ConfirmDisableWitness = ({ operation }) => {
const { owner, current_signing_key, new_signing_key } = operation;

return (
<div className="info">
<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.disable_witness.witness_account')}
</span>
<input className="input-group-field" type="text" value={`@${owner}`} disabled={true} />
</div>

<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.disable_witness.current_signing_key')}
</span>
<input className="input-group-field" type="text" value={current_signing_key || ''} disabled={true} />
</div>

<div className="input-group">
<span className="input-group-label" style={{ textTransform: 'capitalize' }}>
{tt('steem_tools.disable_witness.null_signing_key')}
</span>
<input className="input-group-field" type="text" value={new_signing_key} disabled={true} />
</div>
</div>
);
};

ConfirmDisableWitness.propTypes = {
operation: PropTypes.shape({
owner: PropTypes.string.isRequired,
current_signing_key: PropTypes.string,
new_signing_key: PropTypes.string.isRequired,
}).isRequired,
};

export default ConfirmDisableWitness;
Loading