Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

feat(website): offer a star once a download has started

EtienneLescotd375e04251eb
diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts
index f6c5a57a4..a9aabf966 100644
--- a/website/docusaurus.config.ts
+++ b/website/docusaurus.config.ts
@@ -353,7 +353,9 @@ export default async function createConfig(): Promise<Config> {
// Read back by src/pages/download.tsx, src/pages/index.tsx and
// src/components/AppLanguages.
// Serialized into the client bundle, so it stays plain JSON.
- customFields: { latestRelease, appLanguages },
+ // `starCount` rides along with the navbar badge's own build-time lookup, so the
+ // /download star CTA can show a real number without a runtime call to the API.
+ customFields: { latestRelease, appLanguages, starCount },
// Translated: the landing page, /download/, the docs and the theme. The
// blog and the marketing pages stay English (src/lib/locale-routes.ts).
diff --git a/website/i18n/code.source.json b/website/i18n/code.source.json
index 34f078f68..f9817f112 100644
--- a/website/i18n/code.source.json
+++ b/website/i18n/code.source.json
@@ -17,6 +17,9 @@
"download.linux.appImage.label": "Any distribution",
"download.linux.appImage.sublabel": "Portable · .AppImage",
"download.linux.footnote": "Capture goes through PipeWire and xdg-desktop-portal; both are required.",
+ "download.started.title": "Download started",
+ "download.started.blurb": "OpenScreen is free and MIT licensed. A star on GitHub helps other people find it.",
+ "download.started.cta": "Star on GitHub",
"download.meta.title": "Download for Windows, macOS & Linux",
"download.meta.description": "Download OpenScreen free for Windows, macOS, and Linux: Microsoft Store, .exe, .dmg, .deb, .rpm, .pacman, AppImage, Nix flake. Open source, no account.",
"download.hero.badge.release": "{tag} · MIT licensed",
diff --git a/website/i18n/de/code.json b/website/i18n/de/code.json
index eb0d8b00b..1f3137da9 100644
--- a/website/i18n/de/code.json
+++ b/website/i18n/de/code.json
@@ -110,6 +110,15 @@
"download.preRelease.cta": {
"message": "Alle Releases ansehen"
},
+ "download.started.title": {
+ "message": "Download gestartet"
+ },
+ "download.started.blurb": {
+ "message": "OpenScreen ist kostenlos und MIT-lizenziert. Ein Stern auf GitHub hilft anderen, es zu finden."
+ },
+ "download.started.cta": {
+ "message": "Stern auf GitHub geben"
+ },
"home.meta.title": {
"message": "Kostenloser Open-Source-Bildschirmrekorder und Videoeditor"
},
diff --git a/website/i18n/es/code.json b/website/i18n/es/code.json
index 58c2c87ae..64bde434c 100644
--- a/website/i18n/es/code.json
+++ b/website/i18n/es/code.json
@@ -762,5 +762,14 @@
"download.option.size": {
"message": "{size} MB",
"description": "{size} is a whole number of megabytes. Use your language's unit symbol (Mo in French)."
+ },
+ "download.started.title": {
+ "message": "Descarga iniciada"
+ },
+ "download.started.blurb": {
+ "message": "OpenScreen es gratuito y tiene licencia MIT. Una estrella en GitHub ayuda a que otras personas lo encuentren."
+ },
+ "download.started.cta": {
+ "message": "Dar una estrella en GitHub"
}
}
diff --git a/website/i18n/fr/code.json b/website/i18n/fr/code.json
index 04e9ac607..06fbb8de2 100644
--- a/website/i18n/fr/code.json
+++ b/website/i18n/fr/code.json
@@ -762,5 +762,14 @@
"download.option.size": {
"message": "{size} Mo",
"description": "{size} is a whole number of megabytes. Use your language's unit symbol (Mo in French)."
+ },
+ "download.started.title": {
+ "message": "Téléchargement lancé"
+ },
+ "download.started.blurb": {
+ "message": "OpenScreen est gratuit et sous licence MIT. Une étoile sur GitHub aide d'autres personnes à le découvrir."
+ },
+ "download.started.cta": {
+ "message": "Mettre une étoile sur GitHub"
}
}
diff --git a/website/i18n/ja/code.json b/website/i18n/ja/code.json
index 940ff88bc..21e24008f 100644
--- a/website/i18n/ja/code.json
+++ b/website/i18n/ja/code.json
@@ -762,5 +762,14 @@
"download.option.size": {
"message": "{size} MB",
"description": "{size} is a whole number of megabytes. Use your language's unit symbol (Mo in French)."
+ },
+ "download.started.title": {
+ "message": "ダウンロードを開始しました"
+ },
+ "download.started.blurb": {
+ "message": "OpenScreen は無料で、MIT ライセンスです。GitHub でスターを付けると、他の人が見つけやすくなります。"
+ },
+ "download.started.cta": {
+ "message": "GitHub でスターを付ける"
}
}
diff --git a/website/i18n/pt-BR/code.json b/website/i18n/pt-BR/code.json
index 209d3df6c..a108690ee 100644
--- a/website/i18n/pt-BR/code.json
+++ b/website/i18n/pt-BR/code.json
@@ -762,5 +762,14 @@
"download.option.size": {
"message": "{size} MB",
"description": "{size} is a whole number of megabytes. Use your language's unit symbol (Mo in French)."
+ },
+ "download.started.title": {
+ "message": "Download iniciado"
+ },
+ "download.started.blurb": {
+ "message": "O OpenScreen é gratuito e licenciado sob a MIT. Uma estrela no GitHub ajuda outras pessoas a encontrá-lo."
+ },
+ "download.started.cta": {
+ "message": "Dar uma estrela no GitHub"
}
}
diff --git a/website/i18n/zh-CN/code.json b/website/i18n/zh-CN/code.json
index aa4d27040..0c91ba6b5 100644
--- a/website/i18n/zh-CN/code.json
+++ b/website/i18n/zh-CN/code.json
@@ -110,6 +110,15 @@
"download.preRelease.cta": {
"message": "浏览所有版本"
},
+ "download.started.title": {
+ "message": "下载已开始"
+ },
+ "download.started.blurb": {
+ "message": "OpenScreen 免费且采用 MIT 许可证。在 GitHub 上点个星标,能帮助更多人发现它。"
+ },
+ "download.started.cta": {
+ "message": "在 GitHub 上点星标"
+ },
"home.meta.title": {
"message": "免费开源的录屏与视频剪辑软件"
},
diff --git a/website/i18n/zh-TW/code.json b/website/i18n/zh-TW/code.json
index d79711da0..1dcb53cbc 100644
--- a/website/i18n/zh-TW/code.json
+++ b/website/i18n/zh-TW/code.json
@@ -110,6 +110,15 @@
"download.preRelease.cta": {
"message": "瀏覽所有版本"
},
+ "download.started.title": {
+ "message": "下載已開始"
+ },
+ "download.started.blurb": {
+ "message": "OpenScreen 免費且採用 MIT 授權。在 GitHub 上給顆星,能幫助更多人找到它。"
+ },
+ "download.started.cta": {
+ "message": "在 GitHub 上給星"
+ },
"home.meta.title": {
"message": "免費開源的螢幕錄影與影片剪輯軟體"
},
diff --git a/website/src/pages/download.module.css b/website/src/pages/download.module.css
index 84e6c71f2..c79609cad 100644
--- a/website/src/pages/download.module.css
+++ b/website/src/pages/download.module.css
@@ -309,3 +309,59 @@
text-align: center;
}
}
+
+/* Shown inside a card after one of its file options was clicked. Sits on the accent wash so it
+ reads as a confirmation rather than a fourth download row, and uses the same tokens as the
+ options above it, so dark mode needs no separate rule. */
+.started {
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ margin-top: 2px;
+ padding: 12px;
+ border-radius: 10px;
+ border: 1px solid var(--os-accent-border);
+ background: var(--os-accent-wash);
+}
+
+.startedTitle {
+ font-size: 12.5px;
+ font-weight: 600;
+ color: var(--os-fg-emphasis);
+}
+
+.startedText {
+ margin: 0;
+ font-size: 11.5px;
+ line-height: 1.5;
+ color: var(--os-muted);
+}
+
+.startedCta {
+ display: inline-flex;
+ align-items: center;
+ align-self: flex-start;
+ gap: 7px;
+ padding: 7px 11px;
+ border-radius: 8px;
+ border: 1px solid var(--os-accent-border);
+ background: var(--os-surface-1);
+ color: var(--os-fg-2);
+ font-size: 12.5px;
+ font-weight: 500;
+}
+
+.startedCta:hover {
+ border-color: var(--os-accent);
+ background: var(--os-accent-soft);
+ color: var(--os-fg-emphasis);
+ text-decoration: none;
+}
+
+/* The count is evidence, not the action: it must not out-weigh the label next to it. */
+.startedCount {
+ padding-left: 7px;
+ border-left: 1px solid var(--os-border-soft);
+ color: var(--os-meta);
+ font-variant-numeric: tabular-nums;
+}
diff --git a/website/src/pages/download.tsx b/website/src/pages/download.tsx
index 68294af99..4b97b01ff 100644
--- a/website/src/pages/download.tsx
+++ b/website/src/pages/download.tsx
@@ -11,9 +11,10 @@ import {
Download,
ExternalLink,
FlaskConical,
+ Star,
TerminalSquare,
} from "lucide-react";
-import type { ReactNode } from "react";
+import { type ReactNode, useState } from "react";
import AppLanguages from "../components/AppLanguages";
import { type AppLanguage, type AssetKind, findAsset, type LatestRelease } from "../lib/release";
@@ -189,10 +190,44 @@ function downloadPageLd(
);
}
+/** Shown in a platform card once one of its file options has been clicked. The download is a
+ * plain browser navigation to the asset — this renders *after* it, never in front of it, so
+ * nothing here can delay or block getting the app. Stars are the project's only real
+ * distribution signal and most visitors arrive from search without ever seeing the repo.
+ *
+ * `starCount` comes from the same build-time lookup that feeds the navbar badge: asking the
+ * GitHub API from the browser would cost a request per visitor and rate-limit shared IPs. */
+function StarPrompt({ starCount, locale }: { starCount: number | null; locale: string }) {
+ return (
+ <div className={styles.started} role="status">
+ <span className={styles.startedTitle}>
+ <Translate id="download.started.title">Download started</Translate>
+ </span>
+ <p className={styles.startedText}>
+ <Translate id="download.started.blurb">
+ OpenScreen is free and MIT licensed. A star on GitHub helps other people find it.
+ </Translate>
+ </p>
+ <a className={styles.startedCta} href={REPO_URL} target="_blank" rel="noopener noreferrer">
+ <Star size={14} />
+ <Translate id="download.started.cta">Star on GitHub</Translate>
+ {starCount !== null ? (
+ <span className={styles.startedCount}>{starCount.toLocaleString(locale)}</span>
+ ) : null}
+ </a>
+ </div>
+ );
+}
+
export default function DownloadPage() {
const { siteConfig, i18n } = useDocusaurusContext();
const release = (siteConfig.customFields?.latestRelease ?? null) as LatestRelease;
const languages = (siteConfig.customFields?.appLanguages ?? []) as AppLanguage[];
+ const starCount = (siteConfig.customFields?.starCount ?? null) as number | null;
+ // Which platform card has had a file option clicked. One at a time: the prompt belongs to
+ // the card the user just acted on, and a second click elsewhere moves it rather than
+ // leaving a trail of them down the grid.
+ const [startedId, setStartedId] = useState<string | null>(null);
const page = {
url: `${siteConfig.url}${useBaseUrl("/download/")}`,
title: translate({
@@ -287,6 +322,11 @@ export default function DownloadPage() {
key={kind ?? href}
className={styles.option}
href={href ?? asset?.url ?? LATEST_URL}
+ // No preventDefault: the click keeps its default navigation to the
+ // asset and the download starts as it always did. A set `href` is
+ // the Store listing, which leaves the site — prompting there would
+ // render behind a page the user has already left.
+ onClick={href ? undefined : () => setStartedId(id)}
>
<span className={styles.optionText}>
<span className={styles.optionLabel}>{label}</span>
@@ -297,6 +337,9 @@ export default function DownloadPage() {
</a>
);
})}
+ {startedId === id ? (
+ <StarPrompt starCount={starCount} locale={i18n.currentLocale} />
+ ) : null}
</div>
{footnote ? <p className={styles.cardFoot}>{footnote}</p> : null}
</article>