Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: More style fixes

Richie McIlroy2026345ffe20
diff --git a/apps/desktop/src/routes/(window-chrome)/(main).tsx b/apps/desktop/src/routes/(window-chrome)/(main).tsx
index 540e9bcef..4e9576e24 100644
--- a/apps/desktop/src/routes/(window-chrome)/(main).tsx
+++ b/apps/desktop/src/routes/(window-chrome)/(main).tsx
@@ -131,8 +131,8 @@ export default function () {
}}
class={`text-[0.625rem] ${
isUpgraded()
- ? "bg-[--blue-400] text-[--text-primary]"
- : "bg-gray-200 text-gray-400 cursor-pointer hover:bg-gray-300"
+ ? "bg-[--blue-400] text-gray-50 dark:text-gray-500"
+ : "bg-gray-200 cursor-pointer hover:bg-gray-300"
} rounded-lg px-1.5 py-0.5`}
>
{isUpgraded() ? "Pro" : "Free"}
@@ -206,7 +206,7 @@ export default function () {
variant={isRecording() ? "destructive" : "primary"}
size="md"
onClick={() => toggleRecording.mutate()}
- class="flex-grow text-[--text-primary] hover:text-[--text-primary]"
+ class="flex-grow"
>
{isRecording() ? "Stop Recording" : "Start Recording"}
</Button>
diff --git a/apps/desktop/src/routes/in-progress-recording.tsx b/apps/desktop/src/routes/in-progress-recording.tsx
index 8bc73008f..c7c96c128 100644
--- a/apps/desktop/src/routes/in-progress-recording.tsx
+++ b/apps/desktop/src/routes/in-progress-recording.tsx
@@ -1,4 +1,5 @@
import { createEffect, createSignal, type ComponentProps } from "solid-js";
+import { cx } from "cva";
import { commands, events } from "~/utils/tauri";
import { createTimer } from "@solid-primitives/timer";
@@ -52,9 +53,7 @@ export default function () {
}));
return (
- <div
- class="text-[--text-primary] flex flex-row items-stretch bg-gray-50 dark:bg-gray-100 w-full h-full animate-in fade-in"
- >
+ <div class="flex flex-row items-stretch bg-gray-500 dark:bg-gray-50 w-full h-full animate-in fade-in">
<div class="flex flex-row justify-between p-[0.25rem] flex-1">
<button
disabled={stopRecording.isPending}
@@ -72,7 +71,6 @@ export default function () {
<ActionButton
disabled={togglePause.isPending}
onClick={() => togglePause.mutate()}
- class="text-[--text-primary] hover:bg-gray-200 dark:hover:bg-gray-300 flex items-center justify-center"
>
{isPaused() ? <IconCapPlayCircle /> : <IconCapPauseCircle />}
</ActionButton>
@@ -81,16 +79,18 @@ export default function () {
<ActionButton
disabled={restartRecording.isPending}
onClick={() => restartRecording.mutate()}
- class="text-[--text-primary] hover:bg-gray-200 dark:hover:bg-gray-300 h-8 w-8 flex items-center justify-center"
>
- <IconCapRestart class="hover:bg-gray-200 dark:hover:bg-gray-300"/>
+ <IconCapRestart />
</ActionButton>
</div>
<div
- class="bg-white-transparent-5 cursor-move flex items-center justify-center p-[0.25rem] border-l border-white-transparent-5"
+ class="bg-gray-500 dark:bg-gray-50 cursor-move flex items-center justify-center p-[0.25rem] border-l border-gray-400 dark:border-gray-200"
data-tauri-drag-region
>
- <IconCapMoreVertical data-tauri-drag-region />
+ <IconCapMoreVertical
+ class="text-gray-400 dark:text-gray-400"
+ data-tauri-drag-region
+ />
</div>
</div>
);
@@ -100,7 +100,12 @@ function ActionButton(props: ComponentProps<"button">) {
return (
<button
{...props}
- class="p-[0.25rem] rounded-lg transition-colors"
+ class={cx(
+ "p-[0.25rem] rounded-lg transition-colors",
+ "text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-300",
+ "h-8 w-8 flex items-center justify-center",
+ props.class
+ )}
type="button"
/>
);
diff --git a/apps/desktop/src/routes/prev-recordings.tsx b/apps/desktop/src/routes/prev-recordings.tsx
index 757f76f86..3b0e96f0c 100644
--- a/apps/desktop/src/routes/prev-recordings.tsx
+++ b/apps/desktop/src/routes/prev-recordings.tsx
@@ -206,9 +206,9 @@ export default function () {
ref={setRef}
style={{ "border-color": "rgba(255, 255, 255, 0.1)" }}
class={cx(
- "w-[260px] h-[150px] p-[0.1875rem] bg-gray-500/40 dark:bg-gray-500/20 rounded-[12px] overflow-hidden shadow border-[1px] group relative",
+ "w-[260px] h-[150px] p-[0.1875rem] bg-gray-500/40 rounded-[12px] overflow-hidden shadow border-[1px] group relative",
"transition-all duration-300",
- media.isNew && "ring-2 ring-blue-300 dark:ring-blue-400 ring-opacity-75"
+ media.isNew && "ring-2 ring-blue-300 ring-opacity-75"
)}
>
<div
@@ -225,7 +225,7 @@ export default function () {
<Show
when={imageExists()}
fallback={
- <div class="pointer-events-none w-full h-full absolute inset-0 -z-10 bg-gray-400 dark:bg-gray-300" />
+ <div class="pointer-events-none w-full h-full absolute inset-0 -z-10 bg-gray-400" />
}
>
<img
@@ -246,9 +246,14 @@ export default function () {
progressState.mediaPath === media.path
}
>
- <div class="absolute inset-0 bg-gray-500/95 flex items-center justify-center z-[999999] pointer-events-auto">
+ <div
+ style={{
+ "background-color": "rgba(0, 0, 0, 0.85)",
+ }}
+ class="absolute inset-0 flex items-center justify-center z-[999999] pointer-events-auto"
+ >
<div class="w-[80%] text-center">
- <h3 class="text-sm font-medium mb-3 text-gray-50">
+ <h3 class="text-sm font-medium mb-3 text-gray-50 dark:text-gray-500">
<Switch>
<Match
when={
@@ -257,7 +262,7 @@ export default function () {
}
>
{(state) => (
- <h3 class="text-sm font-medium mb-3 text-gray-50">
+ <h3 class="text-sm font-medium mb-3 text-gray-50 dark:text-gray-500">
{isRecording
? state().stage === "rendering"
? "Rendering video"
@@ -273,7 +278,7 @@ export default function () {
}
>
{(state) => (
- <h3 class="text-sm font-medium mb-3 text-gray-50">
+ <h3 class="text-sm font-medium mb-3 text-gray-50 dark:text-gray-500">
{isRecording
? state().stage === "rendering"
? "Rendering video"
@@ -289,7 +294,7 @@ export default function () {
}
>
{(state) => (
- <h3 class="text-sm font-medium mb-3 text-gray-50">
+ <h3 class="text-sm font-medium mb-3 text-gray-50 dark:text-gray-500">
{state().stage === "rendering"
? "Rendering video"
: "Creating shareable link"}
@@ -301,7 +306,7 @@ export default function () {
<div class="w-full bg-gray-200/20 rounded-full h-2.5 mb-2">
<div
- class="bg-blue-300 h-2.5 rounded-full transition-all duration-200"
+ class="bg-blue-300 text-gray-50 dark:text-gray-500 h-2.5 rounded-full transition-all duration-200"
style={{
width: `${(() => {
if (
@@ -341,7 +346,7 @@ export default function () {
/>
</div>
- <p class="text-xs text-gray-50 mt-2">
+ <p class="text-xs text-gray-50 dark:text-gray-500 mt-2">
{"message" in progressState
? progressState.message
: undefined}
@@ -351,12 +356,15 @@ export default function () {
</Show>
<div
+ style={{
+ "background-color": "rgba(0, 0, 0, 0.4)",
+ }}
class={cx(
"w-full h-full absolute inset-0 transition-all duration-150 pointer-events-auto",
isLoading() || showUpgradeTooltip()
? "opacity-100"
: "opacity-0 group-hover:opacity-100",
- "backdrop-blur bg-gray-500/80 text-white p-2"
+ "backdrop-blur text-white p-2"
)}
>
<TooltipIconButton
@@ -490,7 +498,7 @@ export default function () {
</TooltipIconButton>
<div class="absolute inset-0 flex items-center justify-center">
<Button
- variant="secondary"
+ variant="white"
size="sm"
onClick={() => save.mutate()}
disabled={copy.isPending || upload.isPending}
@@ -517,7 +525,7 @@ export default function () {
<div
style={{ color: "white", "font-size": "14px" }}
class={cx(
- "absolute bottom-0 left-0 right-0 font-medium bg-gray-500 bg-opacity-40 backdrop-blur p-2 flex justify-between items-center pointer-events-none transition-all",
+ "absolute bottom-0 left-0 right-0 font-medium bg-gray-500 dark:bg-gray-50 bg-opacity-40 backdrop-blur p-2 flex justify-between items-center pointer-events-none transition-all",
isLoading() || showUpgradeTooltip()
? "opacity-0"
: "group-hover:opacity-0"
@@ -553,7 +561,7 @@ const IconButton = (props: ComponentProps<"button">) => {
{...props}
type="button"
class={cx(
- "p-[0.325rem] bg-gray-100 rounded-full text-neutral-300 text-[12px] shadow-[0px 2px 4px rgba(18, 22, 31, 0.12)]",
+ "p-[0.325rem] bg-gray-50 dark:bg-gray-500 rounded-full text-[12px] shadow-[0px 2px 4px rgba(18, 22, 31, 0.12)]",
props.class
)}
/>
@@ -587,10 +595,10 @@ const TooltipIconButton = (
</Tooltip.Trigger>
<Tooltip.Portal>
<Tooltip.Content
- class="p-2 font-medium"
+ class="py-1.5 px-2 font-medium"
style={{
- "background-color": "rgba(255, 255, 255, 0.1)",
- color: "white",
+ "background-color": "rgba(255, 255, 255, 0.85)",
+ color: "black",
"border-radius": "8px",
"font-size": "12px",
"z-index": "15",
diff --git a/packages/ui-solid/src/Button.tsx b/packages/ui-solid/src/Button.tsx
index 26a94efa9..1e7f4d962 100644
--- a/packages/ui-solid/src/Button.tsx
+++ b/packages/ui-solid/src/Button.tsx
@@ -11,11 +11,13 @@ const styles = cva(
variants: {
variant: {
primary:
- "bg-blue-300 text-gray-50 dark:text-white hover:bg-blue-400 disabled:bg-blue-200 outline-blue-300",
+ "bg-blue-300 text-gray-50 dark:text-gray-500 hover:bg-blue-400 disabled:bg-blue-200 outline-blue-300",
secondary:
"bg-gray-200 text-gray-500 hover:bg-gray-300 disabled:bg-gray-200 disabled:text-gray-400 outline-blue-300",
destructive:
"bg-red-300 text-gray-50 dark:text-white hover:bg-red-400 disabled:bg-red-200 outline-red-300",
+ white:
+ "bg-gray-50 dark:bg-gray-500 text-gray-500 dark:text-gray-50 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-400 outline-blue-300",
},
size: {
xs: "font-[400] text-[0.75rem] px-[0.5rem] h-[1.25rem] ",