Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat: Get ready for launch

Richie McIlroy1e082e5906de
diff --git a/Cargo.lock b/Cargo.lock
index a1383c15f..c0eca7830 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1421,7 +1421,6 @@ dependencies = [
"core-graphics 0.24.0",
"cpal",
"device_query",
- "dispatch",
"dotenvy_macro",
"fast_image_resize",
"ffmpeg-next",
diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml
index d83634db5..7a58351d6 100644
--- a/apps/desktop/src-tauri/Cargo.toml
+++ b/apps/desktop/src-tauri/Cargo.toml
@@ -67,6 +67,7 @@ chrono = "0.4.38"
rodio = "0.19.0"
fast_image_resize = "4.2.1"
png = "0.17.13"
+device_query = "2.1.0"
cap-utils = { path = "../../../crates/utils" }
cap-project = { path = "../../../crates/project" }
diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.ts
index 6d198ed75..72c8c4274 100644
--- a/apps/desktop/src/utils/tauri.ts
+++ b/apps/desktop/src/utils/tauri.ts
@@ -40,6 +40,14 @@ async stopRecording() : Promise<Result<null, string>> {
else return { status: "error", error: e as any };
}
},
+async takeScreenshot() : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("take_screenshot") };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
async listCameras() : Promise<string[]> {
return await TAURI_INVOKE("list_cameras");
},
@@ -114,6 +122,22 @@ async copyRenderedVideoToClipboard(videoId: string, project: ProjectConfiguratio
else return { status: "error", error: e as any };
}
},
+async copyScreenshotToClipboard(path: string) : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("copy_screenshot_to_clipboard", { path }) };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
+async openFilePath(path: string) : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("open_file_path", { path }) };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
async getVideoMetadata(videoId: string, videoType: VideoType | null) : Promise<Result<[number, number], string>> {
try {
return { status: "ok", data: await TAURI_INVOKE("get_video_metadata", { videoId, videoType }) };
@@ -168,8 +192,16 @@ async uploadRenderedVideo(videoId: string, project: ProjectConfiguration) : Prom
else return { status: "error", error: e as any };
}
},
-async getRecordingMeta(id: string) : Promise<RecordingMeta> {
- return await TAURI_INVOKE("get_recording_meta", { id });
+async uploadScreenshot(screenshotPath: string) : Promise<Result<string, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("upload_screenshot", { screenshotPath }) };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
+async getRecordingMeta(id: string, fileType: string) : Promise<RecordingMeta> {
+ return await TAURI_INVOKE("get_recording_meta", { id, fileType });
},
async openFeedbackWindow() : Promise<void> {
await TAURI_INVOKE("open_feedback_window");
@@ -180,6 +212,14 @@ async openSettingsWindow() : Promise<void> {
async openChangelogWindow() : Promise<void> {
await TAURI_INVOKE("open_changelog_window");
},
+async saveFileDialog(fileName: string, fileType: string) : Promise<Result<string | null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("save_file_dialog", { fileName, fileType }) };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
async setHotkey(action: HotkeyAction, hotkey: Hotkey | null) : Promise<Result<null, null>> {
try {
return { status: "ok", data: await TAURI_INVOKE("set_hotkey", { action, hotkey }) };
@@ -197,11 +237,13 @@ export const events = __makeEvents__<{
currentRecordingChanged: CurrentRecordingChanged,
editorStateChanged: EditorStateChanged,
newRecordingAdded: NewRecordingAdded,
+newScreenshotAdded: NewScreenshotAdded,
recordingMetaChanged: RecordingMetaChanged,
recordingOptionsChanged: RecordingOptionsChanged,
recordingStarted: RecordingStarted,
recordingStopped: RecordingStopped,
renderFrameEvent: RenderFrameEvent,
+requestNewScreenshot: RequestNewScreenshot,
requestStartRecording: RequestStartRecording,
requestStopRecording: RequestStopRecording,
showCapturesPanel: ShowCapturesPanel
@@ -209,11 +251,13 @@ showCapturesPanel: ShowCapturesPanel
currentRecordingChanged: "current-recording-changed",
editorStateChanged: "editor-state-changed",
newRecordingAdded: "new-recording-added",
+newScreenshotAdded: "new-screenshot-added",
recordingMetaChanged: "recording-meta-changed",
recordingOptionsChanged: "recording-options-changed",
recordingStarted: "recording-started",
recordingStopped: "recording-stopped",
renderFrameEvent: "render-frame-event",
+requestNewScreenshot: "request-new-screenshot",
requestStartRecording: "request-start-recording",
requestStopRecording: "request-stop-recording",
showCapturesPanel: "show-captures-panel"
@@ -254,6 +298,7 @@ export type HotkeysStore = { hotkeys: { [key in HotkeyAction]: Hotkey } }
export type InProgressRecording = { recordingDir: string; displaySource: DisplaySource }
export type JsonValue<T> = [T]
export type NewRecordingAdded = { path: string }
+export type NewScreenshotAdded = { path: string }
export type OSPermission = "screenRecording" | "camera" | "microphone" | "accessibility"
export type OSPermissionStatus = "notNeeded" | "empty" | "granted" | "denied"
export type OSPermissionsCheck = { screenRecording: OSPermissionStatus; microphone: OSPermissionStatus; camera: OSPermissionStatus; accessibility: OSPermissionStatus }
@@ -267,6 +312,7 @@ export type RecordingStarted = null
export type RecordingStopped = { path: string }
export type RenderFrameEvent = { frame_number: number; project: ProjectConfiguration }
export type RenderProgress = { type: "Starting"; total_frames: number } | { type: "EstimatedTotalFrames"; total_frames: number } | { type: "FrameRendered"; current_frame: number }
+export type RequestNewScreenshot = null
export type RequestStartRecording = null
export type RequestStopRecording = null
export type SerializedEditorInstance = { framesSocketUrl: string; recordingDuration: number; savedProjectConfig: ProjectConfiguration | null; recordings: ProjectRecordings; path: string }
diff --git a/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx b/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx
index 6f5c79a5e..25f7b30b2 100644
--- a/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx
+++ b/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx
@@ -6,7 +6,7 @@ import { AdminNavItems } from "./AdminNavItems";
export const AdminDesktopNav = () => {
return (
<>
- <div className="hidden lg:flex lg:flex-shrink-0 bg-gray-50 group h-full">
+ <div className="hidden lg:flex lg:flex-shrink-0 group h-full">
<div className="flex flex-col w-64">
<div className="flex flex-col flex-grow pt-8 pb-4 overflow-y-auto h-full">
<div className="flex flex-col justify-top items-start flex-shrink-0 px-4 h-full">
diff --git a/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx b/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx
index 79fc82734..e23f720a5 100644
--- a/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx
+++ b/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx
@@ -31,11 +31,10 @@ import {
import { NewSpace } from "@/components/forms/NewSpace";
import { signOut } from "next-auth/react";
import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayout";
-import { Button } from "@cap/ui";
+import { UsageButton } from "@/components/UsageButton";
export const AdminNavItems = () => {
const pathname = usePathname();
- const router = useRouter();
const [open, setOpen] = useState(false);
const { spaceData, activeSpace } = useSharedContext();
@@ -47,7 +46,7 @@ export const AdminNavItems = () => {
subNav: [],
},
{
- name: "Download macOS App",
+ name: "Download App",
href: `/download`,
icon: Download,
subNav: [],
@@ -64,28 +63,27 @@ export const AdminNavItems = () => {
];
const navItemClass =
- "flex items-center justify-start p-2 rounded-lg outline-none tracking-tight w-full";
+ "flex items-center justify-start py-2 px-4 rounded-full outline-none tracking-tight w-full";
return (
<Dialog>
- <div className="embossed mt-8 mb-4 w-full max-w-full">
+ <div className="w-full py-3 my-4 border-b-2 border-t-2 border-gray-300 border-dotted">
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<div
- className="flex items-center justify-between py-2 px-4 cursor-pointer"
+ className="flex items-center justify-between cursor-pointer"
role="combobox"
aria-expanded={open}
>
<div className="flex items-center w-full text-left">
<div>
- <p className="text-sm">Spaces</p>
- <p className="font-medium text-sm">
+ <p className="text-[0.875rem]">
{activeSpace?.name ?? "No space found"}
</p>
</div>
</div>
<div>
- <ChevronDown className="w-[20px] h-auto" />
+ <ChevronDown className="w-[20px] h-auto text-gray-400" />
</div>
</div>
</PopoverTrigger>
@@ -108,9 +106,9 @@ export const AdminNavItems = () => {
</CommandItem>
))}
<DialogTrigger className="w-full">
- <CommandItem className="bg-filler aria-selected:bg-filler-2 rounded-lg">
+ <CommandItem className=" bg-filler aria-selected:bg-gray-200 rounded-lg">
<Plus className="w-4 h-auto mr-1" />
- <span>Add new space</span>
+ <span className="text-[0.875rem]">Add new space</span>
</CommandItem>
</DialogTrigger>
</CommandGroup>
@@ -124,24 +122,26 @@ export const AdminNavItems = () => {
>
<div className="space-y-1">
{manageNavigation.map((item) => (
- <div>
+ <div key={item.name}>
<Link
passHref
prefetch={false}
- key={item.name + "-main"}
href={item.href}
className={classNames(
pathname.includes(item.href)
- ? "bg-gray-200 font-medium"
- : "opacity-75 hover:opacity-100",
+ ? "bg-white text-black border-[1px] border-gray-200"
+ : "opacity-50 hover:opacity-75",
navItemClass
)}
>
<item.icon
- className="flex-shrink-0 w-6 h-6 stroke-[1.8px]"
+ className={classNames(
+ "flex-shrink-0 w-6 h-6 stroke-[1.8px]",
+ pathname.includes(item.href) ? "text-black" : ""
+ )}
aria-hidden="true"
/>
- <span className="text-base ml-2.5">{item.name}</span>
+ <span className="text-base ml-2.5 text-black">{item.name}</span>
</Link>
{pathname.includes(item.href) && item.subNav.length > 0 && (
<div className="mt-1 space-y-1 flex-grow w-full">
@@ -153,8 +153,8 @@ export const AdminNavItems = () => {
href={subItem.href}
className={classNames(
pathname === subItem.href
- ? "font-medium"
- : "opacity-75 hover:opacity-100",
+ ? "bg-white text-black border-[1px] border-gray-200"
+ : "opacity-50 hover:opacity-75",
navItemClass
)}
>
@@ -168,9 +168,12 @@ export const AdminNavItems = () => {
))}
</div>
<div className="mt-auto">
+ <div className="w-full mb-3 pb-5 border-b-2 border-gray-200 border-dotted">
+ <UsageButton />
+ </div>
<button
onClick={() => signOut()}
- className={classNames("hover:opacity-75", navItemClass)}
+ className={classNames("opacity-75 hover:opacity-100", navItemClass)}
>
<LogOut className="flex-shrink-0 w-6 h-6" aria-hidden="true" />
<span className="text-base ml-2.5">Sign out</span>
diff --git a/apps/web/app/dashboard/_components/DynamicSharedLayout.tsx b/apps/web/app/dashboard/_components/DynamicSharedLayout.tsx
index 8b46896ff..7f42eab3b 100644
--- a/apps/web/app/dashboard/_components/DynamicSharedLayout.tsx
+++ b/apps/web/app/dashboard/_components/DynamicSharedLayout.tsx
@@ -40,7 +40,7 @@ export default function DynamicSharedLayout({
<AdminDesktopNav />
<div className="flex-1 overflow-auto focus:outline-none">
<AdminMobileNav />
- <div className="py-3 -mb-3 flex items-center justify-end wrapper space-x-3">
+ {/* <div className="py-3 -mb-3 flex items-center justify-end wrapper space-x-3">
<div>
<UsageButton />
</div>
@@ -76,14 +76,14 @@ export default function DynamicSharedLayout({
user?.stripeSubscriptionStatus as string,
}) ? (
<Link
- className="w-full text-primary font-medium"
+ className="w-full text-blue-500 font-medium text-base"
href="/dashboard/settings/billing"
>
Cap Pro
</Link>
) : (
<Link
- className="w-full text-primary font-medium"
+ className="w-full text-blue-500 font-medium text-base"
href="/pricing"
>
Upgrade to Cap Pro
@@ -92,14 +92,14 @@ export default function DynamicSharedLayout({
</div>
</DropdownMenuItem>
<DropdownMenuItem>
- <Link className="w-full" href="/dashboard/settings">
+ <Link className="w-full text-base" href="/dashboard/settings">
Settings
</Link>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>
<Link
- className="w-full"
+ className="w-full text-base"
href="https://discord.gg/y8gdQ3WRN3"
target="_blank"
>
@@ -107,24 +107,27 @@ export default function DynamicSharedLayout({
</Link>
</DropdownMenuItem>
<DropdownMenuItem>
- <Link className="w-full" href="/download">
+ <Link className="w-full text-base" href="/download">
Download Mac App
</Link>
</DropdownMenuItem>
<DropdownMenuItem>
- <Link className="w-full" href="/record">
+ <Link className="w-full text-base" href="/record">
Record a Video
</Link>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>
- <button className="w-full" onClick={() => signOut()}>
+ <button
+ className="w-full text-base hover:text-black"
+ onClick={() => signOut()}
+ >
Sign out
</button>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
- </div>
+ </div> */}
<main className="min-h-screen w-full">{children}</main>
</div>
diff --git a/apps/web/app/dashboard/caps/Caps.tsx b/apps/web/app/dashboard/caps/Caps.tsx
index 5f2579c80..f4471dcfd 100644
--- a/apps/web/app/dashboard/caps/Caps.tsx
+++ b/apps/web/app/dashboard/caps/Caps.tsx
@@ -173,7 +173,7 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
return (
<div>
{data.length === 0 ? (
- <div className="min-h-full h-full flex flex-col items-center justify-center">
+ <div className="inner min-h-full h-full flex flex-col items-center justify-center">
<div className="w-full max-w-md mx-auto">
<img
className="w-full h-auto"
@@ -201,11 +201,11 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
</div>
</div>
) : (
- <div className="space-y-8">
- <div>
- <h1 className="text-3xl font-semibold mb-1">My Caps</h1>
+ <div>
+ <div className="mb-3">
+ <h1 className="text-3xl font-medium">My Caps</h1>
</div>
- <div className="grid grid-cols-2 xl:grid-cols-3 gap-6">
+ <div className="inner grid grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-4">
{data.map((cap, index) => {
const videoAnalytics = analytics[cap.id];
const displayCount =
@@ -216,7 +216,8 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
return (
<div
key={index}
- className="rounded-xl border border-filler relative"
+ className="rounded-xl border-[1px] border-gray-200 relative"
+ style={{ boxShadow: "0px 8px 16px rgba(18, 22, 31, 0.04)" }}
>
<div className="absolute top-2 right-2 space-y-2 z-20">
<button
@@ -243,7 +244,7 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
<LinkIcon className="w-4 h-4" />
<Tooltip id={cap.id + "_copy"} />
</button>
- <button
+ {/* <button
type="button"
className="cursor-pointer border border-gray-300 relative bg-white hover:bg-gray-200 w-8 h-8 m-0 p-0 rounded-full flex items-center justify-center transition-all"
onClick={async () => {
@@ -287,7 +288,7 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
<Tooltip id={cap.id + "_download"} />
</>
)}
- </button>
+ </button> */}
<button
type="button"
className="cursor-pointer border border-gray-300 relative bg-white hover:bg-gray-200 w-8 h-8 m-0 p-0 rounded-full flex items-center justify-center transition-all"
@@ -334,11 +335,11 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
handleTitleKeyDown({ key: e.key, id: cap.id });
}}
autoFocus
- className="font-medium box-border"
+ className="text-[0.875rem] leading-[1.25rem] text-gray-500 font-medium box-border"
/>
) : (
<p
- className="font-medium"
+ className="text-[0.875rem] leading-[1.25rem] text-gray-500 font-medium"
onClick={() => {
if (
user !== null &&
@@ -353,7 +354,7 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
)}
<p>
<span
- className="text-sm text-gray-400"
+ className="text-[0.875rem] leading-[1.25rem] text-gray-400"
data-tooltip-id={cap.id + "_createdAt"}
data-tooltip-content={`Cap created at ${cap.createdAt}`}
>
@@ -367,8 +368,8 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
data-tooltip-id={cap.id + "_analytics"}
data-tooltip-content={`${displayCount} unique views via your shareable Cap.link.`}
>
- <EyeIcon className="w-4 h-4 mr-1" />
- <span className="text-gray-600">
+ <EyeIcon className="w-4 h-4 mr-1 text-gray-400" />
+ <span className="text-[0.875rem] leading-[1.25rem] text-gray-400">
{displayCount ?? "-"}
</span>
<Tooltip id={cap.id + "_analytics"} />
@@ -378,8 +379,8 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
data-tooltip-id={cap.id + "_comments"}
data-tooltip-content={`${cap.totalComments} comments`}
>
- <MessageSquareIcon className="w-4 h-4 mr-1" />
- <span className="text-gray-600">
+ <MessageSquareIcon className="w-4 h-4 mr-1 text-gray-400" />
+ <span className="text-[0.875rem] leading-[1.25rem] text-gray-400">
{cap.totalComments}
</span>
<Tooltip id={cap.id + "_comments"} />
@@ -389,8 +390,8 @@ export const Caps = ({ data, count }: { data: videoData; count: number }) => {
data-tooltip-id={cap.id + "_reactions"}
data-tooltip-content={`${cap.totalReactions} reactions`}
>
- <SmileIcon className="w-4 h-4 mr-1" />
- <span className="text-gray-600">
+ <SmileIcon className="w-4 h-4 mr-1 text-gray-400" />
+ <span className="text-[0.875rem] leading-[1.25rem] text-gray-400">
{cap.totalReactions}
</span>
<Tooltip id={cap.id + "_reactions"} />
diff --git a/apps/web/app/dashboard/settings/Settings.tsx b/apps/web/app/dashboard/settings/Settings.tsx
index 34558513e..c57db3309 100644
--- a/apps/web/app/dashboard/settings/Settings.tsx
+++ b/apps/web/app/dashboard/settings/Settings.tsx
@@ -103,7 +103,7 @@ export const Settings = ({
</div>
</CardContent>
<CardFooter className="border-t px-6 py-4">
- <Button type="submit" size="default">
+ <Button type="submit" size="md" variant="gray">
Save
</Button>
</CardFooter>
diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css
index 136ce686c..a6813d281 100644
--- a/apps/web/app/globals.css
+++ b/apps/web/app/globals.css
@@ -145,15 +145,15 @@ h2,
h3,
h4,
h5 {
- @apply font-normal tracking-tighter text-[1.75rem] leading-[2.5rem] md:text-[2.5rem] md:leading-[3.25rem] !important;
+ @apply font-normal tracking-tighter text-[1.75rem] leading-[2.5rem] md:text-[2.5rem] md:leading-[3.25rem];
}
a,
p,
span,
input,
-label {
- @apply tracking-tight text-gray-400 font-normal text-[1.125rem] leading-[1.75rem];
+label, button {
+ @apply tracking-tight text-gray-400 font-normal text-[1rem] leading-[1.5rem];
}
a,
@@ -294,7 +294,15 @@ ul {
}
.dashboard-page {
- @apply py-8 mx-auto w-11/12 clear-both max-w-screen-xl flex flex-col;
+ @apply flex flex-col py-4 px-2;
+}
+
+.dashboard-page .inner {
+ @apply bg-white rounded-[20px] p-[12px] border-[1px] border-gray-200;
+}
+
+.dashboard-page .inner {
+ box-shadow: 0px 8px 16px rgba(18, 22, 31, 0.04);
}
.dashboard-header {
@@ -305,8 +313,8 @@ ul {
@apply pb-4 border-b border-filler;
}
-.dashboard-header h1 {
- @apply text-3xl;
+.dashboard-page h1, .dashboard-page h2, .dashboard-page h3, .dashboard-page h4, .dashboard-page h5 {
+ @apply text-[1rem] font-medium leading-[1.25rem] text-gray-500 !important;
}
.dashboard-header p {
@@ -318,6 +326,10 @@ slot:not(.dashboard-layout slot) {
display: block;
}
+.dashboard-layout {
+ @apply bg-gray-100
+}
+
#scrolling-section slot {
display: block;
}
@@ -365,7 +377,7 @@ footer ul {
}
footer h3 {
- @apply text-xl font-semibold;
+ @apply text-xl font-semibold !important;
}
footer a {
diff --git a/apps/web/components/Navbar.tsx b/apps/web/components/Navbar.tsx
index a24aa140c..362b0f104 100644
--- a/apps/web/components/Navbar.tsx
+++ b/apps/web/components/Navbar.tsx
@@ -156,12 +156,11 @@ export const Navbar = ({ auth }: { auth: boolean }) => {
</NavigationMenuItem>
<NavigationMenuItem>
<Button
- className={auth === false ? "min-w-[155px]" : ""}
- href={auth === false ? "/login" : "/dashboard"}
+ href={auth === false ? "/download" : "/dashboard"}
size="sm"
variant="secondary"
>
- {auth === false ? "Get Started for Free" : "Dashboard"}
+ {auth === false ? "Download App" : "Dashboard"}
</Button>
</NavigationMenuItem>
<NavigationMenuItem className="pl-3">
@@ -174,7 +173,9 @@ export const Navbar = ({ auth }: { auth: boolean }) => {
<svg
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
- className="w-7 h-7 text-white"
+ className={`w-7 h-7 ${
+ isHomePage ? "text-white" : "text-black"
+ }`}
viewBox="0 0 24 24"
>
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path>
@@ -226,7 +227,7 @@ export const Navbar = ({ auth }: { auth: boolean }) => {
onClick={() => {
setShowMobileMenu(false);
}}
- href="/login"
+ href="/pricing"
passHref
>
Get started
@@ -270,10 +271,10 @@ export const Navbar = ({ auth }: { auth: boolean }) => {
</li>
<li>
<Button
- href={auth === false ? "/login" : "/dashboard"}
+ href={auth === false ? "/download" : "/dashboard"}
size="lg"
>
- {auth === false ? "Get started for free" : "Dashboard"}
+ {auth === false ? "Download App" : "Dashboard"}
</Button>
</li>
</ul>
diff --git a/apps/web/components/UsageButton.tsx b/apps/web/components/UsageButton.tsx
index d1dd44689..adc7e4cf5 100644
--- a/apps/web/components/UsageButton.tsx
+++ b/apps/web/components/UsageButton.tsx
@@ -23,11 +23,11 @@ export const UsageButton = () => {
});
}, []);
- const progress = (usage.videoCount / usage.videoLimit) * 100;
+ const progress = (3 / usage.videoLimit) * 100;
if (usage.loading === true) {
return (
- <div className="w-[130px] h-12 bg-gray-200 rounded-xl py-2 px-4 animate-pulse"></div>
+ <div className="w-full h-12 bg-gray-200 rounded-xl py-2 px-4 animate-pulse"></div>
);
}
@@ -39,18 +39,27 @@ export const UsageButton = () => {
: "/dashboard/settings/billing"
}
>
- <div className="w-[130px] flex flex-col items-center justify-center h-12 bg-tertiary-3 rounded-xl py-2 px-4 hover:bg-tertiary transition-all">
+ <div className="w-full flex flex-col items-start justify-center bg-white border border-gray-200 rounded-xl py-2 px-4 hover:border-blue-500 transition-all">
{usage.subscription === false ? (
<>
- <div className="mb-1 text-primary font-medium tracking-tighter">
- {usage.videoCount}/{usage.videoLimit} caps
+ <div className="mb-1 font-medium text-gray-500 text-[0.875rem]">
+ {3}/{usage.videoLimit} Caps
</div>
- <div className="h-[7px] max-w-[100px] w-full bg-white rounded-xl overflow-hidden">
+ <div className="h-[10px] w-full bg-gray-200 rounded-xl overflow-hidden">
<div
- className="h-[7px] bg-primary"
+ className="h-[10px] bg-blue-500"
style={{ width: `${progress}%` }}
></div>
</div>
+ <div className="w-full mt-4 pt-2 border-t border-gray-200">
+ <span className="text-sm">
+ Upgrade to{" "}
+ <span className="bg-blue-500 text-sm text-white py-1 px-1.5 rounded-[8px]">
+ Pro
+ </span>{" "}
+ plan
+ </span>
+ </div>
</>
) : (
<div className="text-primary font-medium tracking-tighter">
diff --git a/apps/web/components/pages/DownloadPage.tsx b/apps/web/components/pages/DownloadPage.tsx
index 053e00a80..51b8eaffd 100644
--- a/apps/web/components/pages/DownloadPage.tsx
+++ b/apps/web/components/pages/DownloadPage.tsx
@@ -5,6 +5,7 @@ import { useState } from "react";
export const DownloadPage = () => {
const [loading, setLoading] = useState(false);
+ const [showOtherOptions, setShowOtherOptions] = useState(false);
const releaseFetch = async () => {
setLoading(true);
@@ -26,18 +27,33 @@ export const DownloadPage = () => {
The quickest way to share your screen. Pin to your dock and record in
seconds.
</p>
- <div className="fade-in-up animate-delay-2">
+ <div className="flex items-center justify-center space-x-2 fade-in-up animate-delay-2">
<Button
spinner={loading}
- onClick={async () => await releaseFetch()}
- className="mb-3"
+ size="lg"
+ href="https://cdn.crabnebula.app/download/cap/cap/latest/platform/dmg-aarch64"
+ className=" mx-auto"
>
- Download
+ Download for Apple Silicon
</Button>
- <p className="text-xs text-gray-500">
- Supports both Apple Sillicon & Intel based Macs
- </p>
+ {showOtherOptions && (
+ <Button
+ size="lg"
+ href="https://cdn.crabnebula.app/download/cap/cap/latest/platform/dmg-x86_64"
+ className=" mx-auto"
+ >
+ Download for Intel
+ </Button>
+ )}
</div>
+ {!showOtherOptions && (
+ <button
+ onClick={() => setShowOtherOptions(true)}
+ className="mt-2 underline text-sm text-gray-400 fade-in-up animate-delay-2"
+ >
+ See other options
+ </button>
+ )}
</div>
</div>
);
diff --git a/apps/web/components/pages/HomePage.tsx b/apps/web/components/pages/HomePage.tsx
index 99763dad9..e99247af2 100644
--- a/apps/web/components/pages/HomePage.tsx
+++ b/apps/web/components/pages/HomePage.tsx
@@ -63,11 +63,11 @@ export const HomePage = () => {
return (
<ParallaxProvider>
- <div className="-mt-[80px] custom-bg md:min-h-[calc(100vh+20px)] relative flex items-center">
+ <div className="-mt-[80px] custom-bg min-h-screen md:min-h-[calc(100vh+20px)] relative flex items-center">
<div className="w-full relative z-10 flex">
<div className="wrapper wrapper-sm mx-auto">
- <div className="mb-auto text-center md:px-4 pt-40 pb-52 md:pb-64 -mt-40">
- <Link
+ <div className="mb-auto text-center px-4 pt-40 pb-52 md:pb-64 -mt-40">
+ {/* <Link
href="/updates/cap-public-beta-launch"
target="_blank"
className="mx-auto mb-4 inline-flex justify-center font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 bg-blue-400 hover:bg-blue-500 h-9 px-4 py-2 rounded-full space-x-2 items-center"
@@ -87,9 +87,9 @@ export const HomePage = () => {
d="M8.783 6.667H.667V5.333h8.116L5.05 1.6 6 .667 11.333 6 6 11.333l-.95-.933 3.733-3.733Z"
/>
</svg>
- </Link>
+ </Link> */}
- <h1 className="fade-in-down text-[2.5rem] leading-[3rem] md:text-[3.75rem] md:leading-[4rem] relative z-10 text-white mb-4">
+ <h1 className="fade-in-down text-[2rem] leading-[2.5rem] md:text-[3.75rem] md:leading-[4rem] relative z-10 text-white mb-4">
Beautiful, shareable screen recordings.
</h1>
<p className="fade-in-down animate-delay-1 text-base sm:text-xl max-w-2xl mx-auto text-white mb-8">
@@ -97,11 +97,21 @@ export const HomePage = () => {
powerful, and stunning. Record and share in seconds.
</p>
<div className="fade-in-up animate-delay-2">
- <div className="flex items-center justify-center space-x-2 mb-3">
- <Button variant="white" href="/login" size="lg">
+ <div className="flex flex-col sm:flex-row items-center justify-center space-y-2 sm:space-y-0 sm:space-x-2 mb-3">
+ <Button
+ variant="white"
+ href="/pricing"
+ size="lg"
+ className="w-full sm:w-auto"
+ >
Get Started
</Button>
- <Button variant="secondary" href="/download" size="lg">
+ <Button
+ variant="secondary"
+ href="/download"
+ size="lg"
+ className="w-full sm:w-auto"
+ >
Download App
</Button>
</div>
diff --git a/apps/web/components/pages/PricingPage.tsx b/apps/web/components/pages/PricingPage.tsx
index f1ba0d3dd..63309de33 100644
--- a/apps/web/components/pages/PricingPage.tsx
+++ b/apps/web/components/pages/PricingPage.tsx
@@ -162,10 +162,10 @@ export const PricingPage = () => {
<div>
<div className="flex items-center space-x-3">
<h3 className="text-4xl text-white">
- {isAnnual ? "$59" : "$9"}
+ {isAnnual ? "$6/mo" : "$9/mo"}
</h3>
<div>
- <p className="text-sm text-white/80">
+ <p className="text-sm font-medium text-white/80">
{isAnnual
? "per user, billed annually."
: "per user, billed monthly."}
diff --git a/apps/web/components/templates/DashboardTemplate.tsx b/apps/web/components/templates/DashboardTemplate.tsx
index 8aa4a9e21..9e13e727b 100644
--- a/apps/web/components/templates/DashboardTemplate.tsx
+++ b/apps/web/components/templates/DashboardTemplate.tsx
@@ -11,16 +11,5 @@ export const DashboardTemplate = ({
button?: React.ReactNode;
children?: React.ReactNode;
}) => {
- return (
- <div className="dashboard-page">
- <div className={`dashboard-header ${title && " has-title"}`}>
- <div>
- {title && <h1>{title}</h1>}
- {description && <p>{description}</p>}
- </div>
- {button && <div>{button}</div>}
- </div>
- {children && children}
- </div>
- );
+ return <div className="dashboard-page">{children && children}</div>;
};
diff --git a/packages/ui/src/components/Button.tsx b/packages/ui/src/components/Button.tsx
index e1af05e53..9acbdf8af 100644
--- a/packages/ui/src/components/Button.tsx
+++ b/packages/ui/src/components/Button.tsx
@@ -20,6 +20,7 @@ const buttonVariants = cva(
"bg-red-300 text-gray-50 hover:bg-red-400 disabled:bg-red-200 border-red-300",
white:
"bg-white text-gray-500 hover:bg-gray-100 disabled:bg-gray-100 border-black/10",
+ gray: "bg-gray-200 text-gray-500 hover:bg-gray-200 disabled:bg-gray-100 border-transparent",
},
size: {
xs: "font-[400] text-[0.75rem] px-[0.5rem] h-[1.25rem] ",
diff --git a/packages/ui/src/components/Card.tsx b/packages/ui/src/components/Card.tsx
index 116daa1e6..225d19d54 100644
--- a/packages/ui/src/components/Card.tsx
+++ b/packages/ui/src/components/Card.tsx
@@ -8,7 +8,7 @@ const Card = forwardRef<
<div
ref={ref}
className={classNames(
- !noStyle && "rounded-lg border bg-card text-card-foreground shadow-sm",
+ !noStyle && "rounded-lg border bg-white text-card-foreground shadow-sm",
className
)}
{...props}
@@ -47,7 +47,11 @@ const CardDescription = forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLParagraphElement>
>(({ className, ...props }, ref) => (
- <p ref={ref} className={classNames(className)} {...props} />
+ <p
+ ref={ref}
+ className={classNames("text-[0.875rem] leading-[1.25rem]", className)}
+ {...props}
+ />
));
CardDescription.displayName = "CardDescription";
diff --git a/packages/ui/src/components/Cmdk.tsx b/packages/ui/src/components/Cmdk.tsx
index 74f8d6961..90428911f 100644
--- a/packages/ui/src/components/Cmdk.tsx
+++ b/packages/ui/src/components/Cmdk.tsx
@@ -78,7 +78,7 @@ const CommandEmpty = React.forwardRef<
>((props, ref) => (
<CommandPrimitive.Empty
ref={ref}
- className="py-6 text-center text-sm"
+ className="py-6 text-center text-[0.875rem]"
{...props}
/>
));
@@ -120,7 +120,7 @@ const CommandItem = React.forwardRef<
<CommandPrimitive.Item
ref={ref}
className={classNames(
- "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-2.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
+ "relative flex cursor-pointer text-gray-400 select-none items-center rounded-sm px-2 py-2.5 text-[0.875rem] outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
)}
{...props}
diff --git a/packages/ui/src/components/LogoSpinner.tsx b/packages/ui/src/components/LogoSpinner.tsx
index 40b78d957..db120d54c 100644
--- a/packages/ui/src/components/LogoSpinner.tsx
+++ b/packages/ui/src/components/LogoSpinner.tsx
@@ -2,73 +2,39 @@ export const LogoSpinner = ({ className }: { className: string }) => {
return (
<svg
className={className}
- viewBox="0 0 269 269"
- fill="none"
xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ viewBox="0 0 40 40"
>
+ <rect
+ width="39.5"
+ height="39.5"
+ x="0.25"
+ y="0.25"
+ fill="#fff"
+ rx="7.75"
+ ></rect>
+ <rect
+ width="39.5"
+ height="39.5"
+ x="0.25"
+ y="0.25"
+ stroke="#E7EAF0"
+ strokeWidth="0.5"
+ rx="7.75"
+ ></rect>
<path
- d="M218.623 0H50C22.3858 0 0 22.3858 0 50V218.623C0 246.237 22.3858 268.623 50 268.623H218.623C246.237 268.623 268.623 246.237 268.623 218.623V50C268.623 22.3858 246.237 0 218.623 0Z"
- fill="url(#paint0_linear_275_61)"
- />
- <path
- d="M134.646 240.418C193.061 240.418 240.416 193.063 240.416 134.648C240.416 76.2328 193.061 28.8779 134.646 28.8779C76.2308 28.8779 28.876 76.2328 28.876 134.648C28.876 193.063 76.2308 240.418 134.646 240.418Z"
- fill="url(#paint1_radial_275_61)"
- />
+ fill="#4785FF"
+ d="M20 36c8.837 0 16-7.163 16-16 0-8.836-7.163-16-16-16-8.836 0-16 7.164-16 16 0 8.837 7.164 16 16 16z"
+ ></path>
<path
- d="M134.983 224.972C184.682 224.972 224.971 184.683 224.971 134.984C224.971 85.2844 184.682 44.9951 134.983 44.9951C85.2834 44.9951 44.9941 85.2844 44.9941 134.984C44.9941 184.683 85.2834 224.972 134.983 224.972Z"
- fill="url(#paint2_linear_275_61)"
- />
+ fill="#ADC9FF"
+ d="M20 33c7.18 0 13-5.82 13-13S27.18 7 20 7 7 12.82 7 20s5.82 13 13 13z"
+ ></path>
<path
- d="M134.983 202.81C172.443 202.81 202.811 172.442 202.811 134.982C202.811 97.5225 172.443 67.1553 134.983 67.1553C97.5235 67.1553 67.1562 97.5225 67.1562 134.982C67.1562 172.442 97.5235 202.81 134.983 202.81Z"
- fill="url(#paint3_radial_275_61)"
- />
- <defs>
- <linearGradient
- id="paint0_linear_275_61"
- x1="134.311"
- y1="0"
- x2="134.311"
- y2="268.623"
- gradientUnits="userSpaceOnUse"
- >
- <stop stopColor="#A8DBF8" />
- <stop offset="1" stopColor="#BCCBFF" />
- </linearGradient>
- <radialGradient
- id="paint1_radial_275_61"
- cx="0"
- cy="0"
- r="1"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(134.646 98.0059) rotate(107.38) scale(149.225 149.225)"
- >
- <stop offset="0.0625" stopColor="#84D3FF" />
- <stop offset="0.411458" stopColor="#17ABFE" />
- <stop offset="0.90625" stopColor="#0770D1" />
- </radialGradient>
- <linearGradient
- id="paint2_linear_275_61"
- x1="134.983"
- y1="44.9947"
- x2="134.983"
- y2="224.972"
- gradientUnits="userSpaceOnUse"
- >
- <stop stopColor="#BBE8FF" />
- <stop offset="1" stopColor="#018FEF" />
- </linearGradient>
- <radialGradient
- id="paint3_radial_275_61"
- cx="0"
- cy="0"
- r="1"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(145.222 134.982) rotate(98.5836) scale(68.5955 68.5955)"
- >
- <stop stopColor="#7EC3FF" />
- <stop offset="1" stopColor="#EAF5FF" />
- </radialGradient>
- </defs>
+ fill="#fff"
+ d="M20 30c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10z"
+ ></path>
</svg>
);
};
diff --git a/packages/ui/src/components/input/Input.tsx b/packages/ui/src/components/input/Input.tsx
index db3f2d90f..ccdf57dc9 100644
--- a/packages/ui/src/components/input/Input.tsx
+++ b/packages/ui/src/components/input/Input.tsx
@@ -11,7 +11,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={classNames(
- "flex h-11 w-full rounded-full border border-gray-400 focus:border-black px-3 h-10 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
+ "flex h-11 w-full max-w-[250px] rounded-[8px] border border-gray-200 focus:border-black px-3 h-10 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className
)}
ref={ref}
diff --git a/packages/utils/src/constants/plans.ts b/packages/utils/src/constants/plans.ts
index 0ff7ed12b..adbf6e23c 100644
--- a/packages/utils/src/constants/plans.ts
+++ b/packages/utils/src/constants/plans.ts
@@ -1,6 +1,6 @@
const planIds = {
development: {
- yearly: "price_1Q29oZFJxA1XpeSs3SRuHPrc",
+ yearly: "price_1Q3esrFJxA1XpeSsFwp486RN",
monthly: "price_1P9C1DFJxA1XpeSsTwwuddnq",
},
production: {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 25add1ed0..126eaed73 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -758,6 +758,9 @@ importers:
'@radix-ui/react-slot':
specifier: ^1.0.2
version: 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-switch':
+ specifier: ^1.1.0
'@tailwindcss/typography':
specifier: ^0.5.9
@@ -3154,6 +3157,19 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-OBzy5WAj641k0AOSpKQtreDMe+isX0MQJ1IVyF03ucdF3DunOnROVrjWs8zsXUxC3zfZ6JL9HFVCUlMghz9dJw==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==}
peerDependencies:
@@ -12876,6 +12892,21 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.9
+ dependencies:
+ '@radix-ui/primitive': 1.1.0
+ '@radix-ui/react-compose-refs': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-primitive': 2.0.0(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-use-controllable-state': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-previous': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-size': 1.1.0(@types/[email protected])([email protected])
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.9
+ '@types/react-dom': 18.3.0
+
dependencies:
'@babel/runtime': 7.25.6