gfd
This commit is contained in:
parent
74a43a9840
commit
c4e41923f9
5 changed files with 15 additions and 17 deletions
|
@ -79,13 +79,13 @@ function awardModal(link) {
|
|||
target.action = link;
|
||||
}
|
||||
|
||||
function pick(kind) {
|
||||
function pick(kind, canbuy1, canbuy2) {
|
||||
let buy1 = document.getElementById('buy1')
|
||||
if (kind == "grass") buy1.disabled=true;
|
||||
else buy1.disabled=false;
|
||||
if (canbuy1 && kind != "grass") buy1.disabled=false;
|
||||
else buy1.disabled=true;
|
||||
let buy2 = document.getElementById('buy2')
|
||||
if (kind == "benefactor") buy2.disabled=true;
|
||||
else buy2.disabled=false;
|
||||
if (canbuy2 && kind != "benefactor") buy2.disabled=false;
|
||||
else buy2.disabled=true;
|
||||
let ownednum = Number(document.getElementById(`${kind}-owned`).textContent);
|
||||
document.getElementById('giveaward').disabled = (ownednum == 0);
|
||||
document.getElementById('kind').value=kind;
|
||||
|
|
|
@ -415,14 +415,12 @@ class Comment(Base):
|
|||
|
||||
if self.over_18 and not (v and v.over_18) and not (self.post and self.post.over_18): return True
|
||||
|
||||
if not v: return False
|
||||
|
||||
if v.filter_words and self.body and any(x in self.body for x in v.filter_words): return True
|
||||
|
||||
if self.is_banned: return True
|
||||
|
||||
if path.startswith('/post') and (self.slots_result or self.blackjack_result) and len(self.body) <= 20 and self.level > 1: return True
|
||||
|
||||
if v and v.filter_words and self.body and any(x in self.body for x in v.filter_words): return True
|
||||
|
||||
return False
|
||||
|
||||
@property
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<script src="/static/assets/js/award_modal.js?a=220"></script>
|
||||
<script src="/static/assets/js/award_modal.js?a=221"></script>
|
||||
<div class="modal fade" id="awardModal" tabindex="-1" role="dialog" aria-labelledby="awardModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered awardmodal" role="document">
|
||||
<div class="modal-content pb-4">
|
||||
|
@ -13,7 +13,7 @@
|
|||
<input autocomplete="off" type="hidden" name="formkey", value="{{v.formkey}}">
|
||||
<div class="card-columns award-columns awards-wrapper">
|
||||
{% for award in v.user_awards %}
|
||||
<a role="button" id="{{award.kind}}" class="card" onclick="pick('{{award.kind}}')">
|
||||
<a role="button" id="{{award.kind}}" class="card" onclick="pick('{{award.kind}}', {{award.price}} < {{v.procoins}}, {{award.price}} < {{v.coins}})">
|
||||
<i class="{{award.icon}} {{award.color}}"></i>
|
||||
<div class="pt-2" style="font-weight: bold; font-size: 14px; color:#E1E1E1">{{award.title}}</div>
|
||||
<div class="text-muted"><span id="{{award.kind}}-owned">{{award.owned}}</span> owned</div>
|
||||
|
|
|
@ -419,14 +419,14 @@
|
|||
</table>
|
||||
{% endif %}
|
||||
|
||||
<h5 style="font-weight:bold;text-align: center">Top 25 by slot winnings</h5>
|
||||
<h5 style="font-weight:bold;text-align: center">Top 25 by Winnings</h5>
|
||||
<pre></pre>
|
||||
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th style="font-weight:bold">#</th>
|
||||
<th style="font-weight:bold">Name</th>
|
||||
<th style="font-weight:bold">Slot winnings</th>
|
||||
<th style="font-weight:bold">Winnings</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for user in users14 %}
|
||||
|
@ -450,7 +450,7 @@
|
|||
|
||||
|
||||
</pre>
|
||||
<h5 style="font-weight:bold;text-align: center">Bottom 25 by slot winnings</h5>
|
||||
<h5 style="font-weight:bold;text-align: center">Bottom 25 by Winnings</h5>
|
||||
<pre></pre>
|
||||
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
||||
<thead class="bg-primary text-white">
|
||||
|
|
|
@ -291,7 +291,7 @@
|
|||
<p>User ID: {{u.id}}</p>
|
||||
<p>Coins spent: {{u.coins_spent}}</p>
|
||||
<p>True score: {{u.truecoins}}</p>
|
||||
<p>Slot winnings: {{u.winnings}}</p>
|
||||
<p>Winnings: {{u.winnings}}</p>
|
||||
{% if u.is_private %}
|
||||
<p>User has private mode enabled.</p>
|
||||
{% endif %}
|
||||
|
@ -574,7 +574,7 @@
|
|||
<p>User ID: {{u.id}}</p>
|
||||
<p>Coins spent: {{u.coins_spent}}</p>
|
||||
<p>True score: {{u.truecoins}}</p>
|
||||
<p>Slot winnings: {{u.winnings}}</p>
|
||||
<p>Winnings: {{u.winnings}}</p>
|
||||
{% if u.is_private %}
|
||||
<p>User has private mode enabled.</p>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue