feat: living tab title and favicon follow the drive

This commit is contained in:
2026-10-11 11:18:47 +03:00
parent 989928c5bb
commit 4e097e5ef9
21 changed files with 596 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ import { useRouteLog } from '@/composables/useRouteLog';
import { useBillboard } from '@/composables/useBillboard';
import { useDashcam } from '@/composables/useDashcam';
import { useRelay } from '@/composables/useRelay';
import { useLivingTab } from '@/composables/useLivingTab';
import { assetUrl } from '@/content/asset-url';
import { signRouteFor } from '@/journey/sign-routes';
import { END_OF_SHIFT_SUBLINE } from '@/journey/dawn';
@@ -173,6 +174,16 @@ const dashcam = useDashcam({
sceneRunning: computed(() => sceneState.value === 'running'),
drift: () => actualQuality.value !== 'low' && matchMedia('(pointer: fine)').matches,
});
/* PARKING LIGHTS: the tab title and favicon follow the drive (after mount). */
useLivingTab({
routeProgress: () => journey.value.routeProgress,
activeSectionId: () => journey.value.activeSectionId,
label: () => sectionLabel(journey.value.activeSectionId),
arrived: () => journey.value.arrived,
dashcamOpen: dashcam.open,
animated: () => motion.policy.value.reason === 'full' && actualQuality.value !== 'static',
scenePending: () => motion.policy.value.allowSceneRequest && (sceneState.value === 'idle' || sceneState.value === 'loading'),
});
const activeSectionLabel = computed(() => sectionLabel(journey.value.activeSectionId));
const serverDefaultPolicy: MotionPolicy = {
allowSceneRequest: false,