[frontend/components] Make cw button text change on state
This commit is contained in:
parent
0aff68b398
commit
a374c5e8c2
1 changed files with 11 additions and 3 deletions
|
@ -13,13 +13,21 @@
|
|||
<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">
|
||||
@if (_cwToggle)
|
||||
{
|
||||
@if (NoteBase.Text != null)
|
||||
{
|
||||
@Loc["Toggle CW ({0} Characters)", NoteBase.Text.Length]
|
||||
@Loc["Show Content ({0} Characters)", NoteBase.Text.Length]
|
||||
}
|
||||
else
|
||||
{
|
||||
@Loc["Toggle CW"]
|
||||
@Loc["Show Content"]
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@Loc["Hide Content"]
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue