diff --git a/web/index.html b/web/index.html index 5091a975..14c1db09 100644 --- a/web/index.html +++ b/web/index.html @@ -312,10 +312,24 @@ .loader { animation: spin 1s linear infinite; } + span.dots { + &:after { + animation: dots 1.5s linear infinite; + display: inline-block; + content: ""; + } + } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } + @keyframes dots { + 0% { content: ""; } + 25% { content: "."; } + 50% { content: ".."; } + 75% { content: "..."; } + 100% { content: ""; } + } diff --git a/web/src/components/timeline.rs b/web/src/components/timeline.rs index a05863df..21062b63 100644 --- a/web/src/components/timeline.rs +++ b/web/src/components/timeline.rs @@ -125,7 +125,11 @@ pub fn TimelineReplies(tl: Timeline, root: String) -> impl IntoView { } }) } - >{move || if tl.loading.get() { "loading" } else { "more" }} + > + {move || if tl.loading.get() { + view! { "loading" }.into_view() + } else { "more".into_view() }} + } } @@ -159,7 +163,11 @@ pub fn TimelineFeed(tl: Timeline) -> impl IntoView { } }) } - >{move || if tl.loading.get() { "loading" } else { "more" }} + > + {move || if tl.loading.get() { + view! { "loading" }.into_view() + } else { "more".into_view() }} + } } diff --git a/web/src/page/debug.rs b/web/src/page/debug.rs index d9a41a96..d10c2d74 100644 --- a/web/src/page/debug.rs +++ b/web/src/page/debug.rs @@ -66,11 +66,14 @@ pub fn DebugPage() -> impl IntoView {
-				{move || object.get().map(|o| if plain.get() {
-					serde_json::to_string_pretty(&o).unwrap_or_else(|e| e.to_string()).into_view()
-				} else {
-					view! {  }.into_view()
-				})}
+				{move || match object.get() {
+					None => view! { 

}.into_view(), + Some(o) => if plain.get() { + serde_json::to_string_pretty(&o).unwrap_or_else(|e| e.to_string()).into_view() + } else { + view! { }.into_view() + }, + }}