Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat: Rename from /share to /s
Richie McIlroyfd4ceff439e8
diff --git a/apps/desktop/src/components/windows/inner/Recorder.tsx b/apps/desktop/src/components/windows/inner/Recorder.tsxindex c4421595d..09c8d4efc 100644--- a/apps/desktop/src/components/windows/inner/Recorder.tsx+++ b/apps/desktop/src/components/windows/inner/Recorder.tsx@@ -205,7 +205,7 @@ export const Recorder = () => {const url =process.env.NODE_ENV === "development"- ? `${process.env.NEXT_PUBLIC_URL}/share/${await getLatestVideoId()}`+ ? `${process.env.NEXT_PUBLIC_URL}/s/${await getLatestVideoId()}`: `https://cap.link/${await getLatestVideoId()}`;await openLinkInBrowser(url);diff --git a/apps/web/app/dashboard/caps/Caps.tsx b/apps/web/app/dashboard/caps/Caps.tsxindex 2782d28ef..813dee3bb 100644--- a/apps/web/app/dashboard/caps/Caps.tsx+++ b/apps/web/app/dashboard/caps/Caps.tsx@@ -52,7 +52,14 @@ export const Caps = ({ data }: { data: (typeof videos.$inferSelect)[] }) => {key={index}className="rounded-xl border border-filler overflow-hidden">- <a className="group" href={`/share/${cap.id}`}>+ <a+ className="group"+ href={+ process.env.NEXT_PUBLIC_IS_CAP+ ? `https://cap.link/${cap.id}`+ : `${process.env.NEXT_PUBLIC_URL}/s/${cap.id}`+ }+ ><div><VideoThumbnailuserId={cap.ownerId}@@ -76,7 +83,7 @@ export const Caps = ({ data }: { data: (typeof videos.$inferSelect)[] }) => {);} else {navigator.clipboard.writeText(- `${process.env.NEXT_PUBLIC_URL}/share/${cap.id}`+ `${process.env.NEXT_PUBLIC_URL}/s/${cap.id}`);}toast.success("Link copied to clipboard!");@@ -84,7 +91,7 @@ export const Caps = ({ data }: { data: (typeof videos.$inferSelect)[] }) => {value={process.env.NEXT_PUBLIC_IS_CAP? `https://cap.link/${cap.id}`- : `${process.env.NEXT_PUBLIC_URL}/share/${cap.id}`+ : `${process.env.NEXT_PUBLIC_URL}/s/${cap.id}`}></input></div>diff --git a/apps/web/app/share/[videoId]/Share.tsx b/apps/web/app/s/[videoId]/Share.tsxsimilarity index 100%rename from apps/web/app/share/[videoId]/Share.tsxrename to apps/web/app/s/[videoId]/Share.tsxdiff --git a/apps/web/app/share/[videoId]/_components/AudioPlayer.tsx b/apps/web/app/s/[videoId]/_components/AudioPlayer.tsxsimilarity index 100%rename from apps/web/app/share/[videoId]/_components/AudioPlayer.tsxrename to apps/web/app/s/[videoId]/_components/AudioPlayer.tsxdiff --git a/apps/web/app/share/[videoId]/_components/ShareHeader.tsx b/apps/web/app/s/[videoId]/_components/ShareHeader.tsxsimilarity index 98%rename from apps/web/app/share/[videoId]/_components/ShareHeader.tsxrename to apps/web/app/s/[videoId]/_components/ShareHeader.tsxindex b4b65f4a9..b61a87cd8 100644--- a/apps/web/app/share/[videoId]/_components/ShareHeader.tsx+++ b/apps/web/app/s/[videoId]/_components/ShareHeader.tsx@@ -97,7 +97,7 @@ export const ShareHeader = ({);} else {navigator.clipboard.writeText(- `${process.env.NEXT_PUBLIC_URL}/share/${data.id}`+ `${process.env.NEXT_PUBLIC_URL}/s/${data.id}`);}toast.success("Link copied to clipboard!");diff --git a/apps/web/app/share/[videoId]/_components/ShareVideo.tsx b/apps/web/app/s/[videoId]/_components/ShareVideo.tsxsimilarity index 100%rename from apps/web/app/share/[videoId]/_components/ShareVideo.tsxrename to apps/web/app/s/[videoId]/_components/ShareVideo.tsxdiff --git a/apps/web/app/share/[videoId]/_components/Toolbar.tsx b/apps/web/app/s/[videoId]/_components/Toolbar.tsxsimilarity index 100%rename from apps/web/app/share/[videoId]/_components/Toolbar.tsxrename to apps/web/app/s/[videoId]/_components/Toolbar.tsxdiff --git a/apps/web/app/share/[videoId]/_components/VideoPlayer.tsx b/apps/web/app/s/[videoId]/_components/VideoPlayer.tsxsimilarity index 100%rename from apps/web/app/share/[videoId]/_components/VideoPlayer.tsxrename to apps/web/app/s/[videoId]/_components/VideoPlayer.tsxdiff --git a/apps/web/app/share/[videoId]/page.tsx b/apps/web/app/s/[videoId]/page.tsxsimilarity index 100%rename from apps/web/app/share/[videoId]/page.tsxrename to apps/web/app/s/[videoId]/page.tsxdiff --git a/apps/web/app/share/loading.tsx b/apps/web/app/s/loading.tsxsimilarity index 100%rename from apps/web/app/share/loading.tsxrename to apps/web/app/s/loading.tsxdiff --git a/apps/web/app/share/page.tsx b/apps/web/app/s/page.tsxsimilarity index 100%rename from apps/web/app/share/page.tsxrename to apps/web/app/s/page.tsxdiff --git a/apps/web/components/Footer.tsx b/apps/web/components/Footer.tsxindex 2f30374e0..d41375e91 100644--- a/apps/web/components/Footer.tsx+++ b/apps/web/components/Footer.tsx@@ -8,7 +8,7 @@ export const Footer = () => {if (pathname === "/login" ||pathname.includes("/dashboard") ||- pathname.includes("/share") ||+ pathname.includes("/s/") ||(typeof window !== "undefined" && window.location.href.includes("cap.link")))return null;diff --git a/apps/web/components/Navbar.tsx b/apps/web/components/Navbar.tsxindex 620c903ac..c8a42b48a 100644--- a/apps/web/components/Navbar.tsx+++ b/apps/web/components/Navbar.tsx@@ -10,7 +10,7 @@ export const Navbar = () => {if (pathname === "/login" ||pathname.includes("/dashboard") ||- pathname.includes("/share") ||+ pathname.includes("/s/") ||(typeof window !== "undefined" && window.location.href.includes("cap.link")))return null;diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjsindex 42dccace4..a0290a10e 100644--- a/apps/web/next.config.mjs+++ b/apps/web/next.config.mjs@@ -40,21 +40,6 @@ const nextConfig = {},],},- async redirects() {- return [- {- source: "/:path*",- has: [- {- type: "host",- value: "cap.link",- },- ],- destination: "https://cap.so/share/:path*",- permanent: true,- },- ];- },async rewrites() {return [{