Server: Handle optional comment publish date
This commit is contained in:
parent
22d8f85fba
commit
39f3a19189
|
@ -27,9 +27,11 @@
|
|||
@view.profile.full_handle()
|
||||
})
|
||||
</div>
|
||||
<div class="profile-box--meta--date">
|
||||
@:ago(loader, comment.published())
|
||||
</div>
|
||||
@if let Some(date) = comment.published() {
|
||||
<div class="profile-box--meta--date">
|
||||
@:ago(loader, date)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
@use hyaenidae_toolkit::{templates::icon, Size};
|
||||
@use i18n_embed_fl::fl;
|
||||
|
||||
@(loader: &ActixLoader, view: &OwnedProfileView, published: DateTime<Utc>, parent: &CommentNode, cache: &Cache, dark: bool, meta: Content, body: Content)
|
||||
@(loader: &ActixLoader, view: &OwnedProfileView, published: Option<DateTime<Utc>>, parent: &CommentNode, cache: &Cache, dark: bool, meta: Content, body: Content)
|
||||
|
||||
<div class="profile-box">
|
||||
@:icon(&view.icon(loader).size(Size::Small).dark(dark))
|
||||
|
@ -28,9 +28,11 @@
|
|||
@view.profile.full_handle()
|
||||
})
|
||||
</div>
|
||||
<div class="profile-box--meta--date">
|
||||
@:ago(loader, published)
|
||||
</div>
|
||||
@if let Some(date) = published {
|
||||
<div class="profile-box--meta--date">
|
||||
@:ago(loader, date)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="profile-box--replying-to">
|
||||
@if let Some(l) = parent.view_link(cache) {
|
||||
|
|
Loading…
Reference in a new issue