Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat: Add title + created to Share page

Richie McIlroy6cbe07dbdd3c
diff --git a/apps/web/app/share/[videoId]/Share.tsx b/apps/web/app/share/[videoId]/Share.tsx
index 52fe69c64..e59e2778b 100644
--- a/apps/web/app/share/[videoId]/Share.tsx
+++ b/apps/web/app/share/[videoId]/Share.tsx
@@ -19,7 +19,7 @@ export const Share = ({ data }: { data: typeof videos.$inferSelect }) => {
return (
<div className="wrapper py-6">
<div className="space-y-8">
- <ShareHeader title={data.name} />
+ <ShareHeader title={data.name} createdAt={data.createdAt} />
<div className="aspect-video relative bg-black flex items-center justify-center rounded-lg group overflow-hidden">
<div className="video-player w-[175px] h-[175px] absolute bottom-4 right-12 overflow-hidden rounded-full z-10 shadow-[0px 0px 180px rgba(255, 255, 255, 0.18)]">
<VideoPlayer
diff --git a/apps/web/app/share/[videoId]/_components/ShareHeader.tsx b/apps/web/app/share/[videoId]/_components/ShareHeader.tsx
index 5c5364cc2..d62a58dc9 100644
--- a/apps/web/app/share/[videoId]/_components/ShareHeader.tsx
+++ b/apps/web/app/share/[videoId]/_components/ShareHeader.tsx
@@ -1,9 +1,20 @@
-import { Logo } from "@cap/ui";
+import { LogoBadge } from "@cap/ui";
+import moment from "moment";
-export const ShareHeader = ({ title }: { title: string }) => {
+export const ShareHeader = ({
+ title,
+ createdAt,
+}: {
+ title: string;
+ createdAt: Date;
+}) => {
return (
- <div>
- <Logo className="w-20 h-auto" />
+ <div className="flex items-center space-x-5">
+ <LogoBadge className="w-8 h-auto" />
+ <div>
+ <h1 className="text-2xl">{title}</h1>
+ <p className="text-gray-400">{moment(createdAt).fromNow()}</p>
+ </div>
</div>
);
};
diff --git a/apps/web/components/Footer.tsx b/apps/web/components/Footer.tsx
index 38963fa84..2f30374e0 100644
--- a/apps/web/components/Footer.tsx
+++ b/apps/web/components/Footer.tsx
@@ -9,7 +9,7 @@ export const Footer = () => {
pathname === "/login" ||
pathname.includes("/dashboard") ||
pathname.includes("/share") ||
- window.location.href.includes("cap.link")
+ (typeof window !== "undefined" && window.location.href.includes("cap.link"))
)
return null;
diff --git a/apps/web/components/Navbar.tsx b/apps/web/components/Navbar.tsx
index 554fcc40e..620c903ac 100644
--- a/apps/web/components/Navbar.tsx
+++ b/apps/web/components/Navbar.tsx
@@ -11,7 +11,7 @@ export const Navbar = () => {
pathname === "/login" ||
pathname.includes("/dashboard") ||
pathname.includes("/share") ||
- window.location.href.includes("cap.link")
+ (typeof window !== "undefined" && window.location.href.includes("cap.link"))
)
return null;
diff --git a/apps/web/components/pages/FaqPage.tsx b/apps/web/components/pages/FaqPage.tsx
index d2f6c9a65..a864f3de6 100644
--- a/apps/web/components/pages/FaqPage.tsx
+++ b/apps/web/components/pages/FaqPage.tsx
@@ -27,9 +27,9 @@ const faqContent = [
"Apart from being open source and privacy focused, Cap is also a lot more lightweight and faster to use. We also focus strongly on design and user experience.",
},
{
- title: "When will v1.0.0 launch?",
+ title: "When will v0.1.0 launch?",
answer:
- "We're aiming to launch v1.0.0 by Q1 2024, if not sooner. However, there'll be regular Alpha builds available to download on our GitHub before then.",
+ "We're aiming to launch v0.1.0 by Q1 2024, if not sooner. However, there'll be regular Alpha builds available to download on our GitHub before then.",
},
];