diff --git a/web/index.html b/web/index.html
index 9aafeab3..cea29866 100644
--- a/web/index.html
+++ b/web/index.html
@@ -84,6 +84,12 @@
font-size: .6em;
color: var(--secondary);
}
+ span.nowrap {
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ display: block;
+ }
hr.sep {
z-index: 100;
margin-top: 0;
diff --git a/web/src/app.rs b/web/src/app.rs
index 90d9cf1a..0a76836c 100644
--- a/web/src/app.rs
+++ b/web/src/app.rs
@@ -20,6 +20,9 @@ pub fn App() -> impl IntoView {
let user_tl = Timeline::new(format!("{URL_BASE}/users/{}/outbox/page", username.get().unwrap_or_default()));
let context_tl = Timeline::new(format!("{URL_BASE}/outbox/page"));
+ let reply_controls = ReplyControls::default();
+ provide_context(reply_controls);
+
let screen_width = window().screen().map(|x| x.avail_width().unwrap_or_default()).unwrap_or_default();
let (menu, set_menu) = create_signal(screen_width <= 786);
diff --git a/web/src/components/object.rs b/web/src/components/object.rs
index 3a6bb390..dc02f473 100644
--- a/web/src/components/object.rs
+++ b/web/src/components/object.rs
@@ -1,5 +1,3 @@
-use std::sync::Arc;
-
use leptos::*;
use crate::{prelude::*, URL_SENSITIVE};
@@ -127,7 +125,7 @@ pub fn Object(object: crate::Object) -> impl IntoView {
-
+
@@ -199,14 +197,23 @@ pub fn LikeButton(
}
#[component]
-pub fn ReplyButton(n: u64) -> impl IntoView {
+pub fn ReplyButton(n: u64, target: String) -> impl IntoView {
+ let reply = use_context::().expect("missing reply controls context");
let comments = if n > 0 {
Some(view! { {n} })
} else {
None
};
+ let _target = target.clone(); // TODO ughhhh useless clones
view! {
- {comments}" 📨"
+
+ {comments}
+ " 📨"
+
}
}
diff --git a/web/src/control.rs b/web/src/control.rs
index 9602e2ee..9d02457c 100644
--- a/web/src/control.rs
+++ b/web/src/control.rs
@@ -1,4 +1,4 @@
-use apb::{ActivityMut, BaseMut, ObjectMut};
+use apb::{ActivityMut, Base, BaseMut, Object, ObjectMut};
use leptos::*;
use crate::prelude::*;
@@ -14,9 +14,35 @@ pub fn Navigator() -> impl IntoView {
}
}
+#[derive(Debug, Clone, Copy, Default)]
+pub struct ReplyControls {
+ pub context: RwSignal