Add support for CW in comments (#308)

All the backend/federation code was already, I just added the UI 🤷‍♀️ 

Fixes #253
This commit is contained in:
Baptiste Gelez
2018-11-07 15:57:31 +01:00
committed by GitHub
parent b28411da99
commit a64c4912cf
5 changed files with 39 additions and 9 deletions
+10 -1
View File
@@ -60,7 +60,16 @@
<span class="display-name">{{ comm.author.name }}</span>
<small>@{{ comm.author.fqn }}</small>
</a>
<div class="text">{{ comm.content | safe }}</div>
<div class="text">
{% if comm.sensitive %}
<details>
<summary>{{ comm.spoiler_text }}</summary>
{% endif %}
{{ comm.content | safe }}
{% if comm.sensitive %}
</details>
{% endif %}
</div>
<a class="button icon icon-message-circle" href="?responding_to={{ comm.id }}">{{ "Respond" | _ }}</a>
{% for res in comm.responses %}
{{ self::comment(comm=res) }}
+9
View File
@@ -119,6 +119,15 @@
{% if account %}
<form method="post" action="{{ article.url }}comment">
{{ macros::input(
name="warning",
label="Content warning",
optional=true,
form=comment_form,
errors=comment_errors,
default=default)
}}
<label for="plume-editor">{{ "Your comment" | _ }}</label>
{% if previous %}
<input type="hidden" name="responding_to" value="{{ previous.id }}"/>