diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 8eab941ba..939becc37 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -55,7 +55,7 @@ }, {once : true}); } - function transferCoins() { + function transferCoins(mobile=false) { let t = event.target; t.disabled = true; @@ -64,14 +64,17 @@ if(xhr.status == 200) { fetch("/@{{ u.username }}/coins") .then(r => r.json()) - .then(m => document.getElementById("profile-coins-amount").innerText = m["coins"]) + .then(m => { + document.getElementById("profile-coins-amount").innerText = m["coins"]; + document.getElementById("profile-coins-amount-mobile").innerText = m["coins"]; + }) fetch("/@{{ v.username }}/coins") .then(r => r.json()) - .then(m => document.getElementById("user-coins-amount").innerText = m["coins"]) + .then(m => document.getElementById(`user-coins-amount`).innerText = m["coins"]) } }, - {"amount": document.getElementById("coins-transfer-amount").value} + {"amount": document.getElementById(mobile ? "coins-transfer-amount-mobile" : "coins-transfer-amount").value} ); setTimeout(_ => t.disabled = false, 2000); @@ -355,7 +358,7 @@ {% endif %} {% if u.customtitle %}
{{u.customtitle | safe}}
{% endif %}{{u.bio_html | safe}}
@@ -377,9 +380,11 @@ Unfollow Follow - Message + Message Get them help - + +