From 7601f8ce30e709b7d2c05fcd8169bde842803f6a Mon Sep 17 00:00:00 2001 From: Jiminy Panoz Date: Tue, 1 Sep 2026 17:52:25 +0200 Subject: [PATCH] Add version in gtag event --- src/components/shared-content/DownloadContent.astro | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/shared-content/DownloadContent.astro b/src/components/shared-content/DownloadContent.astro index fe42be6..cf7019f 100644 --- a/src/components/shared-content/DownloadContent.astro +++ b/src/components/shared-content/DownloadContent.astro @@ -9,7 +9,7 @@ import MsStoreBadge from "../buttons/MsStoreBadge.astro"; import ActionButton from "../buttons/ActionButton.astro"; import ClientData from "../ClientData.astro"; import { t, getImage, slugify, splitLinks, type LinkSlot } from "../../i18n/utils.js"; -import { downloadUrls, downloadPlatforms } from "../../links.js"; +import { downloadUrls, downloadPlatforms, desktopVersion } from "../../links.js"; import { BREAKPOINT_MOBILE } from "../../breakpoints.js"; import { getRelativeLocaleUrl } from "astro:i18n"; import rawShape6WaveBottom from "../../assets/shapes/thorium-shape-6-wave-bottom.svg?raw"; @@ -22,10 +22,10 @@ const { lang } = Astro.props; const downloadLinks = t(lang, "download.tabs.links", { returnObjects: true }) as Record; -const downloadLinkSlots: Record = Object.fromEntries( +const downloadLinkSlots: Record = Object.fromEntries( Object.entries(downloadUrls).map(([ key, url ]) => [ key, - { href: url, text: downloadLinks[key] ?? key, platform: downloadPlatforms[key] ?? "" }, + { href: url, text: downloadLinks[key] ?? key, platform: downloadPlatforms[key] ?? "", version: desktopVersion }, ]) ); @@ -74,7 +74,7 @@ const osTabs = Object.entries(tabsData) { osSteps(tab.key).map(step => (
  • { splitLinks(step, downloadLinkSlots).map(seg => - typeof seg === "string" ? seg : { seg.text } + typeof seg === "string" ? seg : { seg.text } ) }
  • )) } @@ -186,6 +186,7 @@ const osTabs = Object.entries(tabsData) link_text: link.textContent?.trim(), file_name: downloadLabel(link.href), platform: link.dataset.platform || undefined, + version: link.dataset.version || undefined, }); });