mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +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
@@ -6,6 +6,33 @@ import { createPinia } from 'pinia';
|
||||
import { useStoriesStore } from './stores/stories.js';
|
||||
import { storyById } from '../stories/catalog.js';
|
||||
import StoryScreen from './views/stories/StoryScreen.vue';
|
||||
import StoriesView from './views/StoriesView.vue';
|
||||
|
||||
test('the announcement stays unread when a lazy Stories open resolves to false', async (t) => {
|
||||
const host = document.body.appendChild(document.createElement('div'));
|
||||
const pinia = createPinia();
|
||||
const store = useStoriesStore(pinia);
|
||||
let allowed = false;
|
||||
store.connect({ open: async () => allowed });
|
||||
const app = createApp(StoriesView).use(pinia);
|
||||
app.mount(host);
|
||||
t.after(() => {
|
||||
app.unmount();
|
||||
host.remove();
|
||||
localStorage.removeItem('gevStoriesPopSeen');
|
||||
});
|
||||
|
||||
const entry = host.querySelector('#hStories');
|
||||
entry.click();
|
||||
await nextTick();
|
||||
assert.equal(localStorage.getItem('gevStoriesPopSeen'), null);
|
||||
assert.ok(host.querySelector('#hPop'));
|
||||
|
||||
allowed = true;
|
||||
entry.click();
|
||||
await nextTick();
|
||||
assert.equal(localStorage.getItem('gevStoriesPopSeen'), '1');
|
||||
});
|
||||
|
||||
test('the story screen previews a drag and seeks once on release', async (t) => {
|
||||
const host = document.body.appendChild(document.createElement('div'));
|
||||
|
||||
Reference in new issue
Block a user