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