Skip to content

Commit

Permalink
fix(post_view): fix backdrop blur in chromium
Browse files Browse the repository at this point in the history
  • Loading branch information
rupansh committed Feb 5, 2024
1 parent f1d2777 commit e813352
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 12 additions & 0 deletions src/page/post_view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::pin::pin;
use candid::Principal;
use futures::StreamExt;
use leptos::*;
use leptos_icons::*;
use leptos_router::*;

use crate::{
Expand Down Expand Up @@ -89,6 +90,17 @@ pub fn ScrollingView() -> impl IntoView {
}
/>

<Show when=muted>
<div
class="fixed top-1/2 left-1/2 cursor-pointer"
on:click=move |_| muted.set(false)
>
<Icon
class="text-white/80 animate-ping text-4xl"
icon=icondata::BiVolumeMuteSolid
/>
</div>
</Show>
</div>
}
}
Expand Down
6 changes: 0 additions & 6 deletions src/page/post_view/video_loader.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::canister::utils::{bg_url, mp4_url};
use leptos::{html::Video, *};
use leptos_icons::*;
use leptos_use::{
use_document, use_intersection_observer_with_options, UseIntersectionObserverOptions,
};
Expand Down Expand Up @@ -100,10 +99,5 @@ pub fn VideoView(idx: usize, muted: RwSignal<bool>) -> impl IntoView {
muted
preload="auto"
></video>
<Show when=move || muted() && current_idx() == idx>
<div class="fixed top-1/2 left-1/2 cursor-pointer" on:click=move |_| muted.set(false)>
<Icon class="text-white/80 animate-ping text-4xl" icon=icondata::BiVolumeMuteSolid/>
</div>
</Show>
}
}

0 comments on commit e813352

Please sign in to comment.