From ebf4c9f07f3569ed73ed4f1e3116f15399658c50 Mon Sep 17 00:00:00 2001 From: chyoo Date: Wed, 1 Jul 2026 17:20:22 +0900 Subject: [PATCH] update launcher app api config --- src/renderer/src/config/apps.ts | 2 +- src/renderer/src/pages/AppView.tsx | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/config/apps.ts b/src/renderer/src/config/apps.ts index bfc423e..5dc0ce3 100644 --- a/src/renderer/src/config/apps.ts +++ b/src/renderer/src/config/apps.ts @@ -33,7 +33,7 @@ export const FALLBACK_APPS: LauncherApp[] = [ displayName: 'LMS', description: '자율주행 교육 과정, 실습 콘텐츠, 사용자 학습 이력을 통합 관리하는 학습 관리 시스템입니다.', subtitle: '자율주행 교육 콘텐츠\n학습 관리 시스템', - videoPath: '/video/lms.mp4', + videoPath: './video/lms.mp4', iconKey: 'graduation', launchUrl: 'http://localhost:5176', devAppPath: './apps/lms/lms-fe', diff --git a/src/renderer/src/pages/AppView.tsx b/src/renderer/src/pages/AppView.tsx index 2ce7322..8edf43f 100644 --- a/src/renderer/src/pages/AppView.tsx +++ b/src/renderer/src/pages/AppView.tsx @@ -2,6 +2,13 @@ import type { LauncherApp } from '../config/apps' const DEFAULT_DETAIL_URL = 'https://www.futuredrive.net/solutions/astudio' +function resolvePackagedAssetPath(path?: string | null): string | null { + if (!path) return null + if (/^(https?:|file:|data:|blob:)/i.test(path)) return path + if (path.startsWith('/video/')) return `.${path}` + return path +} + interface AppViewProps { app: LauncherApp isRunning: boolean @@ -17,6 +24,7 @@ function AppView({ app, isRunning, onShowManual, onFocusApp, onCloseApp }: AppVi const appTitle = titleRest ? <>{titleFirst}
{titleRest} : {titleFirst} + const videoPath = resolvePackagedAssetPath(app.videoPath) if (isRunning) { return ( @@ -62,12 +70,12 @@ function AppView({ app, isRunning, onShowManual, onFocusApp, onCloseApp }: AppVi
{/* 비디오 배경 */} - {app.videoPath && ( + {videoPath && ( <>