35d46f532a
- electron/epic.ts: auto-detect Epic Games from Manifests/*.item (skip DLCs) - electron/favorites.ts: persist favorites + recent (last 20) in userData - electron/steam.ts: replace winreg callbacks with reg query execSync + fallback paths - electron: new IPC handlers — favorites:get/toggle, recent:get; launch tracks recent - UI: star button on cards (favorites), sort A→Z/Z→A toggle, skeleton loading, fade-in card animation, Epic/Favorites/Recent filter tabs, SVG placeholder with initials Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
522 B
TypeScript
20 lines
522 B
TypeScript
import { shell } from 'electron'
|
|
import { spawn } from 'child_process'
|
|
|
|
export function launchSteamGame(appid: string): void {
|
|
shell.openExternal(`steam://rungameid/${appid}`)
|
|
}
|
|
|
|
export function launchEpicGame(appName: string): void {
|
|
shell.openExternal(`com.epicgames.launcher://apps/${appName}?action=launch&silent=true`)
|
|
}
|
|
|
|
export function launchExe(exe: string, args: string[] = []): void {
|
|
const child = spawn(exe, args, {
|
|
detached: true,
|
|
stdio: 'ignore',
|
|
windowsHide: false,
|
|
})
|
|
child.unref()
|
|
}
|