[frontend/components] Include character count in content warnings

This commit is contained in:
Lilian 2025-01-31 21:19:29 +01:00
parent 5205836846
commit c4cc73a601
No known key found for this signature in database
2 changed files with 15 additions and 2 deletions

View file

@ -10,7 +10,16 @@
{
<div class="cw">
<span class="cw-field"><MfmText Text="@NoteBase.Cw" Emoji="@NoteBase.Emoji" Simple="@true"/></span>
<button class="cw-button" @onclick="ToggleCw" @onclick:stopPropagation="true">Toggle CW</button>
<button class="cw-button" @onclick="ToggleCw" @onclick:stopPropagation="true">
@if (NoteBase.Text != null)
{
@Loc["Toggle CW ({0} Characters)", NoteBase.Text.Length]
}
else
{
@Loc["Toggle CW"]
}
</button>
</div>
}
@if (_overHeight & !_showFull)

View file

@ -35,7 +35,11 @@
.cw-button {
font-size: 0.75em;
margin-left: 0.5em;
padding: 0.2em;
padding: 0.1em 0.25em;
}
.cw-button:hover {
background-color: var(--hover-color);
}
.truncate-btn {