add: anonymous questions

This commit is contained in:
trisua 2025-04-19 18:59:55 -04:00
parent 2266afde01
commit 3db7f2699c
34 changed files with 473 additions and 98 deletions

View file

@ -156,7 +156,7 @@
atto_tag="user.follow"
>
{{ icon "user-plus" }}
<span>{{ text "auto:action.follow" }}</span>
<span>{{ text "auth:action.follow" }}</span>
</button>
<button
@ -165,7 +165,7 @@
atto_tag="user.unfollow"
>
{{ icon "user-minus" }}
<span>{{ text "auto:action.unfollow" }}</span>
<span>{{ text "auth:action.unfollow" }}</span>
</button>
<button
@ -173,7 +173,7 @@
class="quaternary red"
>
{{ icon "shield" }}
<span>{{ text "auto:action.block" }}</span>
<span>{{ text "auth:action.block" }}</span>
</button>
{% else %}
<button
@ -181,7 +181,7 @@
class="quaternary red"
>
{{ icon "shield-off" }}
<span>{{ text "auto:action.unblock" }}</span>
<span>{{ text "auth:action.unblock" }}</span>
</button>
{% endif %} {% if is_helper %}
<a

View file

@ -1,5 +1,6 @@
{% extends "profile/base.html" %} {% block content %} {% if
profile.settings.enable_questions and user %}
profile.settings.enable_questions and (user or
profile.settings.allow_anonymous_questions) %}
<div style="display: contents">
{{ components::create_question_form(receiver=profile.id,
header=profile.settings.motivational_header) }}

View file

@ -25,7 +25,7 @@
atto_tag="user.follow_request"
>
{{ icon "user-plus" }}
<span>{{ text "auto:action.request_to_follow" }}</span>
<span>{{ text "auth:action.request_to_follow" }}</span>
</button>
<button
@ -34,7 +34,7 @@
atto_tag="user.cancel_request"
>
{{ icon "user-minus" }}
<span>{{ text "auto:action.cancel_follow_request" }}</span>
<span>{{ text "auth:action.cancel_follow_request" }}</span>
</button>
{% else %}
<button
@ -43,7 +43,7 @@
atto_tag="user.unfollow"
>
{{ icon "user-minus" }}
<span>{{ text "auto:action.unfollow" }}</span>
<span>{{ text "auth:action.unfollow" }}</span>
</button>
{% endif %}

View file

@ -748,20 +748,6 @@
settings.warning,
"textarea",
],
[[], "Questions", "title"],
[
[
"enable_questions",
"Allow users to ask you questions",
],
"{{ profile.settings.enable_questions }}",
"checkbox",
],
[
["motivational_header", "Motivational header"],
settings.motivational_header,
"input",
],
],
settings,
);
@ -791,6 +777,28 @@
"{{ profile.settings.private_last_seen }}",
"checkbox",
],
[[], "Questions", "title"],
[
[
"enable_questions",
"Allow users to ask you questions",
],
"{{ profile.settings.enable_questions }}",
"checkbox",
],
[
[
"allow_anonymous_questions",
"Allow anonymous questions",
],
"{{ profile.settings.allow_anonymous_questions }}",
"checkbox",
],
[
["motivational_header", "Motivational header"],
settings.motivational_header,
"input",
],
],
settings,
);