Adjust prices, add negative protocoin warning
This commit is contained in:
parent
7c0b44477a
commit
d946348fec
|
@ -1312,6 +1312,9 @@ class ProtocoinViewSet(Base):
|
|||
logger.error(msg)
|
||||
return Response(200)
|
||||
|
||||
# status 0 = complete
|
||||
# status 3 = cancelled
|
||||
|
||||
is_completed = request.data['job_status'] == '0'
|
||||
is_print = request.data['source'] == '1'
|
||||
|
||||
|
@ -1335,8 +1338,8 @@ class ProtocoinViewSet(Base):
|
|||
logger.error(msg)
|
||||
return Response(200)
|
||||
|
||||
INK_PROTOCOIN_PER_ML = 0.20
|
||||
DEFAULT_PAPER_PROTOCOIN_PER_M = 0.25
|
||||
INK_PROTOCOIN_PER_ML = 0.75
|
||||
DEFAULT_PAPER_PROTOCOIN_PER_M = 0.50
|
||||
PROTOCOIN_PER_PRINT = 2.0
|
||||
|
||||
total_cost = PROTOCOIN_PER_PRINT
|
||||
|
|
|
@ -22,6 +22,11 @@ function MemberInfo(props) {
|
|||
|
||||
return (
|
||||
<div>
|
||||
{member.protocoin < 0 && <Message error>
|
||||
<Message.Header>Your Protocoin balance is negative!</Message.Header>
|
||||
<p>Visit the <Link to='/paymaster'>Paymaster</Link> page or pay a Director to buy Protocoin.</p>
|
||||
</Message>}
|
||||
|
||||
<Grid stackable>
|
||||
<Grid.Column width={5}>
|
||||
<Image
|
||||
|
@ -231,9 +236,11 @@ export function Home(props) {
|
|||
const getTrackAgo = (x) => stats && stats.track && stats.track[x] ? moment.unix(stats.track[x]['time']).tz('America/Edmonton').fromNow() : '';
|
||||
const getTrackName = (x) => stats && stats.track && stats.track[x] && stats.track[x]['first_name'] ? stats.track[x]['first_name'] : 'Unknown';
|
||||
|
||||
const alarmStat = () => stats && stats.alarm && moment().unix() - stats.alarm['time'] < 300 ? stats.alarm['data'] < 270 ? 'Armed' : 'Disarmed' : 'Unknown';
|
||||
//const alarmStat = () => stats && stats.alarm && moment().unix() - stats.alarm['time'] < 300 ? stats.alarm['data'] < 270 ? 'Armed' : 'Disarmed' : 'Unknown';
|
||||
const alarmStat = () => 'Unknown';
|
||||
|
||||
const doorOpenStat = () => alarmStat() === 'Disarmed' && stats.alarm['data'] > 360 ? ', door open' : '';
|
||||
//const doorOpenStat = () => alarmStat() === 'Disarmed' && stats.alarm['data'] > 360 ? ', door open' : '';
|
||||
const doorOpenStat = () => '';
|
||||
|
||||
const show_signup = stats?.at_protospace;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user