Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
error if not authed
Brendan Alland5b5b558c4c4
diff --git a/apps/desktop/src-tauri/src/recording.rs b/apps/desktop/src-tauri/src/recording.rsindex 575a8817f..ce2b59d4f 100644--- a/apps/desktop/src-tauri/src/recording.rs+++ b/apps/desktop/src-tauri/src/recording.rs@@ -130,20 +130,25 @@ pub async fn start_recording(.join("recordings").join(format!("{id}.cap"));- if let Ok(Some(auth)) = AuthStore::get(&app) {- if matches!(state.recording_options.mode, RecordingMode::Instant) && auth.is_upgraded() {- // Pre-create the video and get the shareable link- if let Ok(s3_config) = get_s3_config(&app, false, None).await {- let link = web_api::make_url(format!("/s/{}", s3_config.id()));-- state.pre_created_video = Some(PreCreatedVideo {- id: s3_config.id().to_string(),- link: link.clone(),- config: s3_config,- });-- info!("Pre-created shareable link: {}", link);- };+ if matches!(state.recording_options.mode, RecordingMode::Instant) {+ match AuthStore::get(&app) {+ Ok(Some(auth)) if auth.is_upgraded() => {+ // Pre-create the video and get the shareable link+ if let Ok(s3_config) = get_s3_config(&app, false, None).await {+ let link = web_api::make_url(format!("/s/{}", s3_config.id()));++ state.pre_created_video = Some(PreCreatedVideo {+ id: s3_config.id().to_string(),+ link: link.clone(),+ config: s3_config,+ });++ info!("Pre-created shareable link: {}", link);+ };+ }+ _ => {+ Err("Instant recording requires Cap Pro")?;+ }}}@@ -354,7 +359,6 @@ async fn handle_recording_finish(RecordingMetaInner::Studio(recording.meta)}CompletedRecording::Instant(recording) => {- dbg!(&state.pre_created_video);if let Some(pre_created_video) = state.pre_created_video.take() {spawn_actor({let app = app.clone();