add: post editing, profile pinned posts, theme settings

TODO: nsfw profile/community options
This commit is contained in:
trisua 2025-04-07 16:07:01 -04:00
parent 31f63c90cd
commit f83cfa3756
10 changed files with 255 additions and 8 deletions

View file

@ -1,5 +1,20 @@
{% import "macros.html" as macros %} {% extends "profile/base.html" %} {% block
content %}
content %} {% if pinned|length != 0 %}
<div class="card-nest">
<div class="card small flex gap-2 items-center">
{{ icon "pin" }}
<span>{{ text "communities:label.pinned" }}</span>
</div>
<div class="card flex flex-col gap-4">
<!-- prettier-ignore -->
{% for post in pinned %}
{{ components::post(post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true, can_manage_post=is_self) }}
{% endfor %}
</div>
</div>
{% endif %}
<div class="card-nest">
<div class="card small flex gap-2 items-center">
{{ icon "clock" }}
@ -9,7 +24,7 @@ content %}
<div class="card flex flex-col gap-4">
<!-- prettier-ignore -->
{% for post in posts %}
{{ components::post(post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }}
{{ components::post(post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true, can_manage_post=is_self) }}
{% endfor %}
{{ components::pagination(page=page, items=posts|length) }}

View file

@ -675,6 +675,21 @@
"{{ profile.settings.private_last_seen }}",
"checkbox",
],
[
["theme_hue", "Theme hue (integer 0-255)"],
"{{ profile.settings.theme_hue }}",
"input",
],
[
["theme_sat", "Theme sat (percentage 0%-100%)"],
"{{ profile.settings.theme_sat }}",
"input",
],
[
["theme_lit", "Theme lit (percentage 0%-100%)"],
"{{ profile.settings.theme_lit }}",
"input",
],
],
settings,
);