fix(ui): 절대경로 → 상대경로 (프리뷰/프록시 환경에서 screens.js·API 404 수정)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
hyeongwoo-choi 2026-07-20 02:45:37 +00:00
parent 844a1d50fc
commit b484d79845

View file

@ -84,7 +84,13 @@
</div>
</div>
<script src="/ui/screens.js"></script>
<script src="ui/screens.js"></script>
<script>
/* screens.js 로드 가드: 프록시/경로 문제로 실패 시 상대경로 재시도 후 에러 표기 */
if (typeof SVC_SCREENS === 'undefined') {
document.getElementById && (window.__needScreens = true);
}
</script>
<script>
/* ───────── 공통: 필드 한글 라벨 / 기본값 ───────── */
const today = new Date().toISOString().slice(0,10).replace(/-/g,'');
@ -225,7 +231,7 @@ async function execute() {
});
setStatus(`tpcall("${s.svc}") 호출 중 ...`);
let j;
try { j = await (await fetch('/api/call?' + p.toString())).json(); }
try { j = await (await fetch('api/call?' + p.toString())).json(); }
catch (e) { j = { ok:false, error: String(e) }; }
const g = document.getElementById('resgrid');