[frontend] wip renote rendering

This commit is contained in:
Lilian 2024-05-20 01:13:06 +02:00
parent 1a23d9a03e
commit fbac96166e
No known key found for this signature in database
GPG key ID: 007CA12D692829E1
2 changed files with 36 additions and 3 deletions

View file

@ -1,9 +1,34 @@
@using Iceshrimp.Shared.Schemas @using Iceshrimp.Shared.Schemas
@if (NoteResponse.Renote != null)
{
<div class="renote">
<div class="renote-info">
<span class="user">
Boosted by
@if (NoteResponse.User.DisplayName != null)
{
@NoteResponse.User.DisplayName
}
else
{
@NoteResponse.User.Username
}
</span>
<span class="metadata">
<NoteMetadata Visibility="NoteResponse.Visibility" InstanceName="@null" CreatedAt="DateTime.Parse(NoteResponse.CreatedAt)"/>
</span>
</div>
<NoteComponent Note="NoteResponse.Renote" Quote="NoteResponse.Quote" Indented="Indented"/>
</div>
}
else
{
<NoteComponent Note="NoteResponse" Quote="NoteResponse.Quote" Indented="Indented"/>
}
<NoteComponent Note="NoteResponse" Quote="NoteResponse.Quote" Indented="Indented"></NoteComponent>
@code { @code {
[Parameter][EditorRequired] public required NoteResponse NoteResponse { get; set; } [Parameter] [EditorRequired] public required NoteResponse NoteResponse { get; set; }
[Parameter] public bool Indented { get; set; } [Parameter] public bool Indented { get; set; }
} }

View file

@ -0,0 +1,8 @@
.renote-info {
display: flex;
margin-bottom: 0.5rem;
}
.metadata {
margin-left: auto;
}