Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

mode ui tweak

ameer2468179b485f3a35
diff --git a/apps/desktop/src/assets/illustrations/instant-mode-dark.png b/apps/desktop/src/assets/illustrations/instant-mode-dark.png
new file mode 100644
index 000000000..08975be3a
Binary files /dev/null and b/apps/desktop/src/assets/illustrations/instant-mode-dark.png differ
diff --git a/apps/desktop/src/assets/illustrations/instant-mode-light.png b/apps/desktop/src/assets/illustrations/instant-mode-light.png
new file mode 100644
index 000000000..b2a4fac24
Binary files /dev/null and b/apps/desktop/src/assets/illustrations/instant-mode-light.png differ
diff --git a/apps/desktop/src/assets/illustrations/studio-mode-dark.png b/apps/desktop/src/assets/illustrations/studio-mode-dark.png
new file mode 100644
index 000000000..71de0305f
Binary files /dev/null and b/apps/desktop/src/assets/illustrations/studio-mode-dark.png differ
diff --git a/apps/desktop/src/assets/illustrations/studio-mode-light.png b/apps/desktop/src/assets/illustrations/studio-mode-light.png
new file mode 100644
index 000000000..8a973cdff
Binary files /dev/null and b/apps/desktop/src/assets/illustrations/studio-mode-light.png differ
diff --git a/apps/desktop/src/components/ModeSelect.tsx b/apps/desktop/src/components/ModeSelect.tsx
index 38419e42b..080e8226a 100644
--- a/apps/desktop/src/components/ModeSelect.tsx
+++ b/apps/desktop/src/components/ModeSelect.tsx
@@ -1,6 +1,10 @@
import { JSX } from "solid-js";
import { createOptionsQuery } from "~/utils/queries";
import { RecordingMode } from "~/utils/tauri";
+import InstantModeDark from "../assets/illustrations/instant-mode-dark.png";
+import InstantModeLight from "../assets/illustrations/instant-mode-light.png";
+import StudioModeDark from "../assets/illustrations/studio-mode-dark.png";
+import StudioModeLight from "../assets/illustrations/studio-mode-light.png";
interface ModeOptionProps {
mode: RecordingMode;
@@ -9,31 +13,33 @@ interface ModeOptionProps {
icon: (props: { class: string }) => JSX.Element;
isSelected: boolean;
onSelect: (mode: RecordingMode) => void;
+ darkimg: string;
+ lightimg: string;
}
const ModeOption = (props: ModeOptionProps) => {
return (
<div
onClick={() => props.onSelect(props.mode)}
- class={`p-4 rounded-lg transition-colors cursor-pointer border-2 ${
+ class={`p-4 rounded-lg bg-gray-100 transition-all duration-200 ${
props.isSelected
- ? "border-blue-200 bg-[--gray-50] shadow-[0_0_180px_rgba(0,0,0,0.18)]"
- : "border-transparent"
+ ? "ring-2 ring-offset-2 hover:bg-gray-100 cursor-default ring-blue-300 ring-offset-gray-100"
+ : "ring-2 ring-transparent ring-offset-transparent hover:bg-gray-200 cursor-pointer"
}`}
>
- <div class="flex flex-col items-center text-center mb-2">
+ <div class="flex flex-col items-center mb-2 text-center">
{/* <props.icon
class={`size-8 mb-2 ${
- props.isSelected
- ? "text-[--gray-50]"
- : "text-[--gray-500] dark:text-[--gray-50]"
+ props.isSelected ? "text-gray-50" : "text-[--gray-500]"
}`}
/> */}
+ <img
+ src={props.isSelected ? props.lightimg : props.darkimg}
+ class="mb-6 w-full max-w-32"
+ />
<h3
class={`text-lg font-medium ${
- props.isSelected
- ? "text-[--gray-500]"
- : "text-[--gray-500] dark:text-[--gray-50]"
+ props.isSelected ? "text-gray-500" : "text-gray-500"
}`}
>
{props.title}
@@ -41,11 +47,7 @@ const ModeOption = (props: ModeOptionProps) => {
</div>
<p
- class={`text-sm ${
- props.isSelected
- ? "text-[--gray-500]"
- : "text-[--gray-500] dark:text-[--gray-50]"
- }`}
+ class={`mx-auto w-full text-sm text-gray-400 dark:text-gray-400 max-w-[300px]`}
>
{props.description}
</p>
@@ -68,6 +70,8 @@ const ModeSelect = () => {
description:
"Share your screen instantly with a magic link — no waiting for rendering, just capture and share in seconds.",
icon: IconCapInstant,
+ darkimg: InstantModeDark,
+ lightimg: InstantModeLight,
},
{
mode: "studio" as const,
@@ -75,6 +79,8 @@ const ModeSelect = () => {
description:
"Records at the highest quality/framerate. Captures both your screen and camera separately for editing later.",
icon: IconCapFilmCut,
+ darkimg: StudioModeDark,
+ lightimg: StudioModeLight,
},
];
@@ -86,6 +92,8 @@ const ModeSelect = () => {
mode={option.mode}
title={option.title}
description={option.description}
+ darkimg={option.darkimg}
+ lightimg={option.lightimg}
icon={option.icon}
isSelected={options.data?.mode === option.mode}
onSelect={handleModeChange}
diff --git a/apps/desktop/src/routes/mode-select.tsx b/apps/desktop/src/routes/mode-select.tsx
index 70e9a63c3..d0e281260 100644
--- a/apps/desktop/src/routes/mode-select.tsx
+++ b/apps/desktop/src/routes/mode-select.tsx
@@ -1,20 +1,13 @@
import ModeSelect from "~/components/ModeSelect";
-import InstantToggleBg from "~/assets/instant-toggle.jpg";
const ModeSelectWindow = () => {
return (
<div
data-tauri-drag-region
- class="min-h-screen flex items-center justify-center p-4 relative"
- style={{
- "background-image": `url(${InstantToggleBg})`,
- "background-size": "cover",
- "background-position": "center",
- "background-repeat": "no-repeat",
- }}
+ class="flex relative justify-center items-center p-4 min-h-screen bg-gray-50"
>
- <div class="w-full max-w-3xl relative z-10">
- <h2 class="text-xl font-semibold mb-8 text-center text-[--gray-500] dark:text-[--gray-50]">
+ <div class="relative z-10 w-full max-w-3xl">
+ <h2 class="mb-5 text-[24px] font-semibold text-center text-gray-500">
Select your recording mode
</h2>
<ModeSelect />
diff --git a/apps/desktop/src/styles/theme.css b/apps/desktop/src/styles/theme.css
index 86bf3b717..c218342dd 100644
--- a/apps/desktop/src/styles/theme.css
+++ b/apps/desktop/src/styles/theme.css
@@ -52,7 +52,7 @@
--gray-100: #242424; /* Secondary background */
--gray-200: #2a2a2a; /* Borders and dividers */
--gray-300: #3a3a3a; /* Subtle highlights */
- --gray-400: #ebebf0; /* Secondary text - descriptions */
+ --gray-400: #9d9d9d; /* Secondary text - descriptions */
--gray-500: #ffffff; /* Primary text - titles/headings (back to white) */
/* Add new variables for text hierarchy */