Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): route Linux downloads to deb package

Richie McIlroycc28a7e28d65
diff --git a/apps/web/app/(site)/download/[platform]/route.ts b/apps/web/app/(site)/download/[platform]/route.ts
index c5c1c897e..c9f7886f7 100644
--- a/apps/web/app/(site)/download/[platform]/route.ts
+++ b/apps/web/app/(site)/download/[platform]/route.ts
@@ -86,16 +86,8 @@ export async function GET(
fallback: "windows",
},
linux: {
- url: "https://cdn.crabnebula.app/download/cap/cap/latest/platform/appimage-x86_64",
- fallback: "linux-appimage",
- },
- "linux-appimage": {
- url: "https://cdn.crabnebula.app/download/cap/cap/latest/platform/appimage-x86_64",
- fallback: "linux-appimage",
- },
- appimage: {
- url: "https://cdn.crabnebula.app/download/cap/cap/latest/platform/appimage-x86_64",
- fallback: "linux-appimage",
+ url: "https://cdn.crabnebula.app/download/cap/cap/latest/platform/deb-x86_64",
+ fallback: "linux-deb",
},
"linux-deb": {
url: "https://cdn.crabnebula.app/download/cap/cap/latest/platform/deb-x86_64",
@@ -113,18 +105,6 @@ export async function GET(
url: "https://cdn.crabnebula.app/download/cap/cap/latest/platform/deb-x86_64",
fallback: "linux-deb",
},
- "linux-rpm": {
- url: "https://cdn.crabnebula.app/download/cap/cap/latest/platform/rpm-x86_64",
- fallback: "linux-rpm",
- },
- rpm: {
- url: "https://cdn.crabnebula.app/download/cap/cap/latest/platform/rpm-x86_64",
- fallback: "linux-rpm",
- },
- fedora: {
- url: "https://cdn.crabnebula.app/download/cap/cap/latest/platform/rpm-x86_64",
- fallback: "linux-rpm",
- },
};
const download = downloadUrls[platform];
diff --git a/apps/web/app/api/download/route.ts b/apps/web/app/api/download/route.ts
index d510c2230..f0a9385ce 100644
--- a/apps/web/app/api/download/route.ts
+++ b/apps/web/app/api/download/route.ts
@@ -28,7 +28,7 @@ export async function GET(request: NextRequest) {
clientPlatform.includes("linux") ||
(userAgent.includes("linux") && !userAgent.includes("android"))
) {
- platform = "linux";
+ platform = "linux-deb";
}
return NextResponse.redirect(new URL(`/download/${platform}`, request.url));
diff --git a/apps/web/utils/platform.tsx b/apps/web/utils/platform.tsx
index 21126b723..6af6418c8 100644
--- a/apps/web/utils/platform.tsx
+++ b/apps/web/utils/platform.tsx
@@ -10,7 +10,7 @@ export const getDownloadUrl = (
} else if (platform === "macos") {
return isIntel ? "/download/apple-intel" : "/download/apple-silicon";
} else if (platform === "linux") {
- return "/download/linux";
+ return "/download/linux-deb";
} else {
return "/download/apple-silicon";
}
@@ -79,7 +79,7 @@ export const getVersionText = (platform: string | null): React.ReactNode => {
} else if (platform === "windows") {
return "Windows 10+ recommended";
} else if (platform === "linux") {
- return "Linux x86_64 AppImage recommended";
+ return "Linux x86_64 .deb recommended";
} else {
return "macOS 13.1+ recommended";
}
@@ -153,13 +153,13 @@ export const PlatformIcons: React.FC<PlatformIconsProps> = ({
</div>
<div>
<a
- href="/download/linux"
+ href="/download/linux-deb"
onClick={() =>
trackEvent("download_cta_clicked", {
source_page: source,
cta_location: "platform_icons",
target: "linux",
- target_url: "/download/linux",
+ target_url: "/download/linux-deb",
})
}
className="focus:outline-none"