Skip to content

Commit

Permalink
Merge branch 'Gruetzig:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
eip618 authored Jan 6, 2025
2 parents 4fc3c18 + b1131c5 commit c40bdf1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ DrawContext ctx;
#define SERVER_ADDRESS "https://soap.nintendohomebrew.com/submit"
#endif

void enter(char* inout) {
void enter(char* inout, size_t len) {
SwkbdState swkbd;
swkbdInit(&swkbd, SWKBD_TYPE_NORMAL, 1, 50);
swkbdInit(&swkbd, SWKBD_TYPE_NORMAL, 1, len);
swkbdSetInitialText(&swkbd, inout);
swkbdInputText(&swkbd, inout, 51);
swkbdInputText(&swkbd, inout, len+1);
return;
}

Expand Down Expand Up @@ -107,10 +107,10 @@ int main() {
switch(menustate) {
case 0:
if ((kDown & KEY_X) && (kDown & KEY_DDOWN)) {
enter(address);
enter(address, 51);
}
if (kDown & KEY_Y) {
enter(discordtag);
enter(discordtag, 32);
}
if (strlen(address) > 0 && strlen(discordtag) > 0 && kDown & KEY_TOUCH) {
menustate++;
Expand Down
4 changes: 3 additions & 1 deletion templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@
{% for entry in entries %}
<tr>
<td>{{ entry.name }}</td>
<td><b>SD:</b> {{ entry.sdserial }} <b>NAND:</b> {{ entry.nandserial }} <b>inspect.log:</b> {{ entry.twlnserial }} <b>SecureInfo:</b> {{ entry.secinfoserial }} <b>Date:</b> {{ entry.date}}</td>
<td><b>SD:</b> {{ entry.sdserial }} <b>NAND:</b> {{ entry.nandserial }} <b>inspect.log:</b> {{ entry.twlnserial }} <b>SecureInfo:</b> {{ entry.secinfoserial }}<b>Date:</b> <span class="date-timestamp">{{ entry.date}}</span></td>
<td><a href="/retrieve?username={{ entry.name }}">Download</a> <a href="/delete?username={{ entry.name }}" class="delete-link">Delete</a></td>
</tr>
{% endfor %}
</table>
</body>
<script>
document.querySelectorAll(".date-timestamp").forEach(e => e.textContent = Date(Number(e.textContent)))
// Select all elements with the class 'delete-link'
const deleteLinks = document.querySelectorAll('.delete-link');

Expand All @@ -79,5 +80,6 @@
}
});
});

</script>
</html>

0 comments on commit c40bdf1

Please sign in to comment.