mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
fix(cockpit): scope the centred phone row and keep Stories unread in Cockpit
The centred Display/Radio row now applies only inside the phone shell (720 px and below) on flight and bridge views; satellite and provider cockpits, narrow short windows (under 390x450) and very short windows (under 240 px) keep main's right-anchored place, so the row no longer lands on the desktop rail, orbital zoom, LOOK AHEAD, Reset or the Stories button. The row sizes to its launchers instead of spanning the width. The first-visit Stories announcement stays hidden and unread while Cockpit is open: a Stories tap that Cockpit refuses no longer marks it seen, so it shows again after Exit. The unit tests and the Cockpit QA cover the phone boundary, glyph and side taps, the destination cue, short and narrow windows and the announcement's return.
This commit is contained in:
1 parent
0c828095ad
commit
49785e423d
7 files changed
+204
-69
No files matched your search
+31
-12
@@ -78,7 +78,7 @@
|
||||
--cockpit-side-panel-width: min(340px, 28vw);
|
||||
/* HUD bottom offset + tallest scaled telemetry block + 20px clear border. */
|
||||
--cockpit-bottom-rail-safe: calc(clamp(84px, 11vh, 118px) + 100px);
|
||||
/* The phone Display/Radio row shares the visor inset with the roll scale. */
|
||||
/* The phone Display/Radio row shares the visor inset with the roll arc. */
|
||||
--cockpit-visor-top: clamp(62px, 9vh, 90px);
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
@@ -2026,6 +2026,11 @@ body.cockpit-mode
|
||||
) {
|
||||
display: none !important;
|
||||
}
|
||||
/* The first-visit Stories announcement waits, unread, until Cockpit closes:
|
||||
on a phone it would cover the Display/Radio row. */
|
||||
body.cockpit-mode #gev-stories #hPop {
|
||||
display: none;
|
||||
}
|
||||
body.cockpit-mode #left-panel-stack {
|
||||
z-index: 147;
|
||||
display: flex;
|
||||
@@ -2118,21 +2123,35 @@ body.cockpit-mode #intel-hud .hud-right-edge {
|
||||
body.cockpit-mode #right-context-rail {
|
||||
display: none !important;
|
||||
}
|
||||
/* Place the row just below the roll arc (visor inset + 2px + 96px).
|
||||
On shorter screens, leave 8px between the 42px row and the reticle
|
||||
(46% - 18px), keeping the row below the vision controls at 72px. */
|
||||
body.cockpit-mode .cockpit-utility-controls {
|
||||
top: clamp(72px, calc(46% - 68px), calc(var(--cockpit-visor-top) + 108px));
|
||||
top: auto;
|
||||
right: 12px;
|
||||
left: 12px;
|
||||
justify-content: center;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.cockpit-mode .cockpit-utility-controls {
|
||||
bottom: 152px;
|
||||
flex-direction: row;
|
||||
max-width: calc(100vw - 24px);
|
||||
}
|
||||
body.cockpit-mode .cockpit-utility-control {
|
||||
pointer-events: auto;
|
||||
/* Phone flight and bridge views: one row centred on the Reset/Exit axis,
|
||||
10px below the roll arc (.cockpit-roll-arc: 2px + 96px into the visor).
|
||||
Shorter screens reserve 36px around the 46% centre of .cockpit-reticle
|
||||
(about 25px tall on phones), plus an 8px gap below the 42px row.
|
||||
The row stops at 72px, below the vision controls. Windows under 240px
|
||||
tall, and narrow ones under 450px tall, keep the right-aligned row above
|
||||
Reset/Exit, clear of Reset, LOOK AHEAD and the Stories button, as do
|
||||
satellite and provider views. */
|
||||
@media (min-width: 390px) and (min-height: 240px), (min-height: 450px) {
|
||||
body.cockpit-mode.mobile-shell
|
||||
#cockpit-hud:not([data-generic]):not([data-subject='satellite'])
|
||||
.cockpit-utility-controls {
|
||||
top: clamp(
|
||||
72px,
|
||||
calc(46% - 68px),
|
||||
calc(var(--cockpit-visor-top) + 108px)
|
||||
);
|
||||
bottom: auto;
|
||||
left: 12px;
|
||||
width: max-content;
|
||||
margin-inline: auto;
|
||||
}
|
||||
}
|
||||
body.cockpit-mode .cockpit-utility-launcher {
|
||||
width: min(150px, calc((100vw - 31px) / 2));
|
||||
|
||||
Reference in new issue
Block a user