Merge pull request #20 from Fluffy-Bean/beta

general stuffs :3
This commit is contained in:
Michał Gdula 2023-06-26 23:45:42 +01:00 committed by GitHub
commit f0739d889e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 18 deletions

View file

@ -9,12 +9,12 @@ UPLOAD_EXTENSIONS = ["png", "jpg", "jpeg", "gif", "webp"]
UPLOAD_RESOLUTION = 169
UPLOAD_MAX_SIZE = 3 * 1024 * 1024 # 3MB
GAME_VERSION = "alpha"
GAME_VERSION = "alpha-expo"
GAME_DIFFICULTY = 0
GAME_VERSIONS = {
"alpha": "Alpha",
"alpha-expo": "Alpha (Expo Build)",
"alpha": "Alpha",
}
GAME_DIFFICULTIES = {
0: "Easy - Level 1",

View file

@ -86,7 +86,6 @@ class Users(db.Model, UserMixin):
id = db.Column(db.Integer, primary_key=True)
alt_id = db.Column(db.String, nullable=False, unique=True)
superuser = db.Column(db.Boolean, default=False)
picture = db.Column(db.String)

View file

@ -51,14 +51,15 @@
<p>Joined {{ user.joined_at|timesince }}</p>
<hr>
<div class="profile-links">
{% if user.discord %}<button class="discord"><i class="ph ph-discord-logo"></i></button>{% endif %}
{% if user.twitter %}<a href="https://twitter.com/{{ user.twitter }}" class="twitter"><i class="ph ph-twitter-logo"></i></a>{% endif %}
{% if user.twitch %}<a href="https://twitch.com/{{ user.twitch }}" class="twitch"><i class="ph ph-twitch-logo"></i></a>{% endif %}
{% if user.youtube %}<a href="https://youtube.com/{{ user.youtube }}" class="youtube"><i class="ph ph-youtube-logo"></i></a>{% endif %}
</div>
{% if user.discord or user.twitter or user.twitch or user.youtube %}
<hr>
<div class="profile-links">
{% if user.discord %}<button class="discord"><i class="ph ph-discord-logo"></i></button>{% endif %}
{% if user.twitter %}<a href="https://twitter.com/{{ user.twitter }}" class="twitter"><i class="ph ph-twitter-logo"></i></a>{% endif %}
{% if user.twitch %}<a href="https://twitch.com/{{ user.twitch }}" class="twitch"><i class="ph ph-twitch-logo"></i></a>{% endif %}
{% if user.youtube %}<a href="https://youtube.com/{{ user.youtube }}" class="youtube"><i class="ph ph-youtube-logo"></i></a>{% endif %}
</div>
{% endif %}
</div>
</div>
{% endif %}

View file

@ -34,15 +34,14 @@ def index():
)
else:
user = Users.query.filter_by(username=user_arg).first()
# get all tags from the junction table and add them to a list of tags
tags = (
db.session.query(Tags)
.join(TagJunction)
.filter(TagJunction.user_id == user.id)
.all()
)
if user:
scores = scores.filter_by(user_id=user.id)
tags = (
db.session.query(Tags)
.join(TagJunction)
.filter(TagJunction.user_id == user.id)
.all()
)
else:
abort(404, "User not found")