From fa0e5c3ca4c80cce9e373e323cb2c2a9ba253a67 Mon Sep 17 00:00:00 2001 From: atrc445 Date: Mon, 9 Aug 2021 21:50:24 +0200 Subject: [PATCH] add dramacoin transfers in the mobile version --- files/templates/userpage.html | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) 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.coins}} {{"COINS_NAME" | app_config}}  {% if u.stored_subscriber_count >=1 and not u.is_nofollow %}{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}   {% endif %}
joined {{u.created_date}} + {{u.coins}} {{"COINS_NAME" | app_config}}  {% if u.stored_subscriber_count >=1 and not u.is_nofollow %}{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}   {% endif %}
joined {{u.created_date}}
{% if u.bio_html %}

{{u.bio_html | safe}}

@@ -377,9 +380,11 @@ Unfollow Follow - Message + Message Get them help -
+ Gift {{"COINS_NAME" | app_config}} + +

 						
 						

@@ -395,6 +400,11 @@
 						 
 						
 					
+ +
+ + +
{% if v.admin_level > 1 and u.admin_level <= 1 %}