3
2
forked from Dniel97/artemis

ongeki: fix frontend page

This commit is contained in:
Hay1tsme 2024-01-09 21:16:22 -05:00
parent d01ceab92f
commit 06e7288cad
3 changed files with 32 additions and 21 deletions

View File

@ -146,7 +146,7 @@ Update successful
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="/user/edit.card" method="post", id="frm_edit_card">
<form action="/user/edit.card" method="post" id="frm_edit_card">
<label class="form-label" for="card_edit_frm_access_code">Access Code:</label>
<input class="form-control" readonly name="add_access_code" id="card_edit_frm_access_code" maxlength="20" type="text" required aria-describedby="ac_help">
<div id="ac_help" class="form-text">20 digit code on the back of the card. If this is incorrect, contact a sysadmin.</div>

View File

@ -43,14 +43,16 @@ class OngekiFrontend(FE_Base):
usr_sesh = UserSession()
self.version = usr_sesh.ongeki_version
if getattr(usr_sesh, "userId", 0) != 0:
if usr_sesh.user_id > 0:
profile_data =self.data.profile.get_profile_data(usr_sesh.user_id, self.version)
rival_list = await self.data.profile.get_rivals(usr_sesh.user_id)
rival_data = {
"userRivalList": rival_list,
"userId": usr_sesh.user_id
}
rival_info = OngekiBase.handle_get_user_rival_data_api_request(self, rival_data)
# Hay1tsme 01/09/2024: ??????????????????????????????????????????????????????????????
rival_info = await OngekiBase.handle_get_user_rival_data_api_request(self, rival_data)
return Response(template.render(
data=self.data.profile,

View File

@ -1,6 +1,17 @@
{% extends "core/templates/index.jinja" %}
{% block content %}
<style type="text/css">
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type=number] {
-moz-appearance: textfield;
}
</style>
{% if sesh is defined and sesh["user_id"] > 0 %}
<br>
<br>
@ -51,18 +62,17 @@
</table>
</div>
<div class="modal fade" id="rival_add" tabindex="-1" aria-labelledby="card_add_label" data-bs-theme="dark" aria-hidden="true">
<form id="rival" action="/game/ongeki/rival.add" method="post">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<h5 class="modal-title">Add rival</h5>
</div>
<div class="modal-body">
Note:<br>
Please use the ID show next to your name in the profile page.
<br>
<label for="rivalUserId">ID:&nbsp;</label><input form="rival" id="rivalUserId" name="rivalUserId" maxlength="5" type="number" required>
<form id="rival" action="/game/ongeki/rival.add" method="post" style="outline: 0;">
<label class="form-label" for="rivalUserId">Rival ID</label>
<input class="form-control" aria-describedby="rivalIdHelphelp" form="rival" id="rivalUserId" name="rivalUserId" maxlength="5" type="number" required>
<div id="rivalIdHelphelp" class="form-text">Please use the ID show next to your name in the profile page.</div>
</form>
</div>
<div class="modal-footer">
<input type=submit class="btn btn-primary" type="button" form="rival" value="Add">
@ -70,7 +80,6 @@
</div>
</div>
</div>
</form>
</div>
</div>