Skip to content

Commit 634a8f0

Browse files
committed
fmt
1 parent af2673a commit 634a8f0

5 files changed

Lines changed: 147 additions & 140 deletions

File tree

apps/desktop/src/routes/(window-chrome)/new-main/index.tsx

Lines changed: 89 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -208,59 +208,59 @@ const createDisplaySignature = (
208208

209209
type TargetMenuPanelProps =
210210
| {
211-
variant: "display";
212-
targets?: CaptureDisplayWithThumbnail[];
213-
onSelect: (target: CaptureDisplayWithThumbnail) => void;
214-
}
211+
variant: "display";
212+
targets?: CaptureDisplayWithThumbnail[];
213+
onSelect: (target: CaptureDisplayWithThumbnail) => void;
214+
}
215215
| {
216-
variant: "window";
217-
targets?: CaptureWindowWithThumbnail[];
218-
onSelect: (target: CaptureWindowWithThumbnail) => void;
219-
}
216+
variant: "window";
217+
targets?: CaptureWindowWithThumbnail[];
218+
onSelect: (target: CaptureWindowWithThumbnail) => void;
219+
}
220220
| {
221-
variant: "recording";
222-
targets?: RecordingWithPath[];
223-
onSelect: (target: RecordingWithPath) => void;
224-
onViewAll: () => void;
225-
uploadProgress?: Record<string, number>;
226-
reuploadingPaths?: Set<string>;
227-
onReupload?: (path: string) => void;
228-
onRefetch?: () => void;
229-
}
221+
variant: "recording";
222+
targets?: RecordingWithPath[];
223+
onSelect: (target: RecordingWithPath) => void;
224+
onViewAll: () => void;
225+
uploadProgress?: Record<string, number>;
226+
reuploadingPaths?: Set<string>;
227+
onReupload?: (path: string) => void;
228+
onRefetch?: () => void;
229+
}
230230
| {
231-
variant: "screenshot";
232-
targets?: ScreenshotWithPath[];
233-
onSelect: (target: ScreenshotWithPath) => void;
234-
onViewAll: () => void;
235-
}
231+
variant: "screenshot";
232+
targets?: ScreenshotWithPath[];
233+
onSelect: (target: ScreenshotWithPath) => void;
234+
onViewAll: () => void;
235+
}
236236
| {
237-
variant: "camera";
238-
targets?: CameraWithDetails[];
239-
selectedTarget: CameraWithDetails | null;
240-
onSelect: (target: CameraWithDetails | null) => void;
241-
permissions?: OSPermissionsCheck;
242-
deviceSettings?: RecordingDeviceSettingsStore;
243-
onCameraSettingsChange: (
244-
camera: CameraWithDetails,
245-
settings: CameraDeviceSettings,
246-
) => void;
247-
compatibilityStudioMode: boolean;
248-
initialSettingsTarget?: CameraWithDetails | null;
249-
}
237+
variant: "camera";
238+
targets?: CameraWithDetails[];
239+
selectedTarget: CameraWithDetails | null;
240+
onSelect: (target: CameraWithDetails | null) => void;
241+
permissions?: OSPermissionsCheck;
242+
deviceSettings?: RecordingDeviceSettingsStore;
243+
onCameraSettingsChange: (
244+
camera: CameraWithDetails,
245+
settings: CameraDeviceSettings,
246+
) => void;
247+
compatibilityStudioMode: boolean;
248+
initialSettingsTarget?: CameraWithDetails | null;
249+
}
250250
| {
251-
variant: "microphone";
252-
targets?: MicrophoneWithDetails[];
253-
selectedTarget: MicrophoneWithDetails | null;
254-
onSelect: (target: MicrophoneWithDetails | null) => void;
255-
permissions?: OSPermissionsCheck;
256-
deviceSettings?: RecordingDeviceSettingsStore;
257-
onMicrophoneSettingsChange: (
258-
key: string,
259-
settings: MicrophoneDeviceSettings,
260-
) => void;
261-
compatibilityStudioMode: boolean;
262-
initialSettingsTarget?: MicrophoneWithDetails | null;
263-
};
251+
variant: "microphone";
252+
targets?: MicrophoneWithDetails[];
253+
selectedTarget: MicrophoneWithDetails | null;
254+
onSelect: (target: MicrophoneWithDetails | null) => void;
255+
permissions?: OSPermissionsCheck;
256+
deviceSettings?: RecordingDeviceSettingsStore;
257+
onMicrophoneSettingsChange: (
258+
key: string,
259+
settings: MicrophoneDeviceSettings,
260+
) => void;
261+
compatibilityStudioMode: boolean;
262+
initialSettingsTarget?: MicrophoneWithDetails | null;
263+
};
264264

265265
type SharedTargetMenuProps = {
266266
isLoading: boolean;
@@ -271,41 +271,41 @@ type SharedTargetMenuProps = {
271271

272272
type DeviceListPanelProps =
273273
| {
274-
variant: "camera";
275-
targets: CameraWithDetails[];
276-
selectedTarget: CameraWithDetails | null;
277-
onSelect: (target: CameraWithDetails | null) => void;
278-
isLoading?: boolean;
279-
errorMessage?: string;
280-
disabled?: boolean;
281-
emptyMessage?: string;
282-
permissions?: OSPermissionsCheck;
283-
deviceSettings?: RecordingDeviceSettingsStore;
284-
onCameraSettingsChange: (
285-
camera: CameraWithDetails,
286-
settings: CameraDeviceSettings,
287-
) => void;
288-
compatibilityStudioMode: boolean;
289-
initialSettingsTarget?: CameraWithDetails | null;
290-
}
274+
variant: "camera";
275+
targets: CameraWithDetails[];
276+
selectedTarget: CameraWithDetails | null;
277+
onSelect: (target: CameraWithDetails | null) => void;
278+
isLoading?: boolean;
279+
errorMessage?: string;
280+
disabled?: boolean;
281+
emptyMessage?: string;
282+
permissions?: OSPermissionsCheck;
283+
deviceSettings?: RecordingDeviceSettingsStore;
284+
onCameraSettingsChange: (
285+
camera: CameraWithDetails,
286+
settings: CameraDeviceSettings,
287+
) => void;
288+
compatibilityStudioMode: boolean;
289+
initialSettingsTarget?: CameraWithDetails | null;
290+
}
291291
| {
292-
variant: "microphone";
293-
targets: MicrophoneWithDetails[];
294-
selectedTarget: MicrophoneWithDetails | null;
295-
onSelect: (target: MicrophoneWithDetails | null) => void;
296-
isLoading?: boolean;
297-
errorMessage?: string;
298-
disabled?: boolean;
299-
emptyMessage?: string;
300-
permissions?: OSPermissionsCheck;
301-
deviceSettings?: RecordingDeviceSettingsStore;
302-
onMicrophoneSettingsChange: (
303-
key: string,
304-
settings: MicrophoneDeviceSettings,
305-
) => void;
306-
compatibilityStudioMode: boolean;
307-
initialSettingsTarget?: MicrophoneWithDetails | null;
308-
};
292+
variant: "microphone";
293+
targets: MicrophoneWithDetails[];
294+
selectedTarget: MicrophoneWithDetails | null;
295+
onSelect: (target: MicrophoneWithDetails | null) => void;
296+
isLoading?: boolean;
297+
errorMessage?: string;
298+
disabled?: boolean;
299+
emptyMessage?: string;
300+
permissions?: OSPermissionsCheck;
301+
deviceSettings?: RecordingDeviceSettingsStore;
302+
onMicrophoneSettingsChange: (
303+
key: string,
304+
settings: MicrophoneDeviceSettings,
305+
) => void;
306+
compatibilityStudioMode: boolean;
307+
initialSettingsTarget?: MicrophoneWithDetails | null;
308+
};
309309

310310
function CameraListItem(props: {
311311
camera: CameraWithDetails;
@@ -533,7 +533,7 @@ function CameraSettingsPanel(props: {
533533
props.value?.width === format.width &&
534534
props.value?.height === format.height &&
535535
Math.round(props.value?.frameRate ?? 0) ===
536-
Math.round(format.frameRate ?? 0);
536+
Math.round(format.frameRate ?? 0);
537537

538538
return (
539539
<div class="flex flex-col gap-3">
@@ -1694,7 +1694,7 @@ function Page() {
16941694
await commands.uploadExportedVideo(
16951695
path,
16961696
"Reupload",
1697-
new Channel<UploadProgress>(() => { }),
1697+
new Channel<UploadProgress>(() => {}),
16981698
null,
16991699
);
17001700
} finally {
@@ -2174,7 +2174,8 @@ function Page() {
21742174
await commands.stopRecording();
21752175
} catch (error) {
21762176
await dialog.message(
2177-
`Failed to stop recording: ${error instanceof Error ? error.message : String(error)
2177+
`Failed to stop recording: ${
2178+
error instanceof Error ? error.message : String(error)
21782179
}`,
21792180
{ title: "Stop Recording", kind: "error" },
21802181
);
@@ -2282,7 +2283,7 @@ function Page() {
22822283
class={cx(
22832284
"flex flex-1 overflow-hidden rounded-lg border border-gray-5 bg-gray-3 ring-1 ring-transparent ring-offset-2 ring-offset-gray-1 transition focus-within:ring-blue-9 focus-within:ring-offset-2 focus-within:ring-offset-gray-1",
22842285
(rawOptions.targetMode === "display" || displayMenuOpen()) &&
2285-
"ring-blue-9",
2286+
"ring-blue-9",
22862287
)}
22872288
>
22882289
<TargetTypeButton
@@ -2324,7 +2325,7 @@ function Page() {
23242325
class={cx(
23252326
"flex flex-1 overflow-hidden rounded-lg border border-gray-5 bg-gray-3 ring-1 ring-transparent ring-offset-2 ring-offset-gray-1 transition focus-within:ring-blue-9 focus-within:ring-offset-2 focus-within:ring-offset-gray-1",
23262327
(rawOptions.targetMode === "window" || windowMenuOpen()) &&
2327-
"ring-blue-9",
2328+
"ring-blue-9",
23282329
)}
23292330
>
23302331
<TargetTypeButton
@@ -2400,7 +2401,7 @@ function Page() {
24002401
}
24012402
}
24022403

2403-
await signIn.mutateAsync(abort).catch(() => { });
2404+
await signIn.mutateAsync(abort).catch(() => {});
24042405

24052406
for (const win of await getAllWebviewWindows()) {
24062407
if (win.label.startsWith("target-select-overlay")) {

apps/desktop/src/routes/editor/ConfigSidebar.tsx

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,11 @@ const findCursorPreset = (
311311
(option) =>
312312
option.preset &&
313313
Math.abs(option.preset.tension - values.tension) <=
314-
CURSOR_PRESET_TOLERANCE.tension &&
314+
CURSOR_PRESET_TOLERANCE.tension &&
315315
Math.abs(option.preset.mass - values.mass) <=
316-
CURSOR_PRESET_TOLERANCE.mass &&
316+
CURSOR_PRESET_TOLERANCE.mass &&
317317
Math.abs(option.preset.friction - values.friction) <=
318-
CURSOR_PRESET_TOLERANCE.friction,
318+
CURSOR_PRESET_TOLERANCE.friction,
319319
);
320320

321321
return preset?.value ?? null;
@@ -462,7 +462,7 @@ export function ConfigSidebar() {
462462
class={cx(
463463
"flex justify-center relative border-transparent border z-10 items-center rounded-md size-9 transition will-change-transform",
464464
state.selectedTab !== item.id &&
465-
"group-hover:border-gray-300 group-disabled:border-none",
465+
"group-hover:border-gray-300 group-disabled:border-none",
466466
)}
467467
>
468468
<Dynamic component={item.icon} />
@@ -1786,13 +1786,17 @@ function BackgroundConfig(props: {
17861786
ref={setBackgroundRef}
17871787
class="flex overflow-x-auto overscroll-contain relative z-10 flex-row gap-2 items-center mb-3 text-xs hide-scroll"
17881788
style={{
1789-
"-webkit-mask-image": `linear-gradient(to right, transparent, black ${scrollX() > 0 ? "24px" : "0"
1790-
}, black calc(100% - ${reachedEndOfScroll() ? "0px" : "24px"
1791-
}), transparent)`,
1792-
1793-
"mask-image": `linear-gradient(to right, transparent, black ${scrollX() > 0 ? "24px" : "0"
1794-
}, black calc(100% - ${reachedEndOfScroll() ? "0px" : "24px"
1795-
}), transparent);`,
1789+
"-webkit-mask-image": `linear-gradient(to right, transparent, black ${
1790+
scrollX() > 0 ? "24px" : "0"
1791+
}, black calc(100% - ${
1792+
reachedEndOfScroll() ? "0px" : "24px"
1793+
}), transparent)`,
1794+
1795+
"mask-image": `linear-gradient(to right, transparent, black ${
1796+
scrollX() > 0 ? "24px" : "0"
1797+
}, black calc(100% - ${
1798+
reachedEndOfScroll() ? "0px" : "24px"
1799+
}), transparent);`,
17961800
}}
17971801
>
17981802
<For each={Object.entries(BACKGROUND_THEMES)}>
@@ -1819,10 +1823,10 @@ function BackgroundConfig(props: {
18191823
value={
18201824
project.background.source.type === "wallpaper"
18211825
? (wallpapers()?.find((w) =>
1822-
(
1823-
project.background.source as { path?: string }
1824-
).path?.includes(w.id),
1825-
)?.url ?? undefined)
1826+
(
1827+
project.background.source as { path?: string }
1828+
).path?.includes(w.id),
1829+
)?.url ?? undefined)
18261830
: undefined
18271831
}
18281832
onChange={(photoUrl) => {
@@ -3356,7 +3360,8 @@ function ZoomSegmentPreview(props: {
33563360
createEffect(() => {
33573361
// TODO: make this not hardcoded
33583362
const path = convertFileSrc(
3359-
`${editorInstance.path}/content/segments/segment-${clipSegment()?.recordingSegment ?? 0
3363+
`${editorInstance.path}/content/segments/segment-${
3364+
clipSegment()?.recordingSegment ?? 0
33603365
}/display.mp4`,
33613366
);
33623367
video.src = path;
@@ -3559,7 +3564,8 @@ function ZoomSegmentConfig(props: {
35593564
createEffect(() => {
35603565
const path = convertFileSrc(
35613566
// TODO: this shouldn't be so hardcoded
3562-
`${editorInstance.path
3567+
`${
3568+
editorInstance.path
35633569
}/content/segments/segment-${segmentIndex()}/display.mp4`,
35643570
);
35653571
video.src = path;
@@ -3689,15 +3695,15 @@ function ZoomSegmentConfig(props: {
36893695
x: Math.max(
36903696
Math.min(
36913697
(moveEvent.clientX - bounds.left) /
3692-
bounds.width,
3698+
bounds.width,
36933699
1,
36943700
),
36953701
0,
36963702
),
36973703
y: Math.max(
36983704
Math.min(
36993705
(moveEvent.clientY - bounds.top) /
3700-
bounds.height,
3706+
bounds.height,
37013707
1,
37023708
),
37033709
0,

apps/desktop/src/routes/screenshot-editor/Editor.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,17 @@ function Dialogs() {
259259
const existingCrop = cropDialog().currentCrop;
260260
const initialBounds = existingCrop
261261
? {
262-
x: existingCrop.position.x,
263-
y: existingCrop.position.y,
264-
width: existingCrop.size.x,
265-
height: existingCrop.size.y,
266-
}
262+
x: existingCrop.position.x,
263+
y: existingCrop.position.y,
264+
width: existingCrop.size.x,
265+
height: existingCrop.size.y,
266+
}
267267
: {
268-
x: 0,
269-
y: 0,
270-
width: originalSize.x,
271-
height: originalSize.y,
272-
};
268+
x: 0,
269+
y: 0,
270+
width: originalSize.x,
271+
height: originalSize.y,
272+
};
273273

274274
const previewSize = () => {
275275
const srcW = originalSize.x;

apps/web/app/(org)/dashboard/caps/components/web-recorder-dialog/CameraPreviewWindow.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,9 @@ export const CameraPreviewWindow = ({
438438
const totalHeight = metrics.height + BAR_HEIGHT;
439439
const videoStyle = videoDimensions
440440
? {
441-
transform: mirrored ? "scaleX(-1)" : "scaleX(1)",
442-
opacity: isInPictureInPicture ? 0 : 1,
443-
}
441+
transform: mirrored ? "scaleX(-1)" : "scaleX(1)",
442+
opacity: isInPictureInPicture ? 0 : 1,
443+
}
444444
: { opacity: 0 };
445445
// Keep the video node rendered even in PiP mode so the track keeps producing frames.
446446

0 commit comments

Comments
 (0)