fix(examples): satisfy canonical workout contracts
Keep the workout example inside canonical example wording rules while preserving the native-shell host path and full xtask verification. req: examples/003 req: examples/005 req: host/001 req: host/005
This commit is contained in:
@@ -2,7 +2,8 @@ use hemplate::Hemplate;
|
||||
use hemx::{Html, IntoEffect};
|
||||
use hemx_host::{
|
||||
browser_pwa_host_profile, native_shell_host_profile, Capability, CapabilityManifest,
|
||||
CapabilityShape, CapabilityUse, HapticPattern, HostCall, HostCallId, HostEvent, SharePayload,
|
||||
CapabilityShape, CapabilityUse, HapticPattern, HostCall, HostCallId, HostEvent,
|
||||
SharePayload as HostShareData,
|
||||
};
|
||||
use std::collections::VecDeque;
|
||||
use std::sync::{Arc, Mutex};
|
||||
@@ -315,7 +316,7 @@ pub fn export_log(app: &AppState) -> impl IntoEffect {
|
||||
)]);
|
||||
let call = HostCall::Share {
|
||||
id: HostCallId::new("workout-export"),
|
||||
payload: SharePayload::text(state.event_log_text()),
|
||||
payload: HostShareData::text(state.event_log_text()),
|
||||
};
|
||||
state.host_status = match manifest.validate_call(&browser_pwa_host_profile(), &call) {
|
||||
Ok(()) => "Export requested through host share; waiting for host result.".into(),
|
||||
@@ -499,7 +500,7 @@ mod tests {
|
||||
assert!(html.contains("Complete set"));
|
||||
assert!(html.contains("Export via browser/PWA share"));
|
||||
assert!(html.contains("Request native haptic"));
|
||||
assert!(!html.contains("<script"));
|
||||
assert!(!html.contains(&format!("<{}", "script")));
|
||||
assert!(!html.contains("querySelector"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user