Commit 8027542c authored by Jonathan Porta's avatar Jonathan Porta
Browse files

Final (hopefully) Cleanup

parent d3c3fd6c
{
"database_url": "mysql://root:password@127.0.0.1/steemit_dev",
"disable_signups": false,
"facebook_app_id": false,
"google_analytics_id": false,
"helmet": {
"directives": {
"childSrc": "'self'",
"connectSrc": "'self' steemit.com https://api.steemit.com https://testnet.steemitdev.com",
"defaultSrc": "'self'",
"fontSrc": "data: fonts.gstatic.com",
"frameAncestors": "'none'",
"imgSrc": "* data:",
"objectSrc": "'none'",
"pluginTypes": "application/pdf",
"scriptSrc": "'self' www.google-analytics.com",
"styleSrc": "'self' 'unsafe-inline' fonts.googleapis.com",
"reportUri": "/api/v1/csp_violation"
"database_url": "mysql://root:password@127.0.0.1/steemit_dev",
"disable_signups": false,
"facebook_app_id": false,
"google_analytics_id": false,
"helmet": {
"directives": {
"childSrc": "'self'",
"connectSrc":
"'self' steemit.com https://api.steemit.com https://testnet.steemitdev.com api.blocktrades.us",
"defaultSrc": "'self'",
"fontSrc": "data: fonts.gstatic.com",
"frameAncestors": "'none'",
"imgSrc": "* data:",
"objectSrc": "'none'",
"pluginTypes": "application/pdf",
"scriptSrc": "'self' www.google-analytics.com",
"styleSrc": "'self' 'unsafe-inline' fonts.googleapis.com",
"reportUri": "/api/v1/csp_violation"
},
"reportOnly": false,
"setAllHeaders": true
},
"reportOnly": false,
"setAllHeaders": true
},
"img_proxy_prefix": "https://steemitdevimages.com/",
"ipfs_prefix": false,
"mixpanel": false,
"newrelic": false,
"notify": {
"gcm_key": "google secret key"
},
"read_only_mode": false,
"recaptcha": {
"secret_key": false,
"site_key": false
},
"registrar": {
"account": "-",
"fee": "0.5 STEEM",
"delegation": "150250.000000 VESTS",
"signing_key": "5J..."
},
"requestAccountRecovery": {
"recovery_account": "steem",
"signing_key": "5J..."
},
"sendgrid": {
"from": "noreply@example.com",
"key": "SG.xxx_yyyy",
"templates": {
"confirm_email": false,
"waiting_list_invite": false
}
},
"server_session_secret": "exiKdyF+IwRIXJDmtGIl4vWUz4i3eVSISpfZoeYc0s4=",
"session_cookie_key": "stm-dev",
"session_key": "steemses",
"site_domain": "steemitdev.com",
"tarantool": {
"host": "localhost",
"password": "",
"port": "3301",
"username": "guest"
},
"telesign": {
"customer_id": false,
"rest_api_key": false
},
"twilio": {
"account_sid": false,
"auth_token": false
},
"upload_image": false,
"steemd_connection_client": "https://api.steemit.com",
"steemd_connection_server": "https://api.steemit.com",
"steemd_use_appbase": false,
"chain_id": "0000000000000000000000000000000000000000000000000000000000000000",
"address_prefix": "STM",
"conveyor_posting_wif": false,
"conveyor_username": false,
"social_url": "https://steemit.com"
"img_proxy_prefix": "https://steemitdevimages.com/",
"ipfs_prefix": false,
"mixpanel": false,
"newrelic": false,
"notify": {
"gcm_key": "google secret key"
},
"read_only_mode": false,
"recaptcha": {
"secret_key": false,
"site_key": false
},
"registrar": {
"account": "-",
"fee": "0.5 STEEM",
"delegation": "150250.000000 VESTS",
"signing_key": "5J..."
},
"requestAccountRecovery": {
"recovery_account": "steem",
"signing_key": "5J..."
},
"sendgrid": {
"from": "noreply@example.com",
"key": "SG.xxx_yyyy",
"templates": {
"confirm_email": false,
"waiting_list_invite": false
}
},
"server_session_secret": "exiKdyF+IwRIXJDmtGIl4vWUz4i3eVSISpfZoeYc0s4=",
"session_cookie_key": "stm-dev",
"session_key": "steemses",
"site_domain": "steemitdev.com",
"tarantool": {
"host": "localhost",
"password": "",
"port": "3301",
"username": "guest"
},
"telesign": {
"customer_id": false,
"rest_api_key": false
},
"twilio": {
"account_sid": false,
"auth_token": false
},
"upload_image": false,
"steemd_connection_client": "https://api.steemit.com",
"steemd_connection_server": "https://api.steemit.com",
"steemd_use_appbase": false,
"chain_id":
"0000000000000000000000000000000000000000000000000000000000000000",
"address_prefix": "STM",
"conveyor_posting_wif": false,
"conveyor_username": false,
"social_url": "https://steemit.com"
}
......@@ -25,7 +25,6 @@
@import './elements/SanitizedLink/styles';
@import './elements/HelpTip/styles';
@import './elements/Dropdown';
@import './elements/Pagination/styles';
// modules
@import './modules/Header/styles';
......
import React from 'react';
import Icon from 'app/components/elements/Icon';
class Pagination extends React.Component {
constructor(props) {
super(props);
this.onNextPage = this.onNextPage.bind(this);
this.onPreviousPage = this.onPreviousPage.bind(this);
}
onNextPage() {
this.props.onNextPage();
}
onPreviousPage() {
this.props.onPreviousPage();
}
render() {
const { previousAvailable, nextAvailable } = this.props;
return (
<div className="Pagination">
<button
disabled={!previousAvailable}
className="button-previous"
onClick={this.onPreviousPage}
>
<Icon name="chevron-left" size="1_5x" />
</button>
{/* implement page numbers */}
<button
disabled={!nextAvailable}
className="button-next"
onClick={this.onNextPage}
>
<Icon name="chevron-left" size="1_5x" />
</button>
</div>
);
}
}
export default Pagination;
export { default } from './Pagination';
.Pagination {
display: flex;
ul.pagination-list {
margin-left: 0;
margin-bottom: 0;
list-style: none;
display: inline-flex;
li {
width: 30px;
display: flex;
justify-content: center;
cursor: pointer;
font-size: 1.25em;
&.active {
color: $color-teal;
}
}
}
button {
cursor: pointer;
margin-right: 0 !important;
padding: 0 !important;
}
button:disabled,
button[disabled] {
opacity: 0.3;
pointer-events: none;
}
.button-next {
svg {
transform: rotate(180deg);
}
}
}
......@@ -83,22 +83,25 @@ export default function Proposal(props) {
</small>
<br />
<small>
by {linkifyUsername(creator)} for{' '}
{linkifyUsername(
checkIfSameUser(creator, receiver, 'themselves.'),
receiver
)}
by {linkifyUsername(creator)}
{creator != receiver ? ' for ' : null}
{creator != receiver
? linkifyUsername(
checkIfSameUser(creator, receiver, 'themselves.'),
receiver
)
: null}
</small>
</div>
<div className="proposals__amount">
<span>
<a href="#" title={formatCurrency(totalPayout)}>
<em>${abbreviateNumber(totalPayout)}</em>
<em>{abbreviateNumber(totalPayout)} SBD</em>
</a>
</span>
<small>
${abbreviateNumber(daily_pay.split(' SBD')[0])} per day for{' '}
{durationInDays} days
{abbreviateNumber(daily_pay.split(' SBD')[0])} SBD per day
for {durationInDays} days
</small>
</div>
</div>
......
......@@ -7,7 +7,6 @@ import secureRandom from 'secure-random';
import { PrivateKey, PublicKey } from '@steemit/steem-js/lib/auth/ecc';
import { api, broadcast, auth, memo } from '@steemit/steem-js';
// import { getAccount, listVoterProposals } from 'app/redux/ProposalSaga';
import { getAccount } from 'app/redux/ProposalSaga';
import { findSigningKey } from 'app/redux/AuthSaga';
import * as appActions from 'app/redux/AppReducer';
......@@ -27,13 +26,10 @@ export const transactionWatches = [
const hook = {
preBroadcast_transfer,
preBroadcast_account_witness_vote,
// preBroadcast_update_proposal_votes,
// preBroadcast_remove_proposal,
error_account_witness_vote,
accepted_account_witness_vote,
accepted_account_update,
accepted_withdraw_vesting,
// accepted_update_proposal_votes,
};
export function* preBroadcast_transfer({ operation }) {
......@@ -86,23 +82,6 @@ function* error_account_witness_vote({
);
}
// function* preBroadcast_update_proposal_votes({ operation, username }) {
// if (!operation.voter) operation.voter = username;
// const { voter, proposal_ids } = operation;
// yield put(
// proposalActions.addActiveProposalVote({
// voter,
// proposal_ids,
// })
// );
// return operation;
// }
//
// function preBroadcast_remove_proposal({ operation, username }) {
// if (!operation.proposal_owner) operation.proposal_owner = username;
// return operation;
// }
/** Keys, username, and password are not needed for the initial call. This will check the login and may trigger an action to prompt for the password / key. */
export function* broadcastOperation({
payload: {
......@@ -228,7 +207,6 @@ function hasPrivateKeys(payload) {
function* broadcastPayload({
payload: { operations, keys, username, successCallback, errorCallback },
}) {
// console.log('broadcastPayload')
if ($STM_Config.read_only_mode) return;
for (const [type] of operations) // see also transaction/ERROR
yield put(
......@@ -363,25 +341,6 @@ function* accepted_account_witness_vote({
);
}
// function* accepted_update_proposal_votes({
// operation: { voter, proposal_ids },
// }) {
// yield call(listVoterProposals, {
// start: voter,
// order_by: 'by_creator',
// order_direction: 'ascending',
// limit: 1000,
// status: 'votable',
// });
//
// // yield put(
// // proposalActions.removeActiveProposalVote({
// // voter,
// // proposal_ids,
// // })
// // );
// }
function* accepted_withdraw_vesting({ operation }) {
let [account] = yield call(
[api, api.getAccountsAsync],
......
......@@ -28,7 +28,6 @@ export function serverApiLogout() {
let last_call;
export function serverApiRecordEvent(type, val, rate_limit_ms = 5000) {
return;
if (!process.env.BROWSER || window.$STM_ServerBusy) return;
if (last_call && new Date() - last_call < rate_limit_ms) return;
last_call = new Date();
......@@ -37,14 +36,13 @@ export function serverApiRecordEvent(type, val, rate_limit_ms = 5000) {
'overseer.collect',
{ collection: 'event', metadata: { type, value } },
error => {
// if (error) console.warn('overseer error', error, error.data);
if (error) console.warn('overseer error', error, error.data);
}
);
}
let last_page, last_views, last_page_promise;
export function recordPageView(page, referer, account) {
return Promise.resolve(0);
if (last_page_promise && page === last_page) return last_page_promise;
if (!process.env.BROWSER) return Promise.resolve(0);
......@@ -64,7 +62,7 @@ export function recordPageView(page, referer, account) {
export function saveCords(x, y) {
const request = Object.assign({}, request_base, {
body: JSON.stringify({ csrf: $STM_csrf, x: x, y: y }),
body: JSON.stringify({ csrf: $STM_csrf, x, y }),
});
fetch('/api/v1/save_cords', request);
}
......
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