Linking social media on profile

This commit is contained in:
Michał Gdula 2023-06-25 19:49:17 +00:00
parent 2b5daa78b7
commit dda7d1087b
8 changed files with 132 additions and 20 deletions

View file

@ -11,7 +11,7 @@
type="{{ type }}"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
{% if value %}value="{{ value }}"{% endif %}
{% if required %}required{% endif %}
minlength="{{ minlength }}"
>

View file

@ -18,6 +18,9 @@
<div class="other">
{{ text(id="profile-username", name="username", value=current_user.username) }}
{{ text(id="profile-email", name="email") }}
<span style="height: 100%"></span>
{{ text(id="profile-password", name="password", type="password", required=True, minlength=8) }}
<span style="height: 100%"></span>
@ -28,6 +31,28 @@
</form>
</div>
<div class="block">
<h2 style="margin-bottom: 1rem;">Linked Socials</h2>
<form action="{{ url_for('account.post_settings') }}" method="POST" enctype="multipart/form-data">
<div class="profile-settings">
<div class="other">
{{ text(id="socials-discord", name="discord", value=current_user.discord) }}
{{ text(id="socials-twitter", name="twitter", value=current_user.twitter) }}
{{ text(id="socials-twitch", name="twitch", value=current_user.twitch) }}
{{ text(id="socials-youtube", name="youtube", value=current_user.youtube) }}
<span style="height: 100%"></span>
{{ text(id="socials-password", name="password", type="password", required=True, minlength=8) }}
<span style="height: 100%"></span>
<button type="submit" class="button primary">Save changes</button>
</div>
</div>
</form>
</div>
<div class="block">
<h2>Sessions</h2>
<p>Devices and games that you logged into. If you're looking to log out all website users, reset your password instead.</p>

View file

@ -42,17 +42,23 @@
{% else %}
<img src="{{ url_for('static', filename='images/pfp.png') }}" alt="Profile picture">
{% endif %}
<div class="other">
<div class="profile-title">
<h2>{{ user.username }}</h2>
{% for tag in tags %}
<span class="profile-tag" style="background-color:{{ tag.color }};">
{{ tag.tag }}
</span>
{% endfor %}
{% for tag in tags %}<span class="profile-tag" style="background-color:{{ tag.color }};">{{ tag.tag }}</span>{% endfor %}
</div>
<hr>
<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>
</div>
</div>
{% endif %}