From 77d14e673fa4d997808c7d90d76546a7d89c6721 Mon Sep 17 00:00:00 2001 From: OpenClaw Bot Date: Tue, 17 Feb 2026 18:36:30 +0800 Subject: [PATCH] fix: expose modal functions to window object --- frontend/index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/index.html b/frontend/index.html index a72cb19..f47f29c 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -257,12 +257,16 @@ document.getElementById('modal').classList.add('show'); } + window.showModal = showModal; + function hideModal() { document.getElementById('modal').classList.remove('show'); document.getElementById('projectName').value = ''; document.getElementById('projectDesc').value = ''; } + window.hideModal = hideModal; + async function createProject() { const name = document.getElementById('projectName').value.trim(); const desc = document.getElementById('projectDesc').value.trim(); @@ -289,12 +293,15 @@ } } + window.createProject = createProject; + function enterProject(projectId) { - // Store selected project and redirect to workbench localStorage.setItem('currentProject', projectId); window.location.href = '/workbench.html'; } + window.enterProject = enterProject; + // Close modal on overlay click document.getElementById('modal').addEventListener('click', (e) => { if (e.target.id === 'modal') hideModal();