diff options
| author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-10-27 20:01:00 +0100 |
|---|---|---|
| committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-10-27 20:01:00 +0100 |
| commit | b084d94e484aa057cc839892c6e49df3caf8a0e6 (patch) | |
| tree | 9662970fe087a04cc7f8b5f1dbc641590859093f /crates/wipfel/src/app.rs | |
| parent | 2df51e89039b9b160aafb52b700e874411eb0555 (diff) | |
Revert "wipfel: PWA — manifest, service worker, Web Share Target"
This reverts commit 2df51e89039b9b160aafb52b700e874411eb0555.
Diffstat (limited to 'crates/wipfel/src/app.rs')
| -rw-r--r-- | crates/wipfel/src/app.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/crates/wipfel/src/app.rs b/crates/wipfel/src/app.rs index 441f17c..78961fc 100644 --- a/crates/wipfel/src/app.rs +++ b/crates/wipfel/src/app.rs @@ -11,7 +11,6 @@ use gipfel_core::metadata::{apply_image_metadata, ImageMetaData}; use gipfel_core::panorama::Panorama; use wasm_bindgen::closure::Closure; use wasm_bindgen::JsCast; -use wasm_bindgen::JsValue; use wasm_bindgen_futures::spawn_local; use web_sys::{DragEvent, Event, HtmlCanvasElement, HtmlInputElement, InputEvent, MouseEvent}; use yew::prelude::*; @@ -451,37 +450,6 @@ pub fn app() -> Html { }) }; - // Web Share Target handoff: the service worker stashes the shared - // file at `__shared` and redirects here with ?shared=1 - { - let load_bytes = load_bytes.clone(); - let status = status.clone(); - use_effect_with((), move |_| { - let shared = web_sys::window() - .map(|w| { - w.location() - .search() - .map(|s| s.contains("shared=1")) - .unwrap_or(false) - }) - .unwrap_or(false); - if shared { - spawn_local(async move { - match bridge::fetch_bytes("__shared").await { - Ok(bytes) => load_bytes.emit((bytes, "shared image".into())), - Err(e) => status.set(format!("shared image missing: {e}")), - } - }); - if let Some(w) = web_sys::window() { - let _ = w - .history() - .and_then(|h| h.replace_state_with_url(&JsValue::NULL, "", Some("./"))); - } - } - || () - }); - } - let on_drop = { let read_file = read_file.clone(); let status = status.clone(); |
