mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-27 03:56:50 -06:00
Fix up merged PRs: shape.action fills main's new Hyperlink sound fields and CustomShow returns
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f685deef57
commit
4c1357b2e6
@@ -686,7 +686,7 @@ fn shape_action(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
if !s.doc()?.doc.custom_shows.iter().any(|c| c.name == name) {
|
||||
return Err(bad(CMD, format!("no custom show `{name}`")));
|
||||
}
|
||||
Some(Action::CustomShow { name })
|
||||
Some(Action::CustomShow { name, returns: true })
|
||||
}
|
||||
"program" => Some(Action::Program { path: need("path")? }),
|
||||
"slide" => {
|
||||
@@ -698,7 +698,7 @@ fn shape_action(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
};
|
||||
let highlight = bool_param(p, "highlight").unwrap_or(true);
|
||||
let tooltip = str_param(p, "tooltip").unwrap_or("").to_string();
|
||||
let link = action.map(|action| Hyperlink { action, tooltip, highlight_click: highlight });
|
||||
let link = action.map(|action| Hyperlink { action, tooltip, highlight_click: highlight, sound: None, stop_sound: false });
|
||||
edit_shapes(s, p, CMD, |sh| {
|
||||
if hover {
|
||||
sh.hover = link.clone();
|
||||
|
||||
@@ -486,7 +486,7 @@ fn body(app: &mut SlideApp, ui: &mut Ui, d: &mut Dialog) -> bool {
|
||||
Some(Action::EndShow) => ("endShow", String::new()),
|
||||
Some(Action::PlayMedia) => ("playMedia", String::new()),
|
||||
Some(Action::Url { url }) => ("url", url.clone()),
|
||||
Some(Action::CustomShow { name }) => ("customShow", name.clone()),
|
||||
Some(Action::CustomShow { name, .. }) => ("customShow", name.clone()),
|
||||
Some(Action::Program { path }) => ("program", path.clone()),
|
||||
Some(Action::Slide { slide }) => ("slide", slides.iter().position(|(id, _)| id == slide).unwrap_or(0).to_string()),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user