From 155c193aae8672690d3e6c295a45f86f40ec2f3f Mon Sep 17 00:00:00 2001 From: Dauren777 Date: Mon, 1 Jun 2026 12:10:37 +0000 Subject: [PATCH] =?UTF-8?q?v22=20=E2=80=94=20=D0=98=D0=98-=D0=BF=D0=BE?= =?UTF-8?q?=D0=BC=D0=BE=D1=89=D0=BD=D0=B8=D0=BA=20=D0=B2=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=BE=D0=B5=D0=BD=20=D0=BD=D0=B0=D0=BF=D1=80=D1=8F=D0=BC=D1=83?= =?UTF-8?q?=D1=8E,=20=D0=B1=D0=B5=D0=B7=20=D0=BE=D0=B1=D1=85=D0=BE=D0=B4?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D0=BF=D1=83=D1=82=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 026702b..aa16bd7 100644 --- a/index.html +++ b/index.html @@ -132,8 +132,7 @@ label.file-btn{display:inline-block;background:#1a2332;padding:12px 20px;border- label.file-btn:active{background:#2a3342} input[type=file]{display:none} -.ai-helper{position:fixed;bottom:16px;right:16px;z-index:350;width:280px;max-width:90vw;background:var(--ink);border:1px solid #2a3342;border-radius:16px;overflow:hidden;box-shadow:0 8px 32px rgba(0,0,0,.5);transition:transform .3s;display:none} -.ai-helper.show{display:block} +.ai-helper{position:fixed;bottom:16px;right:16px;z-index:350;width:280px;max-width:90vw;background:var(--ink);border:1px solid #2a3342;border-radius:16px;overflow:hidden;box-shadow:0 8px 32px rgba(0,0,0,.5);transition:transform .3s} .ai-helper.minimized{transform:translateY(calc(100% - 44px))} .ai-helper .ai-hdr{background:var(--cyan);color:var(--ink);padding:8px 14px;font-weight:700;font-size:13px;display:flex;justify-content:space-between;align-items:center;cursor:pointer} .ai-helper .ai-hdr button{background:none;border:none;color:var(--ink);font-size:16px;cursor:pointer} @@ -548,19 +547,7 @@ function aiRegHint(step) { if (hints[step]) aiSay(hints[step], 'aiRegBody'); } -// Hook into showRegStep to show AI hints -const _origShowRegStep = showRegStep; -showRegStep = function(n) { - _origShowRegStep(n); - aiRegHint(n); -}; -// Hook into showPage for app AI -const _origShowPage = showPage; -showPage = function(page) { - _origShowPage(page); - setTimeout(() => showAIForTab(page), 400); -}; // Show AI assistant on login setTimeout(() => { @@ -605,6 +592,13 @@ function startReg(){ function backToLogin(){ document.getElementById('regScreen').classList.remove('active'); document.getElementById('loginScreen').classList.add('active'); + // Show AI helper on login + setTimeout(() => { + const ai = document.getElementById('aiAppHelper'); + if(ai) ai.classList.add('show'); + const aiReg = document.getElementById('aiRegHelper'); + if(aiReg) aiReg.classList.add('show'); + }, 500); } function showRegStep(n){ regStep=n; @@ -613,6 +607,7 @@ function showRegStep(n){ if(step){step.classList.add('active');step.querySelector('input,select')?.focus()} document.getElementById('stepNum').textContent=n; updateStepDots(); + setTimeout(() => aiRegHint(n), 200); } function buildStepDots(){ let h=''; for(let i=1;i<=8;i++)h+=`
`; @@ -748,6 +743,7 @@ function showPage(page){ currentPage=page; document.querySelectorAll('.nav-item').forEach(n=>n.classList.toggle('active',n.dataset.page===page)); renderPage(); + setTimeout(() => showAIForTab(page), 300); } function renderPage(){ if(isAdmin()){ @@ -1503,6 +1499,13 @@ function doLogout(){ currentUser=null;currentChat=null; document.getElementById('appScreen').classList.remove('active'); document.getElementById('loginScreen').classList.add('active'); + // Show AI helper on login + setTimeout(() => { + const ai = document.getElementById('aiAppHelper'); + if(ai) ai.classList.add('show'); + const aiReg = document.getElementById('aiRegHelper'); + if(aiReg) aiReg.classList.add('show'); + }, 500); document.getElementById('lUser').value='';document.getElementById('lPass').value=''; } @@ -1525,6 +1528,13 @@ function renderAll(){ // === INIT === if('serviceWorker'in navigator)navigator.serviceWorker.register('sw.js').catch(()=>{}); document.getElementById('loginScreen').classList.add('active'); + // Show AI helper on login + setTimeout(() => { + const ai = document.getElementById('aiAppHelper'); + if(ai) ai.classList.add('show'); + const aiReg = document.getElementById('aiRegHelper'); + if(aiReg) aiReg.classList.add('show'); + }, 500);