[frontend/components] Include character count in content warnings
This commit is contained in:
parent
5205836846
commit
c4cc73a601
2 changed files with 15 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue