diff --git a/src/main/workers/ludusavi.worker.ts b/src/main/workers/ludusavi.worker.ts index 469ab721..855d20bf 100644 --- a/src/main/workers/ludusavi.worker.ts +++ b/src/main/workers/ludusavi.worker.ts @@ -35,7 +35,7 @@ export const backupGame = ({ preview?: boolean; winePrefix?: string; }) => { - const args = ["backup", title, "--api", "--force"]; + const args = ["backup", `"${title}"`, "--api", "--force"]; if (preview) args.push("--preview"); if (backupPath) args.push("--path", backupPath); diff --git a/src/renderer/src/pages/game-details/cloud-sync-modal/cloud-sync-modal.tsx b/src/renderer/src/pages/game-details/cloud-sync-modal/cloud-sync-modal.tsx index 7a546eb4..325b64e5 100644 --- a/src/renderer/src/pages/game-details/cloud-sync-modal/cloud-sync-modal.tsx +++ b/src/renderer/src/pages/game-details/cloud-sync-modal/cloud-sync-modal.tsx @@ -40,6 +40,7 @@ export function CloudSyncModal({ visible, onClose }: CloudSyncModalProps) { downloadGameArtifact, deleteGameArtifact, setShowCloudSyncFilesModal, + getGameBackupPreview, } = useContext(cloudSyncContext); const { objectId, shop, gameTitle, lastDownloadedOption } = @@ -81,6 +82,10 @@ export function CloudSyncModal({ visible, onClose }: CloudSyncModalProps) { downloadGameArtifact(artifactId); }; + useEffect(() => { + getGameBackupPreview(); + }, [getGameBackupPreview]); + const backupStateLabel = useMemo(() => { if (uploadingBackup) { return ( diff --git a/src/renderer/src/pages/game-details/game-details-content.tsx b/src/renderer/src/pages/game-details/game-details-content.tsx index 28102854..909756df 100644 --- a/src/renderer/src/pages/game-details/game-details-content.tsx +++ b/src/renderer/src/pages/game-details/game-details-content.tsx @@ -37,7 +37,7 @@ export function GameDetailsContent() { const { userDetails, hasActiveSubscription } = useUserDetails(); - const { setShowCloudSyncModal, getGameBackupPreview, getGameArtifacts } = + const { setShowCloudSyncModal, getGameArtifacts } = useContext(cloudSyncContext); const aboutTheGame = useMemo(() => { @@ -113,9 +113,8 @@ export function GameDetailsContent() { }; useEffect(() => { - getGameBackupPreview(); getGameArtifacts(); - }, [getGameBackupPreview, getGameArtifacts]); + }, [getGameArtifacts]); return (
diff --git a/src/renderer/src/pages/game-details/sidebar/sidebar.tsx b/src/renderer/src/pages/game-details/sidebar/sidebar.tsx index 07443fee..21a940c6 100644 --- a/src/renderer/src/pages/game-details/sidebar/sidebar.tsx +++ b/src/renderer/src/pages/game-details/sidebar/sidebar.tsx @@ -20,7 +20,7 @@ import { HowLongToBeatSection } from "./how-long-to-beat-section"; import { howLongToBeatEntriesTable } from "@renderer/dexie"; import { SidebarSection } from "../sidebar-section/sidebar-section"; import { buildGameAchievementPath } from "@renderer/helpers"; -import { SPACING_UNIT, vars } from "@renderer/theme.css"; +import { SPACING_UNIT } from "@renderer/theme.css"; const fakeAchievements: UserAchievement[] = [ {