store art from the live stores: storebound art pull (App Store screenshot sets and previews per locale and display type from imageAsset.templateUrl at the original size, the App Store icon from the newest build or the public artwork; per Play language icon, feature graphic, phone / 7" / 10" / TV / Wear screenshots as the =s0 originals checked against Play's sha256) into store/renders with pulled.json (sha256, store, URL host, store checksum); upsert (a re-run changes nothing, differing local files kept unless --force, the upload's file of a slot compared: Play .jpg, App Store .png, the App Store icon as a picture); onboard runs it; apple screenshots / previews and play images see unchanged pulled files as the store's own; check: render sources are notes with pulled art; local renders check: pulled files pass, store-empty sets not demanded; art live / thumb / replace; desktop Store art tab: live thumbnails per store, language and set (same / differs / not pulled), Pull from stores, store-only apps read-only, Replace with a file (image_pick, art.replace) in the lightbox and the art editor; boot check store art case; tests/art-pull.test.ts; console parity 76 rows (57 complete, 19 with the reason); store-screenshots skill (pull first for live apps), pitfall 59
This commit is contained in:
parent
49a73c90e4
commit
00be838b76
40 changed files with 1669 additions and 58 deletions
|
|
@ -712,6 +712,25 @@ pub async fn price_sheet_pick(window: WebviewWindow, state: State<'_, AppState>,
|
|||
Ok(Some(p.to_string_lossy().to_string()))
|
||||
}
|
||||
|
||||
/// An image (PNG / JPEG) to replace one store image with, picked in a native dialog. None = cancelled. The path goes
|
||||
/// back to the window only as the `from` argument of art.replace (a write: dry run, dialog, then the copy into the app
|
||||
/// folder).
|
||||
#[tauri::command]
|
||||
pub async fn image_pick(window: WebviewWindow, state: State<'_, AppState>, project_id: String) -> Res<Option<String>> {
|
||||
guard(&window)?;
|
||||
let start = saved(&state)?.projects.iter().find(|p| p.id == project_id).map(|p| PathBuf::from(&p.path)).ok_or_else(|| Fail::host("unknown project"))?;
|
||||
let w = window.clone();
|
||||
let picked = tauri::async_runtime::spawn_blocking(move || w.app_handle().dialog().file().set_title("Choose an image (PNG or JPEG)").add_filter("Image", &["png", "jpg", "jpeg"]).set_directory(start).set_parent(&w).blocking_pick_file())
|
||||
.await
|
||||
.map_err(|e| Fail::host(e.to_string()))?;
|
||||
let Some(picked) = picked else { return Ok(None) };
|
||||
let p = picked.into_path().map_err(|e| Fail::host(e.to_string()))?;
|
||||
if !p.extension().is_some_and(|e| ["png", "jpg", "jpeg"].iter().any(|x| e.eq_ignore_ascii_case(x))) {
|
||||
return Err(Fail::host("pick a .png or .jpg file"));
|
||||
}
|
||||
Ok(Some(p.to_string_lossy().to_string()))
|
||||
}
|
||||
|
||||
/// Shows a folder or file of an app folder in the file manager (`rel` empty: the app folder), or opens it with
|
||||
/// `open` (a folder, or the gallery page storebound writes: <renders>/index.html in the default browser).
|
||||
#[tauri::command]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue