Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

fix: display app version in More menu

Bortlesboate792cab80487
diff --git a/electron/electron-env.d.ts b/electron/electron-env.d.ts
index 20cc1469..7b8876e0 100644
--- a/electron/electron-env.d.ts
+++ b/electron/electron-env.d.ts
@@ -286,6 +286,8 @@ interface Window {
message?: string;
error?: string;
}>;
+ /** Returns the app version from package.json */
+ getAppVersion: () => Promise<string>;
/** Hide the OS cursor before browser capture starts. */
hideOsCursor: () => Promise<{ success: boolean }>;
/** Countdown timer before recording */
diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.ts
index 16a265e2..ebf73e6b 100644
--- a/electron/ipc/handlers.ts
+++ b/electron/ipc/handlers.ts
@@ -4474,5 +4474,9 @@ body{background:transparent;overflow:hidden;width:100vw;height:100vh}
seconds: countdownInProgress ? countdownRemaining : null,
}
})
+
+ ipcMain.handle('app:getVersion', () => {
+ return app.getVersion()
+ })
}
diff --git a/electron/preload.ts b/electron/preload.ts
index 43f141b7..cfe9d8f4 100644
--- a/electron/preload.ts
+++ b/electron/preload.ts
@@ -296,6 +296,7 @@ contextBridge.exposeInMainWorld("electronAPI", {
isNativeWindowsCaptureAvailable: () => ipcRenderer.invoke("is-native-windows-capture-available"),
muxNativeWindowsRecording: () => ipcRenderer.invoke("mux-native-windows-recording"),
hideOsCursor: () => ipcRenderer.invoke("hide-cursor"),
+ getAppVersion: () => ipcRenderer.invoke("app:getVersion"),
getCountdownDelay: () => ipcRenderer.invoke("get-countdown-delay"),
setCountdownDelay: (delay: number) => ipcRenderer.invoke("set-countdown-delay", delay),
startCountdown: (seconds: number) => ipcRenderer.invoke("start-countdown", seconds),
diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx
index f1078fde..b62ca488 100644
--- a/src/components/launch/LaunchWindow.tsx
+++ b/src/components/launch/LaunchWindow.tsx
@@ -188,6 +188,7 @@ export function LaunchWindow() {
const [sourcesLoading, setSourcesLoading] = useState(false);
const [hideHudFromCapture, setHideHudFromCapture] = useState(true);
const [platform, setPlatform] = useState<string | null>(null);
+ const [appVersion, setAppVersion] = useState<string | null>(null);
const dropdownRef = useRef<HTMLDivElement>(null);
const hudContentRef = useRef<HTMLDivElement>(null);
const hudBarRef = useRef<HTMLDivElement>(null);
@@ -372,6 +373,22 @@ export function LaunchWindow() {
};
}, []);
+ useEffect(() => {
+ let cancelled = false;
+ const loadVersion = async () => {
+ try {
+ const version = await window.electronAPI.getAppVersion();
+ if (!cancelled) setAppVersion(version);
+ } catch (error) {
+ console.error("Failed to load app version:", error);
+ }
+ };
+ void loadVersion();
+ return () => {
+ cancelled = true;
+ };
+ }, []);
+
useEffect(() => {
let cancelled = false;
const loadHudCaptureProtection = async () => {
@@ -1006,6 +1023,20 @@ export function LaunchWindow() {
{LOCALE_LABELS[code] ?? code}
</DropdownItem>
))}
+ {appVersion && (
+ <div
+ style={{
+ marginTop: 8,
+ padding: "4px 12px",
+ fontSize: 11,
+ color: "#6b6b78",
+ textAlign: "center",
+ userSelect: "text",
+ }}
+ >
+ v{appVersion}
+ </div>
+ )}
</>
)}
</div>