diff --git a/web/khira/app.js b/web/khira/app.js index 18f9a26..35cce62 100644 --- a/web/khira/app.js +++ b/web/khira/app.js @@ -170,36 +170,38 @@ function initKubeLens() { let isDragging = false; let startX = 0, startY = 0; - let initialLeft = 240, initialTop = 180; + let curX = 240, curY = 180; + let rafId = null; lens.addEventListener('pointerdown', (e) => { if (e.target.closest('.kube-lens-close')) return; isDragging = true; lens.setPointerCapture(e.pointerId); - startX = e.clientX; - startY = e.clientY; - const rect = lens.getBoundingClientRect(); - initialLeft = rect.left; - initialTop = rect.top; + startX = e.clientX - curX; + startY = e.clientY - curY; lens.style.transition = 'none'; }); lens.addEventListener('pointermove', (e) => { if (!isDragging) return; - const dx = e.clientX - startX; - const dy = e.clientY - startY; const maxW = Math.max(window.innerWidth - 220, 0); const maxH = Math.max(window.innerHeight - 160, 0); - const newLeft = Math.max(0, Math.min(maxW, initialLeft + dx)); - const newTop = Math.max(0, Math.min(maxH, initialTop + dy)); - lens.style.left = `${newLeft}px`; - lens.style.top = `${newTop}px`; + curX = Math.max(0, Math.min(maxW, e.clientX - startX)); + curY = Math.max(0, Math.min(maxH, e.clientY - startY)); + if (!rafId) { + rafId = requestAnimationFrame(() => { + lens.style.transform = `translate3d(${curX}px, ${curY}px, 0)`; + rafId = null; + }); + } }); const stopDrag = (e) => { if (!isDragging) return; isDragging = false; try { lens.releasePointerCapture(e.pointerId); } catch(_) {} + if (rafId) { cancelAnimationFrame(rafId); rafId = null; } + lens.style.transform = `translate3d(${curX}px, ${curY}px, 0)`; lens.style.transition = 'transform 0.15s ease-out, box-shadow 0.2s ease'; }; @@ -235,9 +237,11 @@ async function logout(){ async function refresh(anim){ if(!S.u)return; const[t,s,n,e,es]=await Promise.all(['tickets','stats','notifications','errors','errors/stats'].map(p=>api('/khira/api/'+p))); - S.t=t.tickets||S.t;S.ts=s._f?S.ts:s;S.e=e.errors||S.e;S.es=es._f?S.es:es;S.n=n.notifications||S.n; + const newT=t.tickets||S.t,newTs=s._f?S.ts:s,newE=e.errors||S.e,newEs=es._f?S.es:es,newN=n.notifications||S.n; + const changed=anim||newT.length!==S.t.length||newE.length!==S.e.length||JSON.stringify(newTs)!==JSON.stringify(S.ts)||JSON.stringify(newEs)!==JSON.stringify(S.es); + S.t=newT;S.ts=newTs;S.e=newE;S.es=newEs;S.n=newN; $('#dot').hidden=!S.n.some(x=>!x.read); - render(anim); + if(changed)render(anim); } const render=a=>S.sec==='tickets'?renderT(a):renderE(a); const tile=(n,l,k)=>``; diff --git a/web/khira/index.html b/web/khira/index.html index 126af6d..08e977a 100644 --- a/web/khira/index.html +++ b/web/khira/index.html @@ -15,10 +15,10 @@ - + diff --git a/web/khira/styles.css b/web/khira/styles.css index b8f5ee8..779250c 100644 --- a/web/khira/styles.css +++ b/web/khira/styles.css @@ -49,25 +49,21 @@ --sc-hi: rgba(22, 30, 46, 0.8); --sc-hh: rgba(30, 41, 62, 0.9); - /* Optical Refraction & Specular Bevel Variables (Kube.io Magnifying Glass Pipeline) */ - --kube-glass-panel: url(#kube-glass-panel); - --kube-glass-pill: url(#kube-glass-pill); - --kube-glass-bar: url(#kube-glass-bar); - --kube-glass-mag: url(#kube-magnifying-glass-filter); - --glass-blur: var(--kube-glass-panel), blur(16px) saturate(180%); + /* Ultra-smooth GPU Composited Glass Variables */ + --glass-blur: blur(14px) saturate(180%) contrast(104%); --glass-shadow: - 0px 8px 32px rgba(0, 0, 0, 0.65), - inset 0px 2px 20px rgba(0, 0, 0, 0.4), - inset 0px -1px 2px rgba(255, 255, 255, 0.25); + 0px 8px 30px rgba(0, 0, 0, 0.65), + inset 0px 1.5px 1.5px rgba(255, 255, 255, 0.28), + inset 0px -1px 2px rgba(0, 0, 0, 0.75); --glass-shadow-hover: 0px 14px 44px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.18), - inset 0px 2px 24px rgba(0, 0, 0, 0.45), + inset 0px 2px 2px rgba(255, 255, 255, 0.45), inset 0px -1px 2px rgba(255, 255, 255, 0.35); --glass-shadow-lg: 0px 20px 60px rgba(0, 0, 0, 0.85), - inset 0px 2px 24px rgba(0, 0, 0, 0.4), - inset 0px -1px 2px rgba(255, 255, 255, 0.25); + inset 0px 2px 20px rgba(0, 0, 0, 0.35), + inset 0px -1px 2px rgba(255, 255, 255, 0.22); /* Prismatic Refraction Border Gradient */ --liquid-prism-border: linear-gradient( @@ -90,16 +86,26 @@ body { font: 400 14px/1.45 "Roboto Flex", Roboto, system-ui, sans-serif; background-color: var(--surf); + color: var(--on-s); + -webkit-font-smoothing: antialiased; + min-height: 100vh; + position: relative; +} + +body::before { + content: ""; + position: fixed; + inset: 0; + z-index: -1; + pointer-events: none; background-image: radial-gradient(circle at 14% 16%, rgba(16, 185, 129, 0.09) 0%, transparent 40%), radial-gradient(circle at 86% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 45%), radial-gradient(circle at 50% 85%, rgba(139, 92, 246, 0.07) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(244, 63, 94, 0.05) 0%, transparent 40%), linear-gradient(180deg, rgba(4, 6, 8, 0.98) 0%, #040608 100%); - background-attachment: fixed; - color: var(--on-s); - -webkit-font-smoothing: antialiased; - min-height: 100vh; + transform: translateZ(0); + will-change: transform; } [hidden] { display: none !important; } @@ -306,11 +312,8 @@ button { position: absolute; inset: 0; border-radius: inherit; - padding: 1.5px; - background: var(--liquid-prism-border); - -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); - -webkit-mask-composite: xor; - mask-composite: exclude; + border: 1px solid rgba(255, 255, 255, 0.12); + border-top: 1px solid rgba(255, 255, 255, 0.28); pointer-events: none; } .logo { @@ -441,11 +444,8 @@ button { position: absolute; inset: 0; border-radius: inherit; - padding: 1.5px; - background: var(--liquid-prism-border); - -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); - -webkit-mask-composite: xor; - mask-composite: exclude; + border: 1px solid rgba(255, 255, 255, 0.12); + border-top: 1px solid rgba(255, 255, 255, 0.28); pointer-events: none; } .search input { @@ -741,11 +741,8 @@ button { position: absolute; inset: 0; border-radius: inherit; - padding: 1.5px; - background: var(--liquid-prism-border); - -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); - -webkit-mask-composite: xor; - mask-composite: exclude; + border: 1px solid rgba(255, 255, 255, 0.1); + border-top: 1px solid rgba(255, 255, 255, 0.28); pointer-events: none; z-index: 2; transition: opacity 0.2s var(--e); @@ -812,11 +809,8 @@ button { position: absolute; inset: 0; border-radius: inherit; - padding: 1.5px; - background: var(--liquid-prism-border); - -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); - -webkit-mask-composite: xor; - mask-composite: exclude; + border: 1px solid rgba(255, 255, 255, 0.08); + border-top: 1px solid rgba(255, 255, 255, 0.22); pointer-events: none; z-index: 2; } @@ -975,11 +969,8 @@ dialog::backdrop { position: absolute; inset: 0; border-radius: inherit; - padding: 1.5px; - background: var(--liquid-prism-border); - -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); - -webkit-mask-composite: xor; - mask-composite: exclude; + border: 1px solid rgba(255, 255, 255, 0.12); + border-top: 1px solid rgba(255, 255, 255, 0.32); pointer-events: none; z-index: 2; } @@ -1625,8 +1616,8 @@ dd { word-break: break-word; } ══════════════════════════════════════════════════════════════════ */ .kube-lens-capsule { position: fixed; - top: 180px; - left: 240px; + top: 0; + left: 0; width: 210px; height: 150px; border-radius: 75px; @@ -1642,12 +1633,12 @@ dd { word-break: break-word; } user-select: none; -webkit-user-select: none; touch-action: none; - transform: translateZ(0); + transform: translate3d(240px, 180px, 0); + will-change: transform; transition: transform 0.15s ease-out, box-shadow 0.2s ease; } .kube-lens-capsule:active { cursor: grabbing; - transform: scale(1.05) translateZ(0); box-shadow: 0px 24px 68px rgba(0, 0, 0, 0.9), inset 0px 2px 28px rgba(0, 0, 0, 0.5), @@ -1709,21 +1700,3 @@ dd { word-break: break-word; } box-shadow: 0 0 16px rgba(16, 185, 129, 0.3); } -/* Kube.io Glass UI Components */ -.search { - backdrop-filter: url(#kube-glass-pill); - -webkit-backdrop-filter: url(#kube-glass-pill); -} -.bar, .nav { - backdrop-filter: url(#kube-glass-bar); - -webkit-backdrop-filter: url(#kube-glass-bar); -} -#dlg, #sheet, .ac { - backdrop-filter: url(#kube-glass-panel); - -webkit-backdrop-filter: url(#kube-glass-panel); -} -.fb, .fab, .chip.on, #btnLogAppErr, #btnLogMoreForApp { - backdrop-filter: url(#kube-glass-pill); - -webkit-backdrop-filter: url(#kube-glass-pill); -} -