String packs: the site tab's delivery layer lives in app.rs, so a host without the net feature builds again (a generated app's cargo check failed on the net-gated store_commands module)

This commit is contained in:
CRTkafa 2026-10-01 04:40:25 +07:00
parent 2c7c143487
commit b3dd6f7eea
3 changed files with 10 additions and 9 deletions

View file

@ -183,13 +183,6 @@ pub(crate) async fn strings_apply(webview: Webview, app: AppHandle, delivery: Op
Ok(())
}
/// The document-start script that gives a new site tab the current string packs (none when the
/// shell never applied any). Part of the normal page layers, so safe mode leaves it out.
pub(crate) fn strings_init_script(app: &AppHandle) -> Option<String> {
let stored = app.try_state::<Store>()?.strings().delivery()?;
Some(delivery_script(crate::app::config(app).site.hosts, &stored, false))
}
/// The store's commands ([`crate::commands::STORE`]).
pub(crate) fn handler() -> impl Fn(tauri::ipc::Invoke<tauri::Wry>) -> bool + Send + Sync + 'static {
tauri::generate_handler![