Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Merge branch 'main' into desktop-tailwind-v4

Ilya44938bc22cae
diff --cc apps/desktop/src/routes/camera.tsx
index f2eaa2266,b4a7b20f2..2bb04767f
--- a/apps/desktop/src/routes/camera.tsx
+++ b/apps/desktop/src/routes/camera.tsx
@@@ -1281,15 -1310,16 +1310,16 @@@ function cameraBorderRadius(state: Came
return `${radius}rem`;
}
- function CameraDisconnectedOverlay() {
+ function CameraIssueOverlay(props: { issue: CameraPreviewIssue }) {
return (
<div
- class="absolute inset-0 z-50 flex items-center justify-center bg-black/75 backdrop-blur-sm px-4 pointer-events-none"
+ class="absolute inset-0 z-50 flex items-center justify-center bg-black/75 backdrop-blur-xs px-4 pointer-events-none"
style={{ "border-radius": "inherit" }}
>
- <p class="text-center text-sm font-medium text-white/90">
- Camera disconnected
- </p>
+ <div class="flex max-w-[18rem] flex-col items-center gap-2 text-center text-white">
+ <p class="text-sm font-semibold text-white">{props.issue.title}</p>
+ <p class="text-xs leading-5 text-white/75">{props.issue.message}</p>
+ </div>
</div>
);
}
diff --cc apps/desktop/src/routes/editor/ConfigSidebar.tsx
index c8780f55d,bcc9e619e..175f6a634
--- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx
+++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx
@@@ -305,11 -311,11 +311,11 @@@ const findCursorPreset =
(option) =>
option.preset &&
Math.abs(option.preset.tension - values.tension) <=
-- CURSOR_PRESET_TOLERANCE.tension &&
++ CURSOR_PRESET_TOLERANCE.tension &&
Math.abs(option.preset.mass - values.mass) <=
-- CURSOR_PRESET_TOLERANCE.mass &&
++ CURSOR_PRESET_TOLERANCE.mass &&
Math.abs(option.preset.friction - values.friction) <=
-- CURSOR_PRESET_TOLERANCE.friction,
++ CURSOR_PRESET_TOLERANCE.friction,
);
return preset?.value ?? null;
@@@ -450,7 -462,7 +462,7 @@@ export function ConfigSidebar()
class={cx(
"flex justify-center relative border-transparent border z-10 items-center rounded-md size-9 transition will-change-transform",
state.selectedTab !== item.id &&
-- "group-hover:border-gray-300 group-disabled:border-none",
++ "group-hover:border-gray-300 group-disabled:border-none",
)}
>
<Dynamic component={item.icon} />
@@@ -1737,17 -1786,17 +1786,13 @@@ function BackgroundConfig(props:
ref={setBackgroundRef}
class="flex overflow-x-auto overscroll-contain relative z-10 flex-row gap-2 items-center mb-3 text-xs hide-scroll"
style={{
-- "-webkit-mask-image": `linear-gradient(to right, transparent, black ${
-- scrollX() > 0 ? "24px" : "0"
-- }, black calc(100% - ${
-- reachedEndOfScroll() ? "0px" : "24px"
-- }), transparent)`,
--
-- "mask-image": `linear-gradient(to right, transparent, black ${
-- scrollX() > 0 ? "24px" : "0"
-- }, black calc(100% - ${
-- reachedEndOfScroll() ? "0px" : "24px"
-- }), transparent);`,
++ "-webkit-mask-image": `linear-gradient(to right, transparent, black ${scrollX() > 0 ? "24px" : "0"
++ }, black calc(100% - ${reachedEndOfScroll() ? "0px" : "24px"
++ }), transparent)`,
++
++ "mask-image": `linear-gradient(to right, transparent, black ${scrollX() > 0 ? "24px" : "0"
++ }, black calc(100% - ${reachedEndOfScroll() ? "0px" : "24px"
++ }), transparent);`,
}}
>
<For each={Object.entries(BACKGROUND_THEMES)}>
@@@ -1774,10 -1823,10 +1819,10 @@@
value={
project.background.source.type === "wallpaper"
? (wallpapers()?.find((w) =>
-- (
-- project.background.source as { path?: string }
-- ).path?.includes(w.id),
-- )?.url ?? undefined)
++ (
++ project.background.source as { path?: string }
++ ).path?.includes(w.id),
++ )?.url ?? undefined)
: undefined
}
onChange={(photoUrl) => {
@@@ -3285,8 -3360,8 +3356,7 @@@ function ZoomSegmentPreview(props:
createEffect(() => {
// TODO: make this not hardcoded
const path = convertFileSrc(
-- `${editorInstance.path}/content/segments/segment-${
-- clipSegment()?.recordingSegment ?? 0
++ `${editorInstance.path}/content/segments/segment-${clipSegment()?.recordingSegment ?? 0
}/display.mp4`,
);
video.src = path;
@@@ -3489,8 -3564,8 +3559,7 @@@ function ZoomSegmentConfig(props:
createEffect(() => {
const path = convertFileSrc(
// TODO: this shouldn't be so hardcoded
-- `${
-- editorInstance.path
++ `${editorInstance.path
}/content/segments/segment-${segmentIndex()}/display.mp4`,
);
video.src = path;
@@@ -3620,7 -3695,7 +3689,7 @@@
x: Math.max(
Math.min(
(moveEvent.clientX - bounds.left) /
-- bounds.width,
++ bounds.width,
1,
),
0,
@@@ -3628,7 -3703,7 +3697,7 @@@
y: Math.max(
Math.min(
(moveEvent.clientY - bounds.top) /
-- bounds.height,
++ bounds.height,
1,
),
0,
diff --cc apps/desktop/src/routes/editor/Editor.tsx
index de8e38cf8,59927c445..15373fe6e
--- a/apps/desktop/src/routes/editor/Editor.tsx
+++ b/apps/desktop/src/routes/editor/Editor.tsx
@@@ -1064,8 -1064,7 +1064,7 @@@ function Dialogs()
<Button
variant="white"
size="xs"
- class="flex items-center justify-center text-center rounded-full h-[2rem] w-[2rem] border focus:border-blue-9"
+ class="flex items-center justify-center text-center rounded-full h-8 w-8 border focus:border-blue-9"
- onMouseDown={showCropOptionsMenu}
onClick={showCropOptionsMenu}
>
<div class="relative pointer-events-none size-4">
diff --cc apps/desktop/src/routes/screenshot-editor/Editor.tsx
index dcf15b801,978611308..804c0fc61
--- a/apps/desktop/src/routes/screenshot-editor/Editor.tsx
+++ b/apps/desktop/src/routes/screenshot-editor/Editor.tsx
@@@ -221,17 -221,17 +221,17 @@@ function Dialogs()
const existingCrop = cropDialog().currentCrop;
const initialBounds = existingCrop
? {
-- x: existingCrop.position.x,
-- y: existingCrop.position.y,
-- width: existingCrop.size.x,
-- height: existingCrop.size.y,
-- }
++ x: existingCrop.position.x,
++ y: existingCrop.position.y,
++ width: existingCrop.size.x,
++ height: existingCrop.size.y,
++ }
: {
-- x: 0,
-- y: 0,
-- width: originalSize.x,
-- height: originalSize.y,
-- };
++ x: 0,
++ y: 0,
++ width: originalSize.x,
++ height: originalSize.y,
++ };
const previewSize = () => {
const srcW = originalSize.x;
@@@ -331,8 -331,7 +331,7 @@@
<Button
variant="white"
size="xs"
- class="flex items-center justify-center text-center rounded-full h-[2rem] w-[2rem] border focus:border-blue-9"
+ class="flex items-center justify-center text-center rounded-full h-8 w-8 border focus:border-blue-9"
- onMouseDown={showCropOptionsMenu}
onClick={showCropOptionsMenu}
>
<div class="relative pointer-events-none size-4">