From bbd46b44acb1fd2e36d3188e7fca7149a88213bf Mon Sep 17 00:00:00 2001
From: webadderall <131426131+webadderall@users.noreply.github.com>
Date: Mon, 27 Apr 2026 15:42:22 +1000
Subject: [PATCH] Fix video wallpaper sync and streamline updater UI
---
electron/updater.ts | 20 -----
src/components/launch/LaunchWindow.tsx | 12 +++
src/components/video-editor/SettingsPanel.tsx | 64 +++++++++++----
src/components/video-editor/VideoPlayback.tsx | 62 +++++++++++---
src/lib/assetPath.test.ts | 41 ++++++++++
src/lib/assetPath.ts | 81 +++++++++++++++++++
src/lib/exporter/frameRenderer.ts | 6 +-
src/lib/exporter/modernFrameRenderer.ts | 6 +-
8 files changed, 246 insertions(+), 46 deletions(-)
create mode 100644 src/lib/assetPath.test.ts
diff --git a/electron/updater.ts b/electron/updater.ts
index 23eb65e5..81a4f351 100644
--- a/electron/updater.ts
+++ b/electron/updater.ts
@@ -292,15 +292,6 @@ export function getUpdateStatusSummary() {
return updateStatusSummary;
}
-async function showNoUpdatesDialog(getMainWindow: () => BrowserWindow | null) {
- await showMessageBox(getMainWindow, {
- type: "info",
- title: "No Updates Available",
- message: "Recordly is up to date.",
- detail: `You are running version ${app.getVersion()}.`,
- });
-}
-
async function showUpdateErrorDialog(getMainWindow: () => BrowserWindow | null, error: unknown) {
await showMessageBox(getMainWindow, {
type: "error",
@@ -647,13 +638,6 @@ export async function checkForAppUpdates(
if (updateCheckInProgress) {
writeUpdaterLog("Skipped update check because a previous check is still running.");
- if (options?.manual) {
- await showMessageBox(getMainWindow, {
- type: "info",
- title: "Update Check In Progress",
- message: "Recordly is already checking for updates.",
- });
- }
return;
}
@@ -758,11 +742,7 @@ export function setupAutoUpdates(
detail: `Recordly ${app.getVersion()} is up to date.`,
});
clearVisibleUpdateToast(sendToRenderer);
- const shouldReport = manualCheckRequested;
manualCheckRequested = false;
- if (shouldReport) {
- void showNoUpdatesDialog(getMainWindow);
- }
});
autoUpdater.on("download-progress", (progress) => {
diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx
index 8f48fd79..3863751e 100644
--- a/src/components/launch/LaunchWindow.tsx
+++ b/src/components/launch/LaunchWindow.tsx
@@ -72,6 +72,7 @@ const COUNTDOWN_OPTIONS = [0, 3, 5, 10];
const WEBCAM_PREVIEW_DRAG_THRESHOLD = 6;
const DEFAULT_WEBCAM_PREVIEW_OFFSET = { x: 0, y: 0 };
const DEFAULT_RECORDING_HUD_OFFSET = { x: 0, y: 0 };
+const SHOW_DEV_UPDATE_PREVIEW = import.meta.env.DEV;
function IconButton({
onClick,
@@ -1472,6 +1473,17 @@ export function LaunchWindow() {
>
{t("recording.openProject")}
+ {SHOW_DEV_UPDATE_PREVIEW ? (
+ }
+ onClick={() => {
+ void window.electronAPI.previewUpdateToast();
+ setActiveDropdown("none");
+ }}
+ >
+ {t("recording.previewUpdateUi", "Preview Update UI")}
+
+ ) : null}
{t("recording.language")}
diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx
index aa7d2bfd..e7fe287d 100644
--- a/src/components/video-editor/SettingsPanel.tsx
+++ b/src/components/video-editor/SettingsPanel.tsx
@@ -13,7 +13,12 @@ import {
import { Switch } from "@/components/ui/switch";
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import { useTheme } from "@/contexts/ThemeContext";
-import { getAssetPath, getRenderableAssetUrl, getWallpaperThumbnailUrl } from "@/lib/assetPath";
+import {
+ getAssetPath,
+ getRenderableAssetUrl,
+ getRenderableVideoUrl,
+ getWallpaperThumbnailUrl,
+} from "@/lib/assetPath";
import type { ExtensionSettingField } from "@/lib/extensions";
import { extensionHost, type FrameInstance } from "@/lib/extensions";
import { cn } from "@/lib/utils";
@@ -147,6 +152,47 @@ function SectionLabel({ children }: { children: React.ReactNode }) {
);
}
+function WallpaperVideoPreview({ src }: { src: string }) {
+ const [resolvedSrc, setResolvedSrc] = useState(src);
+
+ useEffect(() => {
+ let cancelled = false;
+
+ void (async () => {
+ try {
+ const nextSrc = await getRenderableVideoUrl(src);
+ if (!cancelled) {
+ setResolvedSrc(nextSrc);
+ }
+ } catch {
+ if (!cancelled) {
+ setResolvedSrc(src);
+ }
+ }
+ })();
+
+ return () => {
+ cancelled = true;
+ };
+ }, [src]);
+
+ return (
+