Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

use resolved options.target in startRecording

Brendan Allan791cd0afac3e
diff --git a/apps/desktop/src/routes/(window-chrome)/(main).tsx b/apps/desktop/src/routes/(window-chrome)/(main).tsx
index 17a1ec429..d8413b777 100644
--- a/apps/desktop/src/routes/(window-chrome)/(main).tsx
+++ b/apps/desktop/src/routes/(window-chrome)/(main).tsx
@@ -200,7 +200,7 @@ function Page() {
mutationFn: async () => {
if (!isRecording()) {
await commands.startRecording({
- capture_target: rawOptions.captureTarget,
+ capture_target: options.target(),
mode: rawOptions.mode,
capture_system_audio: rawOptions.captureSystemAudio,
});
@@ -314,8 +314,8 @@ function Page() {
{license.data?.type === "commercial"
? "Commercial"
: license.data?.type === "pro"
- ? "Pro"
- : "Personal"}
+ ? "Pro"
+ : "Personal"}
</span>
</Suspense>
</ErrorBoundary>
@@ -346,7 +346,7 @@ function Page() {
"flex flex-row items-center rounded-[0.5rem] relative border h-8 transition-all duration-500",
(rawOptions.captureTarget.variant === "screen" ||
rawOptions.captureTarget.variant === "area") &&
- "ml-[2.4rem]"
+ "ml-[2.4rem]"
)}
style={{
"transition-timing-function":
@@ -439,8 +439,7 @@ function Page() {
<div class="flex items-center space-x-1 w-full">
{rawOptions.mode === "instant" && !auth.data ? (
<>
- <SignInButton
- >
+ <SignInButton>
Sign In for{" "}
<IconCapInstant class="invert-0 dark:invert size-[0.8rem] mx-1" />
Instant Mode
@@ -604,8 +603,8 @@ function AreaSelectButton(props: {
props.targetVariant === "area"
? "Remove selection"
: areaSelection.pending
- ? "Selecting area..."
- : "Select area"
+ ? "Selecting area..."
+ : "Select area"
}
childClass="flex fixed flex-row items-center w-8 h-8"
>
@@ -676,7 +675,7 @@ function AreaSelectButton(props: {
class={cx(
"w-[1rem] h-[1rem]",
areaSelection.pending &&
- "animate-gentle-bounce duration-1000 text-gray-12 mt-1"
+ "animate-gentle-bounce duration-1000 text-gray-12 mt-1"
)}
/>
</button>
@@ -986,8 +985,8 @@ function TargetSelectInfoPill<T>(props: {
{!props.permissionGranted
? "Request Permission"
: props.value !== null
- ? "On"
- : "Off"}
+ ? "On"
+ : "Off"}
</InfoPill>
);
}
diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.ts
index 5e292684d..c19dd3b32 100644
--- a/apps/desktop/src/utils/tauri.ts
+++ b/apps/desktop/src/utils/tauri.ts
@@ -359,7 +359,7 @@ openEditorAfterRecording?: boolean;
/**
* @deprecated can be removed when native camera preview is ready
*/
-enableNativeCameraPreview: boolean; autoZoomOnClicks?: boolean }
+enableNativeCameraPreview?: boolean; autoZoomOnClicks?: boolean }
export type GifExportSettings = { fps: number; resolution_base: XY<number> }
export type HapticPattern = "Alignment" | "LevelChange" | "Generic"
export type HapticPerformanceTime = "Default" | "Now" | "DrawCompleted"