feat: living tab title and favicon follow the drive
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user