Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
update workspace ui
ameer24681c5874e8d8a0
diff --git a/apps/web/app/dashboard/settings/Settings.tsx b/apps/web/app/dashboard/settings/Settings.tsxindex c2dcf3e14..269d838c1 100644--- a/apps/web/app/dashboard/settings/Settings.tsx+++ b/apps/web/app/dashboard/settings/Settings.tsx@@ -2,18 +2,15 @@import { users } from "@cap/database/schema";import {+ Button,Card,- CardContent,CardDescription,CardFooter,- CardHeader,CardTitle,- Button,Input,Label,} from "@cap/ui";import { useRouter } from "next/navigation";-import { useState } from "react";import toast from "react-hot-toast";export const Settings = ({@@ -56,14 +53,14 @@ export const Settings = ({return (<form onSubmit={handleSubmit}>- <CardContent>+ <Card><CardTitle>Your name</CardTitle><CardDescription>Changing your name below will update how your name appears whensharing a Cap, and in your profile.</CardDescription>- </CardContent>- <CardContent>+ </Card>+ <Card><div className="space-y-3"><div><Label htmlFor="firstName">First name</Label>@@ -84,14 +81,14 @@ export const Settings = ({/></div></div>- </CardContent>- <CardContent>+ </Card>+ <Card><CardTitle>Contact email address</CardTitle><CardDescription>This is the email address you used to sign up to Cap with.</CardDescription>- </CardContent>- <CardContent>+ </Card>+ <Card><div><Inputtype="email"@@ -101,8 +98,8 @@ export const Settings = ({disabled/></div>- </CardContent>- <CardFooter className="border-t px-6 py-4">+ </Card>+ <CardFooter className="px-6 py-4 border-t"><Button type="submit" size="sm" variant="gray">Save</Button>diff --git a/apps/web/app/dashboard/settings/workspace/Workspace.tsx b/apps/web/app/dashboard/settings/workspace/Workspace.tsxindex 01d515e9a..a1bf510e7 100644--- a/apps/web/app/dashboard/settings/workspace/Workspace.tsx+++ b/apps/web/app/dashboard/settings/workspace/Workspace.tsx@@ -8,7 +8,7 @@ import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayouimport { Tooltip } from "@/components/Tooltip";import {Button,- CardContent,+ Card,CardDescription,CardHeader,CardTitle,@@ -150,16 +150,16 @@ export const Workspace = () => {return (<form onSubmit={handleSubmit}>{isOwner === false && (- <CardContent>+ <Card><CardTitle>*Only the owner can make changes</CardTitle><CardDescription>Only the owner can make changes to this workspace.</CardDescription>- </CardContent>+ </Card>)}<div className="flex flex-col flex-1 gap-6 justify-center lg:flex-row">- <CardContent className="flex flex-col flex-1 gap-3 justify-center items-center">+ <Card className="flex flex-col flex-1 gap-3 justify-center items-center"><FontAwesomeIcon className="text-gray-400 size-5" icon={faChair} /><p>Seats Remaining@@ -167,8 +167,8 @@ export const Workspace = () => {{activeSpace?.inviteQuota ?? 1 - (activeSpace?.totalInvites ?? 1)}</span></p>- </CardContent>- <CardContent className="flex flex-col flex-1 gap-3 justify-center items-center">+ </Card>+ <Card className="flex flex-col flex-1 gap-3 justify-center items-center"><FontAwesomeIconclassName="text-gray-400 size-5"icon={faUserGroup}@@ -179,12 +179,12 @@ export const Workspace = () => {{activeSpace?.inviteQuota}</span></p>- </CardContent>+ </Card></div>- <div className="flex flex-col flex-1 gap-6 justify-center items-center mt-6 xl:flex-row">- <CardContent className="flex-1 w-full">- <div className="flex flex-col gap-6 justify-center items-center lg:flex-row">+ <div className="flex flex-col flex-1 gap-6 justify-center items-stretch mt-6 xl:flex-row">+ <Card className="flex flex-col flex-1 justify-between w-full">+ <div className="flex flex-col gap-6 justify-center lg:flex-row"><div className="flex-1 w-full"><div className="space-y-1"><Label htmlFor="workspaceName">Name</Label>@@ -228,7 +228,7 @@ export const Workspace = () => {</div></div><Button- className="mt-8"+ className="mt-8 w-fit"type="submit"size="sm"variant="dark"@@ -239,8 +239,8 @@ export const Workspace = () => {>Save</Button>- </CardContent>- <CardContent className="flex flex-col flex-1 gap-6 w-full lg:flex-row">+ </Card>+ <Card className="flex flex-col flex-1 gap-6 w-full lg:flex-row"><div className="flex-1"><div className="space-y-1"><Label htmlFor="customDomain">Custom Domain</Label>@@ -285,10 +285,10 @@ export const Workspace = () => {name="icon"/></div> */}- </CardContent>+ </Card></div>- <CardContent className="mt-6">+ <Card className="mt-6"><div className="flex flex-wrap gap-6 justify-between items-center w-full"><CardHeader><CardTitle>Members</CardTitle>@@ -391,8 +391,8 @@ export const Workspace = () => {))}</TableBody></Table>- </CardContent>- <CardContent className="flex flex-wrap gap-6 justify-between items-center mt-6 w-full">+ </Card>+ <Card className="flex flex-wrap gap-6 justify-between items-center mt-6 w-full"><CardHeader><CardTitle>View and manage your billing details</CardTitle><CardDescription>@@ -409,7 +409,7 @@ export const Workspace = () => {>{loading ? "Loading..." : "Manage Billing"}</Button>- </CardContent>+ </Card><Dialog open={isInviteDialogOpen} onOpenChange={setIsInviteDialogOpen}><DialogContent>diff --git a/apps/web/app/dashboard/settings/workspace/components/CustomDomain.tsx b/apps/web/app/dashboard/settings/workspace/components/CustomDomain.tsxindex 713091e3a..73bb2833b 100644--- a/apps/web/app/dashboard/settings/workspace/components/CustomDomain.tsx+++ b/apps/web/app/dashboard/settings/workspace/components/CustomDomain.tsx@@ -7,7 +7,9 @@ import { removeWorkspaceDomain } from "@/actions/workspace/remove-domain";import { updateDomain } from "@/actions/workspace/update-domain";import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayout";import { Button, Input } from "@cap/ui";-import { Check, CheckCircle, Copy, RefreshCw, XCircle } from "lucide-react";+import { faRefresh, faTrash } from "@fortawesome/free-solid-svg-icons";+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Check, CheckCircle, Copy, XCircle } from "lucide-react";import { useRouter } from "next/navigation";import { useEffect, useRef, useState } from "react";import { toast } from "react-hot-toast";@@ -275,7 +277,7 @@ export function CustomDomain() {return (<div className="space-y-6"><div>- <div className="flex flex-col items-start mt-2">+ <div className="flex flex-col justify-between items-start mt-2 h-full"><Inputtype="text"id="customDomain"@@ -285,51 +287,13 @@ export function CustomDomain() {disabled={loading}className="flex-1"/>- <Button- className="mt-8"- type="submit"- size="sm"- variant="dark"- onClick={handleSubmit}- disabled={loading}- >- {loading ? "Saving..." : "Save"}- </Button>- {activeSpace?.space.customDomain && (- <Button- type="button"- variant="secondary"- onClick={() => checkVerification(true)}- disabled={verifying}- className="w-[105px]"- >- {verifying ? (- <RefreshCw className="mr-2 w-6 h-6 animate-spin" />- ) : (- <RefreshCw className="mr-2 w-6 h-6" />- )}- Refresh- </Button>- )}- {activeSpace?.space.customDomain && (- <Button- type="button"- variant="destructive"- onClick={handleRemoveDomain}- disabled={loading}- >- Remove- </Button>- )}- </div>- {activeSpace?.space.customDomain && (- <div className="mt-4 space-y-4">- <div className="flex gap-2 items-center">- {isVerified ? (+ <div className="flex gap-2 justify-between items-center mt-4">+ {activeSpace?.space.customDomain &&+ (isVerified ? (<>- <div className="flex items-center gap-1.5 text-green-500 bg-green-100 px-2.5 py-1.5 rounded-md text-sm">- <CheckCircle className="w-4 h-4" />- <span className="text-sm font-medium text-green-500">+ <div className="flex items-center gap-1.5 text-green-500 bg-green-100 px-2.5 py-1.5 rounded-xl text-sm">+ <CheckCircle className="size-3" />+ <span className="text-xs font-medium text-green-500">Domain verified</span></div>@@ -343,8 +307,56 @@ export function CustomDomain() {</span></div></>+ ))}+ </div>+ <div className="flex gap-3 justify-between items-center mt-8 w-full">+ <Button+ type="submit"+ size="sm"+ variant="dark"+ onClick={handleSubmit}+ disabled={loading}+ >+ {loading ? "Saving..." : "Save"}+ </Button>+ <div className="flex gap-3 items-center">+ {activeSpace?.space.customDomain && (+ <Button+ type="button"+ variant="white"+ size="sm"+ onClick={() => checkVerification(true)}+ disabled={verifying}+ className="w-[105px]"+ >+ {verifying ? (+ <FontAwesomeIcon+ className="animate-spin size-6"+ icon={faRefresh}+ />+ ) : (+ <FontAwesomeIcon className="mr-1 size-4" icon={faRefresh} />+ )}+ Refresh+ </Button>+ )}+ {activeSpace?.space.customDomain && (+ <Button+ type="button"+ size="sm"+ variant="white"+ onClick={handleRemoveDomain}+ disabled={loading}+ >+ <FontAwesomeIcon className="mr-1 size-4" icon={faTrash} />+ Remove+ </Button>)}</div>+ </div>+ </div>+ {activeSpace?.space.customDomain && (+ <div className="mt-4 space-y-4">{!isVerified && domainConfig?.verification?.[0] && (<div className="overflow-hidden rounded-lg border border-gray-200"><div className="px-4 py-3 bg-gray-50 border-b border-gray-200">diff --git a/apps/web/app/login/form.tsx b/apps/web/app/login/form.tsxindex 2f60a3eeb..b92f13549 100644--- a/apps/web/app/login/form.tsx+++ b/apps/web/app/login/form.tsx@@ -384,7 +384,7 @@ const NormalLogin = ({)}{oauthError && (- <div className="p-4 mb-4 bg-red-600 rounded-lg">+ <div className="p-4 mb-4 bg-red-900 rounded-xl"><p className="text-sm text-gray-50">It looks like you've previously used this email to sign up viaemail login. Please enter your email below to receive a sign indiff --git a/apps/web/app/onboarding/Onboarding.tsx b/apps/web/app/onboarding/Onboarding.tsxindex 929bf555e..b90daea20 100644--- a/apps/web/app/onboarding/Onboarding.tsx+++ b/apps/web/app/onboarding/Onboarding.tsx@@ -1,7 +1,7 @@"use client";import { users } from "@cap/database/schema";-import { Button, CardContent, Input, Label } from "@cap/ui";+import { Button, Input } from "@cap/ui";import { useRouter } from "next/navigation";import { useState } from "react";import toast from "react-hot-toast";@@ -53,30 +53,31 @@ export const Onboarding = ({className="relative w-[calc(100%-2%)] p-[28px] max-w-[472px] bg-gray-100 border border-gray-200 rounded-2xl"onSubmit={handleSubmit}>- <CardContent>- <div className="space-y-3">- <div className="flex flex-col space-y-1">- <Label htmlFor="firstName">First name *</Label>- <Input- type="text"- id="firstName"- name="firstName"- required- value={firstNameInput}- onChange={(e) => setFirstNameInput(e.target.value)}- />- </div>- <div className="flex flex-col space-y-1">- <Label htmlFor="lastName">Last name</Label>- <Input type="text" id="lastName" name="lastName" />- </div>+ <div className="space-y-3">+ <div className="flex flex-col space-y-1">+ <Input+ type="text"+ id="firstName"+ placeholder="First name"+ name="firstName"+ required+ value={firstNameInput}+ onChange={(e) => setFirstNameInput(e.target.value)}+ /></div>- </CardContent>+ <div className="flex flex-col space-y-1">+ <Input+ type="text"+ id="lastName"+ name="lastName"+ placeholder="Last name"+ />+ </div>+ </div><Buttondisabled={!firstNameInput}- className="mx-auto"+ className="mx-auto mt-6 w-full"type="submit"- size="sm"spinner={loading}>Completediff --git a/apps/web/components/pages/PricingPage.tsx b/apps/web/components/pages/PricingPage.tsxindex 63f7889dd..0f82a52e4 100644--- a/apps/web/components/pages/PricingPage.tsx+++ b/apps/web/components/pages/PricingPage.tsx@@ -2,20 +2,18 @@import {Button,- LogoBadge,Card,CardDescription,- CardTitle,- CardHeader,- CardContent,CardFooter,+ CardHeader,+ CardTitle,Switch,} from "@cap/ui";-import { Check, Construction } from "lucide-react";-import { useState, useEffect } from "react";import { getProPlanId } from "@cap/utils";-import toast from "react-hot-toast";+import { Check } from "lucide-react";import { useRouter, useSearchParams } from "next/navigation";+import { useEffect, useState } from "react";+import toast from "react-hot-toast";import { SimplePlans } from "../text/SimplePlans";export const PricingPage = () => {@@ -319,15 +317,13 @@ export const PricingPage = () => {</div><h1className={`text-4xl md:text-5xl ${- initialRender ? "fade-in-down" : ""- }mb-6 }`}+ initialRender ? "fade-in-down" : ""}mb-6 }`}>Early Adopter Pricing</h1><pclassName={`max-w-[800px] mx-auto ${- initialRender ? "fade-in-down animate-delay-1" : ""- }`}+ initialRender ? "fade-in-down animate-delay-1" : ""}`}>Cap is currently in public beta, and we're offering special earlyadopter pricing to our first users. This pricing will be locked in@@ -335,7 +331,7 @@ export const PricingPage = () => {</p><div className="flex justify-center mt-5 mb-8">- <div className="inline-flex bg-gray-100 p-1 rounded-full border border-blue-300">+ <div className="inline-flex p-1 bg-gray-100 rounded-full border border-blue-300"><divclassName={`rounded-full z-10 relative transition-all duration-300 min-w-[120px] py-2 px-6 mx-0.5 text-center cursor-pointer border ${deploymentType === "cloud"@@ -364,8 +360,7 @@ export const PricingPage = () => {<div className="grid grid-cols-1 gap-3 items-stretch md:grid-cols-2"><CardclassName={`bg-gray-100 rounded-xl min-h-[600px] flex-grow ${- initialRender ? "fade-in-down animate-delay-2" : ""- }`}+ initialRender ? "fade-in-down animate-delay-2" : ""}`}><div className="space-y-4"><CardHeader>@@ -400,7 +395,7 @@ export const PricingPage = () => {)}</div></div>- <div className="flex items-center justify-between pt-4 mt-2 border-t border-gray-200">+ <div className="flex justify-between items-center pt-4 mt-2 border-t border-gray-200"><div className="flex items-center"><span className="mr-2 text-xs">Switch to{" "}@@ -445,7 +440,7 @@ export const PricingPage = () => {</div></div></CardHeader>- <CardContent>+ <Card className="bg-transparent border-0"><ButtononClick={openCommercialCheckout}className="w-full"@@ -458,7 +453,7 @@ export const PricingPage = () => {? "Purchase Licenses": "Purchase License"}</Button>- </CardContent>+ </Card><CardFooter><div className="space-y-8"><div>@@ -485,14 +480,13 @@ export const PricingPage = () => {<CardclassName={`bg-gray-100 rounded-xl min-h-[600px] flex-grow border-blue-500 border-4 ${- initialRender ? "fade-in-up animate-delay-2" : ""- }`}+ initialRender ? "fade-in-up animate-delay-2" : ""}`}><div className="space-y-3"><CardHeader>- <CardTitle className="text-2xl font-medium">+ <CardTitle className="text-2xl font-medium">App + Commercial License +{" "}- <span className="text-blue-500 text-2xl font-bold">+ <span className="text-2xl font-bold text-blue-500">Cap Pro</span></CardTitle>@@ -529,7 +523,7 @@ export const PricingPage = () => {)}</div></div>- <div className="flex items-center justify-between pt-4 mt-2 border-t border-gray-200">+ <div className="flex justify-between items-center pt-4 mt-2 border-t border-gray-200"><div className="flex items-center"><span className="mr-2 text-xs">Switch to {isAnnual ? "monthly" : "annually"}@@ -569,7 +563,7 @@ export const PricingPage = () => {</div></div></CardHeader>- <CardContent>+ <Card className="bg-transparent border-0"><Buttonvariant="primary"onClick={() => planCheckout()}@@ -579,7 +573,7 @@ export const PricingPage = () => {>{proLoading ? "Loading..." : "Upgrade to Cap Pro"}</Button>- </CardContent>+ </Card><CardFooter><div className="space-y-8"><div>@@ -605,19 +599,18 @@ export const PricingPage = () => {</Card></div>) : (- <div className="grid grid-cols-1 md:grid-cols-2 gap-6">+ <div className="grid grid-cols-1 gap-6 md:grid-cols-2"><CardclassName={`bg-gray-100 rounded-xl min-h-[600px] flex-grow border-blue-500 border-4 ${- initialRender ? "fade-in-up animate-delay-2" : ""- }`}+ initialRender ? "fade-in-up animate-delay-2" : ""}`}><div className="space-y-3"><CardHeader><CardTitle className="text-2xl font-medium">- <span className="text-black text-2xl font-medium">+ <span className="text-2xl font-medium text-black">Self-hosted</span>{" "}- <span className="text-blue-500 text-2xl font-bold">+ <span className="text-2xl font-bold text-blue-500">Cap Pro</span></CardTitle>@@ -648,7 +641,7 @@ export const PricingPage = () => {)}</div></div>- <div className="flex items-center justify-between pt-4 mt-2 border-t border-gray-200">+ <div className="flex justify-between items-center pt-4 mt-2 border-t border-gray-200"><div className="flex items-center"><span className="mr-2 text-xs">Switch to{" "}@@ -693,7 +686,7 @@ export const PricingPage = () => {</div></div></CardHeader>- <CardContent>+ <Card><Buttonvariant="primary"onClick={openSelfHostedCheckout}@@ -705,7 +698,7 @@ export const PricingPage = () => {? "Loading...": "Get Self-hosted Cap Pro"}</Button>- </CardContent>+ </Card><CardFooter><div className="space-y-8"><div>diff --git a/packages/ui/src/components/Card.tsx b/packages/ui/src/components/Card.tsxindex eb80ae289..ce8ed16d1 100644--- a/packages/ui/src/components/Card.tsx+++ b/packages/ui/src/components/Card.tsx@@ -8,7 +8,8 @@ const Card = forwardRef<<divref={ref}className={classNames(- !noStyle && "rounded-lg border bg-white text-card-foreground shadow-sm",+ !noStyle &&+ "border p-5 bg-gray-50 rounded-2xl border-gray-200 text-card-foreground",className)}{...props}@@ -55,21 +56,6 @@ const CardDescription = forwardRef<));CardDescription.displayName = "CardDescription";-const CardContent = forwardRef<- HTMLDivElement,- React.HTMLAttributes<HTMLDivElement>->(({ className, ...props }, ref) => (- <div- ref={ref}- className={classNames(- "p-5 bg-gray-50 rounded-2xl border border-gray-200",- className- )}- {...props}- />-));-CardContent.displayName = "CardContent";-const CardFooter = forwardRef<HTMLDivElement,React.HTMLAttributes<HTMLDivElement>@@ -82,11 +68,4 @@ const CardFooter = forwardRef<));CardFooter.displayName = "CardFooter";-export {- Card,- CardContent,- CardDescription,- CardFooter,- CardHeader,- CardTitle,-};+export { Card, CardDescription, CardFooter, CardHeader, CardTitle };diff --git a/packages/ui/src/components/input/Input.tsx b/packages/ui/src/components/input/Input.tsxindex d7a759476..09dd4e571 100644--- a/packages/ui/src/components/input/Input.tsx+++ b/packages/ui/src/components/input/Input.tsx@@ -12,7 +12,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(type={type}className={classNames("flex px-4 w-full text-sm font-thin text-gray-500 bg-gray-50 border-gray-200 transition-all duration-300 outline-0 focus:bg-gray-50",- "rounded-2xl hover:bg-gray-100 h-[48px] placeholder:text-gray-400 py-[14px] border-[1px] focus:border-gray-500",+ "rounded-xl hover:bg-gray-100 h-[48px] placeholder:text-gray-400 py-[14px] border-[1px] focus:border-gray-500","file:border-0 file:bg-transparent file:text-sm file:font-medium","disabled:cursor-not-allowed disabled:opacity-50 placeholder:transition-all","ring-0 focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 placeholder:duration-300 hover:placeholder:text-gray-500",