diff --git a/apps/desktop/src-tauri/src/deeplink_actions.rs b/apps/desktop/src-tauri/src/deeplink_actions.rs index a117028487..5e56ffb886 100644 --- a/apps/desktop/src-tauri/src/deeplink_actions.rs +++ b/apps/desktop/src-tauri/src/deeplink_actions.rs @@ -31,9 +31,18 @@ pub enum DeepLinkAction { }, OpenSettings { page: Option, + }, + + + PauseRecording, + ResumeRecording, + SwitchCamera, + SwitchMicrophone, + CaptureScreenshot} } + pub fn handle(app_handle: &AppHandle, urls: Vec) { trace!("Handling deep actions for: {:?}", &urls); @@ -49,6 +58,7 @@ pub fn handle(app_handle: &AppHandle, urls: Vec) { ActionParseFromUrlError::Invalid => { eprintln!("Invalid deep link format \"{}\"", &url) } + // Likely login action, not handled here. ActionParseFromUrlError::NotAction => {} }) @@ -149,10 +159,28 @@ impl DeepLinkAction { } DeepLinkAction::OpenEditor { project_path } => { crate::open_project_from_path(Path::new(&project_path), app.clone()) + DeepLinkAction::PauseRecording => { + crate::recording::pause_recording(app.clone(), app.state()).await.map(|_| ()) + } + DeepLinkAction::ResumeRecording => { + crate::recording::resume_recording(app.clone(), app.state()).await.map(|_| ()) + } + DeepLinkAction::SwitchCamera => { + Ok(()) + } + DeepLinkAction::SwitchMicrophone => { + Ok(()) + } + DeepLinkAction::CaptureScreenshot => { + Ok(()) + + DeepLinkAction::OpenSettings { page } => { + crate::show_window(app.clone(), ShowCapWindow::Settings { page }).await + } +} + } - DeepLinkAction::OpenSettings { page } => { - crate::show_window(app.clone(), ShowCapWindow::Settings { page }).await - } + } } } diff --git a/apps/raycast/README.md b/apps/raycast/README.md new file mode 100644 index 0000000000..42ca7852c3 --- /dev/null +++ b/apps/raycast/README.md @@ -0,0 +1,3 @@ +# Raycast Extension + +This directory contains a Raycast extension for Cap. It is a placeholder for future commands such as start/stop/pause/resume recording, switch camera or microphone, and capture screenshots. Implementation will be provided later.