mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-29 22:23:10 +00:00
Deepsource Python issues
This commit is contained in:
parent
e0fc37d48a
commit
4d912d314c
10 changed files with 162 additions and 156 deletions
|
@ -5,7 +5,7 @@
|
|||
<span class="spacer"></span>
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
<a href="{{ url_for('account.settings') }}" class="button primary">
|
||||
<a href="{{ url_for('account.get_settings') }}" class="button primary">
|
||||
{{ current_user.username }}
|
||||
{% if not current_user.email %}<i class="ph ph-warning" style="margin-left: 0.2rem !important;"></i>{% endif %}
|
||||
</a>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block content %}
|
||||
<div class="block">
|
||||
<h2 style="margin-bottom: 1rem;">Profile Settings</h2>
|
||||
<form action="{{ url_for('account.settings') }}" method="POST" enctype="multipart/form-data">
|
||||
<form action="{{ url_for('account.post_settings') }}" method="POST" enctype="multipart/form-data">
|
||||
<div class="profile-settings">
|
||||
<div class="picture">
|
||||
{% if current_user.picture %}
|
||||
|
@ -34,7 +34,7 @@
|
|||
<div class="table">
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Options</th>
|
||||
<th>Device</th>
|
||||
<th>Created</th>
|
||||
<th>Last Used</th>
|
||||
|
@ -44,7 +44,7 @@
|
|||
<td><button onclick="yeetSession({{ session.id }})" class="button secondary"><i class="ph ph-trash"></i></button></td>
|
||||
<td>{{ session.device_type }}</td>
|
||||
<td>{{ session.created_at.strftime('%Y-%m-%d') }}</td>
|
||||
<td>{{ session.last_used.strftime('%Y-%m-%d') }}</td>
|
||||
<td>{{ session.last_used|timesince }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
@ -54,9 +54,9 @@
|
|||
<div class="block secondary">
|
||||
<h2>Danger Zone</h2>
|
||||
<p>Be careful!</p>
|
||||
<a href="{{ url_for('account.delete_account') }}" class="button secondary" style="margin-bottom: 0.5rem">Delete Account</a>
|
||||
<a href="{{ url_for('account.password_reset') }}" class="button secondary" style="margin-bottom: 0.5rem">Reset Password</a>
|
||||
<a href="{{ url_for('account.settings', action='logout') }}" class="button secondary">Logout</a>
|
||||
<a href="{{ url_for('account.get_delete_account') }}" class="button secondary" style="margin-bottom: 0.5rem">Delete Account</a>
|
||||
<a href="{{ url_for('account.get_password_reset') }}" class="button secondary" style="margin-bottom: 0.5rem">Reset Password</a>
|
||||
<a href="{{ url_for('account.get_settings', action='logout') }}" class="button secondary">Logout</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -67,8 +67,7 @@
|
|||
|
||||
// Adjusted from https://stackoverflow.com/a/3814285/14885829
|
||||
document.getElementById('profile-picture').onchange = (event) => {
|
||||
let tgt = event.target || window.event.srcElement,
|
||||
files = tgt.files;
|
||||
let files = event.target.files;
|
||||
|
||||
if (FileReader && files && files.length) {
|
||||
let fr = new FileReader();
|
||||
|
@ -78,7 +77,7 @@
|
|||
fr.readAsDataURL(files[0]);
|
||||
}
|
||||
else {
|
||||
addFlashMessage("Your browser could not show a preview of your profile picture!", "error")
|
||||
addFlashMessage("Your browser could not show a preview of your profile picture!", "error");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
Deleting your account will delete <span style="color: rgb(var(--secondary)) !important;">EVERYTHING</span> on your account, including <span style="color: rgb(var(--secondary)) !important;">ALL</span> your ever submitted scores.
|
||||
There is <span style="color: rgb(var(--secondary)) !important;">NO WAY</span> to recover your account from this, are you sure you want todo this?
|
||||
</p>
|
||||
<form action="{{ url_for('account.delete_account') }}" method="POST">
|
||||
<form action="{{ url_for('account.post_delete_account') }}" method="POST">
|
||||
{{ text(id="username", name="username", required=True) }}
|
||||
{{ text(id="password", name="password", type="password", required=True) }}
|
||||
<button type="submit" class="button secondary">Delete account forever</button>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="block secondary">
|
||||
<h2>Password Reset</h2>
|
||||
<p>Forgotten your current password? Go here [insert password reset tool link]</p>
|
||||
<form action="{{ url_for('account.password_reset') }}" method="POST">
|
||||
<form action="{{ url_for('account.post_password_reset') }}" method="POST">
|
||||
{{ text(id="current-password", name="current", type="password", required=True) }}
|
||||
{{ text(id="new-password", name="new", type="password", required=True) }}
|
||||
{{ text(id="confirm-password", name="confirm", type="password", required=True) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue