Skip to content

Commit 7484fbe

Browse files
captkernelclaude
andcommitted
Dock: pin it whenever a window is open, auto-hide only on the star map
Previously the Linux/Windows dock always auto-hid and the macOS dock was always pinned. Now both skins behave the same: the dock stays visible while any window is open, and only peeks/reveals-on-hover on the empty star-map screen (all windows closed). - macOS dock visibility now driven by .dock-pinned/.up instead of a fixed transform, so it can peek on the star map too - body.dock-pinned pins the dock up in both skins - updateEmpty() toggles dock-pinned + dock up/down with the empty state - dockDown() is a no-op while pinned (mouseleave won't hide it) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 2bdde06 commit 7484fbe

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

index.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,9 @@
344344
body.macos .wbar .ctrls .c-x:hover{background:#ff5f57;color:rgba(0,0,0,.55);}
345345

346346
/* dock: translucent pill, rounded-square tiles, magnify (JS), label-on-hover */
347-
body.macos .dock{transform:translate(-50%,-12px);background:rgba(46,46,53,.5);backdrop-filter:blur(30px) saturate(1.6);-webkit-backdrop-filter:blur(30px) saturate(1.6);
347+
body.macos .dock{background:rgba(46,46,53,.5);backdrop-filter:blur(30px) saturate(1.6);-webkit-backdrop-filter:blur(30px) saturate(1.6);
348348
border:.5px solid rgba(255,255,255,.16);border-radius:22px;padding:.4rem .55rem;gap:.42rem;align-items:flex-end;
349-
box-shadow:0 18px 50px rgba(0,0,0,.5),inset 0 0 0 .5px rgba(255,255,255,.08);} /* always visible (no auto-hide) */
349+
box-shadow:0 18px 50px rgba(0,0,0,.5),inset 0 0 0 .5px rgba(255,255,255,.08);} /* visibility now driven by .dock-pinned / .up (peeks only on the star map) */
350350
body.macos .dock.up{border-radius:22px;}
351351
body.macos .dock{align-items:flex-end;}
352352
body.macos .dock .app{width:50px;height:50px;flex:none;border-radius:14px;color:#fff;font-size:1.3rem;
@@ -357,7 +357,9 @@
357357
/* magnification is JS-driven (resizes icons so the flex row reflows → grows up, no overlap) */
358358
body.macos .dock .app.run::before{bottom:-6px;width:4px;height:4px;background:rgba(255,255,255,.85);box-shadow:none;}
359359
body.macos .dock .sep{background:rgba(255,255,255,.18);}
360-
body.macos .wmctl{transform:translateY(0);opacity:1;pointer-events:auto;} /* always reachable (dock no longer auto-hides) */
360+
body.macos .wmctl{transform:translateY(0);opacity:1;pointer-events:auto;} /* always reachable */
361+
/* dock stays pinned (visible) in BOTH skins whenever a window is open; it auto-hides (peek + reveal) only on the star-map / empty screen */
362+
body.dock-pinned .dock{transform:translate(-50%,-12px);}
361363

362364
/* menu bar (top) — only in macOS mode */
363365
.menubar{display:none;}
@@ -1166,7 +1168,10 @@
11661168
if(window.gsap){gsap.ticker.add(patFrame);}else{patLoop();}}
11671169
function stopEmpty(){if(!patOn)return;patOn=false;emptyEl.classList.remove('show');
11681170
if(window.gsap)gsap.ticker.remove(patFrame);if(patRAF){cancelAnimationFrame(patRAF);patRAF=null;}}
1169-
function updateEmpty(){var vis=order.filter(function(o){return WIN[o]&&!WIN[o].min;}).length;if(vis===0)startEmpty();else stopEmpty();}
1171+
function updateEmpty(){var vis=order.filter(function(o){return WIN[o]&&!WIN[o].min;}).length;var empty=(vis===0);
1172+
document.body.classList.toggle('dock-pinned',!empty); /* dock pinned while a window is open; auto-hides only on the star map */
1173+
if(empty)startEmpty();else stopEmpty();
1174+
if(typeof dockEl!=='undefined'&&dockEl){if(empty)dockDown();else dockUp();}}
11701175
emptyEl.addEventListener('pointermove',function(e){patMouse.x=e.clientX;patMouse.y=e.clientY;});
11711176
emptyEl.addEventListener('pointerleave',function(){patMouse.x=-9999;patMouse.y=-9999;});
11721177

@@ -1250,7 +1255,7 @@
12501255
window.addEventListener('resize',function(){relayout();if(patOn)buildPat();});
12511256
/* dock auto-hide: peeks at the bottom; reveal on hovering the peek/strip, hide on leave */
12521257
var dockEl=document.querySelector('.dock'), dockPeek=document.getElementById('dockpeek'), wmctlEl=document.getElementById('wmctl');
1253-
function dockUp(){dockEl.classList.add('up');wmctlEl.classList.add('up');} function dockDown(){dockEl.classList.remove('up');wmctlEl.classList.remove('up');}
1258+
function dockUp(){dockEl.classList.add('up');wmctlEl.classList.add('up');} function dockDown(){if(document.body.classList.contains('dock-pinned'))return;dockEl.classList.remove('up');wmctlEl.classList.remove('up');}
12541259
dockPeek.addEventListener('mouseenter',dockUp);
12551260
dockEl.addEventListener('mouseenter',dockUp);
12561261
dockEl.addEventListener('mouseleave',dockDown);

0 commit comments

Comments
 (0)