fix: un id en moins
Co-authored-by: Laureηt <Laurent2916@users.noreply.github.com>
This commit is contained in:
parent
f3cb2e5da9
commit
a957027656
|
@ -90,7 +90,7 @@
|
|||
Wallet
|
||||
</div>
|
||||
<br />
|
||||
<div class="solde" id="solde"></div>
|
||||
<div class="solde"></div>
|
||||
<form action="pay" method="post">
|
||||
<div class="data">
|
||||
<label>Amount</label>
|
||||
|
@ -115,6 +115,7 @@
|
|||
My pixels
|
||||
</div>
|
||||
<br />
|
||||
<div class="solde"></div>
|
||||
<div id="color"></div>
|
||||
<div id="pixel-index"></div>
|
||||
(<div id="user-pixel-index"></div>)
|
||||
|
@ -159,6 +160,7 @@
|
|||
</div>
|
||||
<br />
|
||||
<form action="modify" method="post">
|
||||
<div class="solde"></div>
|
||||
<div class="data">
|
||||
<label>Index</label>
|
||||
<input type="number" name="index" id="buy-pixel-index" required>
|
||||
|
|
|
@ -18,10 +18,11 @@ const updateUserJSON = async () => {
|
|||
userJSON = await reponse.json();
|
||||
}
|
||||
|
||||
|
||||
function updateSolde() {
|
||||
var div = document.getElementById("solde");
|
||||
div.innerHTML = userJSON.solde + '$';
|
||||
var elems = document.getElementsByClassName("solde");
|
||||
elems.forEach(el => {
|
||||
el.innerHTML = userJSON.solde + '₿';
|
||||
});
|
||||
}
|
||||
|
||||
updateSolde();
|
||||
|
@ -125,8 +126,6 @@ function previousUserPixel() {
|
|||
}
|
||||
|
||||
function updatePixelPreview() {
|
||||
var colorDiv = document.getElementById("color");
|
||||
|
||||
var index = parseInt(document.getElementById("pixel-index").innerHTML);
|
||||
var pixel = pixelsJSON[index];
|
||||
|
||||
|
@ -150,7 +149,6 @@ function updatePixelPreview() {
|
|||
// Update description
|
||||
var description = document.getElementById("description");
|
||||
description.value = pixel.description;
|
||||
|
||||
}
|
||||
|
||||
// Update preview's color
|
||||
|
|
Loading…
Reference in a new issue