Compare commits
No commits in common. "6841691910779080fdac258b77997f6bc600f40d" and "cb9cae1af86b800aa4352d3536a14448caa31a66" have entirely different histories.
6841691910
...
cb9cae1af8
2 changed files with 5 additions and 19 deletions
|
@ -156,9 +156,6 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 3em;
|
bottom: 3em;
|
||||||
}
|
}
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
img.avatar-circle {
|
img.avatar-circle {
|
||||||
display: inline;
|
display: inline;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
|
@ -125,32 +125,21 @@ pub fn Object(object: crate::Object) -> impl IntoView {
|
||||||
</Summary>
|
</Summary>
|
||||||
};
|
};
|
||||||
let post = match object.object_type() {
|
let post = match object.object_type() {
|
||||||
// mastodon, pleroma, misskey
|
Some(apb::ObjectType::Document(apb::DocumentType::Page)) => view! {
|
||||||
Some(apb::ObjectType::Note) => view! {
|
|
||||||
<blockquote class="tl">{post_inner}</blockquote>
|
|
||||||
}.into_view(),
|
|
||||||
// lemmy with Page, peertube with Video
|
|
||||||
Some(apb::ObjectType::Document(_)) => view! {
|
|
||||||
<div class="border ml-1 mr-1 mt-1">
|
<div class="border ml-1 mr-1 mt-1">
|
||||||
<b>{object.name().unwrap_or_default().to_string()}</b>
|
<b>{object.name().unwrap_or_default().to_string()}</b>
|
||||||
<hr />
|
<hr />
|
||||||
{post_inner}
|
{post_inner}
|
||||||
</div>
|
</div>
|
||||||
|
}.into_view(), // lemmy
|
||||||
|
Some(apb::ObjectType::Document(apb::DocumentType::Video)) => post_inner.into_view(), // peertube?
|
||||||
|
Some(apb::ObjectType::Note) => view! {
|
||||||
|
<blockquote class="tl">{post_inner}</blockquote>
|
||||||
}.into_view(),
|
}.into_view(),
|
||||||
// wordpress, ... ?
|
|
||||||
Some(apb::ObjectType::Article) => view! {
|
|
||||||
<div>
|
|
||||||
<h3>{object.name().unwrap_or_default().to_string()}</h3>
|
|
||||||
<hr />
|
|
||||||
{post_inner}
|
|
||||||
</div>
|
|
||||||
}.into_view(),
|
|
||||||
// everything else
|
|
||||||
Some(t) => view! {
|
Some(t) => view! {
|
||||||
<h3>{t.as_ref().to_string()}</h3>
|
<h3>{t.as_ref().to_string()}</h3>
|
||||||
{post_inner}
|
{post_inner}
|
||||||
}.into_view(),
|
}.into_view(),
|
||||||
// object without type?
|
|
||||||
None => view! { <code>missing object type</code> }.into_view(),
|
None => view! { <code>missing object type</code> }.into_view(),
|
||||||
};
|
};
|
||||||
view! {
|
view! {
|
||||||
|
|
Loading…
Reference in a new issue