From e185dfc120d04796e8ef2a0f20f223a04b201b4a Mon Sep 17 00:00:00 2001 From: Irozuku Date: Wed, 11 Mar 2026 17:55:04 -0300 Subject: [PATCH 1/2] feat(download): add tracking for download button clicks and improve download section structure --- components/download-section.tsx | 43 +++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/components/download-section.tsx b/components/download-section.tsx index bf8d8f4..ada42da 100644 --- a/components/download-section.tsx +++ b/components/download-section.tsx @@ -1,9 +1,12 @@ +"use client" + import { Button } from "@/components/ui/button" import { Card, CardContent } from "@/components/ui/card" -import { Download, Terminal, Package } from "lucide-react" +import { Download, Package } from "lucide-react" const downloads = [ { + id: "mac_intel", icon: Package, platform: "macOS Intel processors", version: "v0.1.15", @@ -12,6 +15,7 @@ const downloads = [ link: "https://dashai.nyc3.cdn.digitaloceanspaces.com/executables/DashAI-launcher-cpu-x86_64", }, { + id: "mac_arm", icon: Package, platform: "macOS ARM processors", version: "v0.1.15", @@ -20,6 +24,7 @@ const downloads = [ link: "https://dashai.nyc3.cdn.digitaloceanspaces.com/executables/DashAI-launcher-cpu-arm64", }, { + id: "windows", icon: Package, platform: "Windows", version: "v0.1.15", @@ -27,16 +32,21 @@ const downloads = [ format: ".exe", link: "https://dashai.nyc3.cdn.digitaloceanspaces.com/executables/DashAI-launcher-cpu.exe", }, - // { - // icon: Package, - // platform: "Docker", - // version: "latest", - // size: "~300 MB", - // format: "container", - // link: "#", - // }, ] +const TRACKER_URL = process.env.NEXT_PUBLIC_TRACKER_URL + +async function trackClick(buttonId: string) { + if (!TRACKER_URL) return + try { + await fetch(`${TRACKER_URL}/click/${buttonId}`, { + method: "POST", + }) + } catch { + // non-blocking — don't let tracking errors affect the download + } +} + export function DownloadSection() { return (
@@ -45,17 +55,18 @@ export function DownloadSection() {

Download DashAI

Beta Version

- This early version lets you explore DashAI’s main features. We appreciate your feedback to help us improve before the official release. + This early version lets you explore DashAI's main features. We appreciate your feedback to help us + improve before the official release.

- {downloads.map((download, index) => { + {downloads.map((download) => { const Icon = download.icon return ( @@ -69,12 +80,12 @@ export function DownloadSection() {

{download.format}

-
) -} +} \ No newline at end of file From a8d8681e70dfb8a46ea26cd5cfc77046494b8221 Mon Sep 17 00:00:00 2001 From: Irozuku Date: Thu, 12 Mar 2026 10:26:48 -0300 Subject: [PATCH 2/2] fix(deploy): add environment variable for tracker URL in build job --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ac47ff6..4c790f8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,6 +19,8 @@ concurrency: jobs: build: runs-on: ubuntu-latest + env: + NEXT_PUBLIC_TRACKER_URL: ${{ vars.NEXT_PUBLIC_TRACKER_URL }} steps: - name: Checkout uses: actions/checkout@v4