aeonfunding update for wownero

a lot more generic; a lot more configurable; UI goodness with accounting; wallet account support for ezmode
This commit is contained in:
CamTheGeek 2018-09-05 18:27:26 -04:00
parent f473a4234e
commit 955de2544e
19 changed files with 361 additions and 173 deletions

View file

@ -24,7 +24,7 @@
</p>
<b>Example:</b>
<pre>curl -vvX GET 'https://funding.wownero.com/api/1/convert/wow-usd?wow=1000'</pre>
<pre>curl -vvX GET 'https://funding.wownero.com/api/1/convert/wow-usd?amount=1000'</pre>
<b>Response:</b>
<pre>{"usd": 6.7}</pre>

View file

@ -14,7 +14,7 @@
padding-left:4px;
}
</style>
<div class="col-lg-12" id="xox">
<div class="col-lg-8" id="xox">
<h3>Secure login </h3>
<img src="/static/nasa.png"/>
<img src="/static/cyber.png"/>
@ -46,9 +46,10 @@
</div>
</form>
</div>
<div class="col-lg-12">
<div class="col-lg-5 center">
<a href="/register">Or register here</a>
</div>
{% include 'sidebar.html' %}
</div>
</div>
<br>

View file

@ -6,7 +6,7 @@
<th>Username</th>
<th id="date">Date</th>
{% if _proposals and _proposals[0].status >= 2 %}
<th style="text-align: right;">Funding</th>
<th style="text-align: right;">Funded</th>
{% else %}
<th></th>
{% endif %}
@ -41,4 +41,4 @@
{% endfor %}
</tbody>
</table>
{% endmacro %}
{% endmacro %}

View file

@ -11,11 +11,6 @@
<!-- Title -->
<h1 class="mt-4" style="margin-bottom: 0.1rem;">
{{ proposal.headline }}
<div id="point-wow-left">
<img src="/static/point-left.png" style="margin-left: 10px;width: 60px;">
<span style="color: #fc4dff;font-size: 16px;font-style: italic;font-weight: bold;margin-left: 6px;">wow</span>
</div>
</h1>
<p>
@ -78,8 +73,8 @@
</td>
</tr>
<tr>
<td>Progress</td>
<td><span class="badge">{{proposal.balance['pct'] |round}} %</span></td>
<td>Funded</td>
<td><span class="badge">{{proposal.balance['pct'] | round or 0}} %</span></td>
</tr>
</tbody>
</table>
@ -100,17 +95,43 @@
<hr>
</div>
<div class="col-lg-8">
{{proposal.balance['remaining'] or 0}} WOW available
{{proposal.balance['available']|round(3) or 0 }} WOW Raised
{% if (proposal.funds_target-proposal.balance['available']|float|round(3)) > 0 %}
({{ (proposal.funds_target-proposal.balance['available']|float|round(3)|int) }} WOW until goal)
{% else %}
({{ (proposal.balance['available']-proposal.funds_target|float|round(3)|int) }} WOW past goal!)
{% endif %}
<div class="progress">
<div class="progress-bar progress-warning progress-bar" style="width: {{proposal.balance['pct']}}%;">
</div>
</div>
<hr>
</div>
<br/>
<br/>
<div class="col-lg-8">
{{proposal.spends['spent']|round(3) or 0}} WOW Paid out
<div class="progress">
<div class="progress-bar progress-warning progress-bar" style="width: {{proposal.spends['spent_remaining_pct']}}%;">
</div>
</div>
<hr>
</div>
<div class="col-lg-8">
{{(proposal.balance['available']-proposal.spends['spent']) |round(3) or 0}} WOW Available to Payout
<div class="progress">
<div class="progress-bar progress-warning progress-bar" style="width: {{proposal.balance['remaining_pct']}}%;">
</div>
</div>
<hr>
</div>
<br/>
</div>
<div class="row" style="margin-top:16px;">
<div class="col-lg-12">
Donatation address:
Donation address:
<pre class="proposal_address">{% if proposal.addr_donation %}{{ proposal.addr_donation }}{% else %}<small>None generated yet</small>{% endif %}</pre>
</div>
</div>
@ -122,7 +143,6 @@
<div class="row">
<div class="col-lg-12">
<div class="alert alert-danger">
<img src="/static/doge_head.png" style="width: 64px;margin-right: 8px;">
This proposal is disabled.
</div>
</div>
@ -159,7 +179,7 @@
<br>
<a target="_blank" href="https://explore.wownero.com/tx/{{tx['txid']}}">{{tx['txid'][:32]}}...</a>
<span style="float:right;color:#008926;font-weight:bold;">
+ {{tx['amount_human']|round(2)}} WOW
+ {{tx['amount_human']|round(3)}} WOW
{% if 'amount_usd' in tx %}
<small style="color: black">
➞ $ {{tx['amount_usd']}}
@ -176,6 +196,37 @@
<!-- /.row -->
{% endif %}
{% if proposal.spends['txs'] %}
<div class="row">
<div class="col-md-12">
<div class="card my-6" id="incoming_txs">
<h5 class="card-header">Outgoing transactions <small>({{proposal.spends['txs']|length}})</small></h5>
<div class="card-body">
<ul class="list-group">
{% for tx in proposal.spends['txs'] %}
<li class="list-group-item">
{{tx['datetime'].strftime('%Y-%m-%d %H:%M')}}
<span style="float:right"><b>Blockheight</b>: {{tx['height']}}</span>
<br>
<a target="_blank" href="https://explore.wownero.com/tx/{{tx['txid']}}">{{tx['txid'][:32]}}...</a>
<span style="float:right;color:#890000;font-weight:bold;">
- {{tx['amount_human']|round(3)}} WOW
{% if 'amount_usd' in tx %}
<small style="color: black">
➞ $ {{tx['amount_usd']}}
</small>
{% endif %}
</span>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
<!-- /.row -->
{% endif %}
</div>
<script>
@ -242,4 +293,4 @@
</script>
<!-- /.container -->
{% endblock %}
{% endblock %}

View file

@ -71,6 +71,21 @@
</div>
</div>
<!-- Side Widget -->
<div class="card my-4">
<h5 class="card-header">Newest Users</h5>
<div class="card-body">
<ul class="b">
{% for user in newest_users %}
<li>
<a href="/user/{{ user.username }}"> {{ user.username }} </a>
</li>
</a>
{% endfor %}
</li>
</div>
</div>
<script>
var search_input = document.getElementById("search_input");

View file

@ -4,35 +4,62 @@
{% if user %}
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="col-lg-12">
<span class="form-text text-muted" style="margin-top: -2px;">
Details for '{{user.username}}'
Proposals made by '{{user.username}}'
</span>
</div>
</div>
<div class="row">
<div class="col-lg-8">
<div class="col-lg-12">
{% if user.proposals %}
<table class="table table-proposal table-hover" style="margin-bottom:6px;">
<tbody>
{% for p in user.proposals %}
<th>Proposal</th>
<th>Category</th>
<th>Target Amount</th>
<th>Amount Raised</th>
<th>Date</th>
{% for p in user.proposals | sort(attribute='date_added', reverse=True) %}
<tr>
<td><b><a href="/proposal/{{ p.id }}">{{ p.headline }}</a></b></td>
<td><a href="/user/{{ p.user.username }}">{{ p.user.username }}</a></td>
<td><b><a href="/proposal/{{ p.id }}">{{ p.headline | truncate(42)}}</a></b></td>
<td><a href="/proposals?cat={{ p.category }}">{{ p.category |capitalize}}</a></td>
<td>{{p.funds_target}}</td>
<td>{{p.funds_progress | round(3, 'floor')}}%</td>
<td>{{ p.date_added.strftime('%Y-%m-%d') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
This user did not submit any proposals yet.
This user has not submitted any proposals yet.
{% endif %}
<hr>
</div>
</div>
<div class="row">
<div class="col-lg-12">
Comments made by {{user.username}}
{% if user.comments %}
<table class="table table-proposal table-hover" style="margin-bottom:6px;">
<tbody>
<th>Comment</th>
<th>Proposal</th>
<th>Date</th>
{% for y in user.comments | sort(attribute='date_added', reverse=True) %}
<tr>
<td><b><a href="/proposal/{{y.proposal.id}}#comment-{{ y.id }}">{{ y.message | truncate(32)}}</a></b></td>
<td><a href="/proposal/{{y.proposal.id}}">#{{y.proposal.id }} {{ y.proposal.headline | truncate(32) }}</a></td>
<td>{{ y.date_added.strftime('%Y-%m-%d') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
This user has not submitted any proposals yet.
{% endif %}
</div>
{% include 'sidebar.html' %}
</div>
<br>
</div>
@ -40,4 +67,4 @@
No user found by that name.
{% endif %}
<!-- /.container -->
{% endblock %}
{% endblock %}