fdssfd
This commit is contained in:
parent
59bc1ec102
commit
301db1841e
2 changed files with 15 additions and 13 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
function toggleElement(group, id) {
|
||||||
|
for(let el of document.getElementsByClassName(group)) {
|
||||||
|
if(el.id != id) {
|
||||||
|
el.classList.add('d-none');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById(id).classList.toggle('d-none');
|
||||||
|
}
|
||||||
|
|
||||||
function post_toast_callback(url, data, callback) {
|
function post_toast_callback(url, data, callback) {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", url, true);
|
xhr.open("POST", url, true);
|
||||||
|
|
|
@ -15,7 +15,9 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="/assets/js/userpage.js?v=60"></script>
|
{% if v %}
|
||||||
|
<script src="/assets/js/userpage.js?v=61"></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if v and not v.patron %}
|
{% if v and not v.patron %}
|
||||||
<script>
|
<script>
|
||||||
|
@ -29,16 +31,6 @@
|
||||||
}
|
}
|
||||||
document.getElementById("coins-transfer-taxed" + suf).innerText = amount - Math.ceil(amount*TRANSFER_TAX);
|
document.getElementById("coins-transfer-taxed" + suf).innerText = amount - Math.ceil(amount*TRANSFER_TAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleElement(group, id) {
|
|
||||||
for(let el of document.getElementsByClassName(group)) {
|
|
||||||
if(el.id != id) {
|
|
||||||
el.classList.add('d-none');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById(id).classList.toggle('d-none');
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -294,7 +286,7 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="d-none mt-3 profile-toggleable" id="coin-transfer">
|
<div class="d-none mt-3 profile-toggleable" id="coin-transfer">
|
||||||
<input autocomplete="off" id="coins-transfer-amount" class="form-control" name="amount" type="number" oninput="updateTax()">
|
<input autocomplete="off" id="coins-transfer-amount" class="form-control" name="amount" type="number" {% if not v.patron %}oninput="updateTax()"{% endif %}>
|
||||||
<div>{{u.username}} will receive <span id="coins-transfer-taxed">0</span> {{'COINS_NAME' | app_config}}</div>
|
<div>{{u.username}} will receive <span id="coins-transfer-taxed">0</span> {{'COINS_NAME' | app_config}}</div>
|
||||||
<button class="btn btn-primary mt-3" onclick="transferCoins()">Gift</button>
|
<button class="btn btn-primary mt-3" onclick="transferCoins()">Gift</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -594,7 +586,7 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="d-none mt-3 profile-toggleable-mobile" id="coin-transfer-mobile">
|
<div class="d-none mt-3 profile-toggleable-mobile" id="coin-transfer-mobile">
|
||||||
<input autocomplete="off" id="coins-transfer-amount-mobile" class="form-control" name="amount" type="number" oninput="updateTax(true)">
|
<input autocomplete="off" id="coins-transfer-amount-mobile" class="form-control" name="amount" type="number" {% if not v.patron %}oninput="updateTax(true)"{% endif %}>
|
||||||
<div>{{u.username}} will receive <span id="coins-transfer-taxed-mobile">0</span> {{'COINS_NAME' | app_config}}</div>
|
<div>{{u.username}} will receive <span id="coins-transfer-taxed-mobile">0</span> {{'COINS_NAME' | app_config}}</div>
|
||||||
<button class="btn btn-primary mt-3" onclick="transferCoins(true)">Gift</button>
|
<button class="btn btn-primary mt-3" onclick="transferCoins(true)">Gift</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue