[frontend] Hide detail tabs when they are empty

This commit is contained in:
Lilian 2024-09-26 06:23:14 +02:00
parent f2c314df7b
commit 2078ce3747
No known key found for this signature in database

View file

@ -60,24 +60,33 @@
} }
</TabContent> </TabContent>
</TabPage> </TabPage>
<TabPage> @if (RootNote?.Likes > 0)
<Title>@Loc["Likes ({0})", RootNote!.Likes]</Title> {
<TabContent> <TabPage>
<NoteLikeDetails NoteId="@RootNote?.Id"/> <Title>@Loc["Likes ({0})", RootNote!.Likes]</Title>
</TabContent> <TabContent>
</TabPage> <NoteLikeDetails NoteId="@RootNote?.Id"/>
<TabPage> </TabContent>
<Title>@Loc["Renotes ({0})", RootNote!.Renotes]</Title> </TabPage>
<TabContent> }
<NoteRenoteDetails NoteId="@RootNote?.Id"/> @if (RootNote?.Renotes > 0)
</TabContent> {
</TabPage> <TabPage>
<TabPage> <Title>@Loc["Renotes ({0})", RootNote!.Renotes]</Title>
<Title>@Loc["Reactions ({0})", RootNote!.Reactions.Count]</Title> <TabContent>
<TabContent> <NoteRenoteDetails NoteId="@RootNote?.Id"/>
<NoteReactionDetails Reactions="RootNote?.Reactions" NoteId="@RootNote?.Id"/> </TabContent>
</TabContent> </TabPage>
</TabPage> }
@if (RootNote?.Reactions.Count > 0)
{
<TabPage>
<Title>@Loc["Reactions ({0})", RootNote!.Reactions.Count]</Title>
<TabContent>
<NoteReactionDetails Reactions="RootNote?.Reactions" NoteId="@RootNote?.Id"/>
</TabContent>
</TabPage>
}
<TabPage> <TabPage>
<Title>@Loc["Quotes"]</Title> <Title>@Loc["Quotes"]</Title>
<TabContent> <TabContent>