1
0
mirror of https://dev.s-ul.net/Galexion/MaiMaiDXNet.git synced 2024-11-27 22:50:48 +01:00

Fixed Ban Button & Fixed UI Jacket issue (Requires SegaParser Re-Run)

This commit is contained in:
Galexion 2023-07-25 00:50:15 -04:00
parent c649338fdd
commit 54300c933e
4 changed files with 37 additions and 15 deletions

View File

@ -269,8 +269,7 @@ async function getUserBanned(req) {
return new Promise((resolve, reject) => {
var request = req.body;
if (request.input === undefined) {
return reject('Failed to update user ban state, insufficent paramaters')
return
return reject('Failed to update user ban state, insufficent paramaters');
}
db.run('UPDATE maimai2_user_detail SET ban_state = ? WHERE id = ?', [2, request.input], function (err) {
if (err) {
@ -282,7 +281,18 @@ async function getUserBanned(req) {
});
});
} else {
var con = await establishConnection();
return new Promise((resolve, reject) => {
var request = req.body;
con.query(`UPDATE aime.mai2_profile_detail SET banState = 2 WHERE user = ${request.input}`, function (err, result, fields) {
if (err) {
reject({ "status": "failure", "message": "Unable to ban user, see reason", "reason": err })
throw err
};
con.release();
resolve({ "status": "Success", "message": `User ${request.input} banned.` })
})
});
}
}
@ -305,7 +315,18 @@ async function getUserUnbanned(req) {
});
});
} else {
var con = await establishConnection();
return new Promise((resolve, reject) => {
var request = req.body;
con.query(`UPDATE aime.mai2_profile_detail SET banState = 0 WHERE user = ${request.input}`, function (err, result, fields) {
if (err) {
reject({ "status": "failure", "message": "Unable to ban user, see reason", "reason": err })
throw err
};
con.release();
resolve({ "status": "Success", "message": `User ${request.input} banned.` })
})
});
}
}

View File

@ -223,7 +223,7 @@ async function userPlayLogFormatter(div, loadMoreButton) {
errorIncrement++
continue;
}
console.log(song)
scoreDiv.innerHTML = `
<div class="score-title">
<h4>${song.name.str} || ${new Date(score.user_play_date||score.userPlayDate)}</h4>
@ -237,7 +237,7 @@ async function userPlayLogFormatter(div, loadMoreButton) {
});
scoreJacketDiv.classList.add('score-jacket');
jacket.classList.add('score-jacket');
jacket.src = "assets/jacket/UI_Jacket_" + padNumber(Number(score.music_id||score.musicId), 6) + '.png';
jacket.src = "assets/jacket/UI_Jacket_" + padNumber(Number(song.InGameID), 6) + '.png';
scoreJacketDiv.append(jacket)
scoreDiv.append(scoreJacketDiv)

View File

@ -119,7 +119,8 @@ ToDo:
- Re-Create the MaiMaiDXNet Playlog list (90% Done, can't continue without image assets that are only on the offical Server)
- Create Detailed Look Into Score
- Create Photos Tab
- Create a rudementrary Photos tab until i can finallly get my hands on images of the Photos tab in MaiMai DX Net
- Create a rudementrary Photos tab until i can finallly get my hands on images of the Photos tab in MaiMai DX Net (Done)
- Create a actual Photos Tab
- Create Area Tab
- Get User Area Data (Done)
- Get Metadata for Area (Done)

View File

@ -21,15 +21,15 @@
<script type="text/javascript" src="/javascript/login.js"></script>
</div>
<div id="loginContent">
<h4>
Known Issues:
</h4>
<h5>
<details>
<summary>
<h4>Issue Log:</h4>
</summary>
<h5>
- Site Is Not Complete<br>
- Unfortunatly Some Song Jackets Cannot be found, which will lead certain lisenced and original songs to
load without their jackets when checking your play log. <br>
- Artemis does not Support Memorial Photos, though that is coming.
</h5>
- Artemis does not Support Memorial Photos, though that is coming.<br>
UI Jackets Have Now been fixed, please redl segapaser and rerun music.js.</h5>
</details>
</div>
</body>