@@ -9,6 +9,7 @@ import { useAuthGuard } from '../../src/hooks/useAuthGuard';
99import useDeviceType from '../../src/hooks/useDeviceType' ;
1010import { useNavigation } from '../../src/context/NavigationContext' ;
1111import { useUser } from '@clerk/expo' ;
12+ import { useTelemetryUi } from '../../src/context/TelemetryUiContext' ;
1213import { getExpoWebBasePath } from '../../src/lib/expoWebBasePath' ;
1314
1415/** Href segment for Expo Router tab links (with optional GitHub Pages `experiments.baseUrl`). */
@@ -21,6 +22,7 @@ function tabHref(pathFromRoot) {
2122
2223export default function TabLayout ( ) {
2324 const { isDark } = useTheme ( ) ;
25+ const { openTelemetryQuickSettings } = useTelemetryUi ( ) ;
2426 const { isLoaded } = useAuthGuard ( ) ;
2527 const { user } = useUser ( ) ;
2628 const deviceType = useDeviceType ( ) ;
@@ -32,7 +34,7 @@ export default function TabLayout() {
3234 const isWebInfotainment = Platform . OS === 'web' && deviceType . isInfotainmentMode ;
3335 const isWebInfotainmentWithMap = isWebInfotainment && showInfotainmentMap ;
3436
35- // Classic dashboard + Account tab: large / infotainment only. Settings stays on the bar for phones & narrow web.
37+ // Fullscreen dashboard + Account tab: large / infotainment only. Settings stays on the bar for phones & narrow web.
3638 const showInfotainmentExtraTabs = deviceType . isInfotainmentMode ;
3739
3840 // Web uses standard Expo Router Tabs to avoid NativeTabs icon rasterization errors.
@@ -52,10 +54,11 @@ export default function TabLayout() {
5254 : `[role="tablist"] a[href="/"]::after` ;
5355 const tabRules = [
5456 `${ homeSelectors } { content: "Home"; }` ,
57+ `[role="tablist"] a[href="${ tabHref ( '/fullscreen-dashboard' ) } "]::after { content: "Dashboard"; }` ,
5558 `[role="tablist"] a[href="${ tabHref ( '/systems' ) } "]::after { content: "Systems"; }` ,
56- `[role="tablist"] a[href="${ tabHref ( '/classic-dashboard' ) } "]::after { content: "Classic"; }` ,
5759 `[role="tablist"] a[href="${ tabHref ( '/signal-search' ) } "]::after { content: "Signals"; }` ,
5860 `[role="tablist"] a[href="${ tabHref ( '/account' ) } "]::after { content: "Account"; }` ,
61+ `[role="tablist"] a[href="${ tabHref ( '/telemetry-source' ) } "]::after { content: "Telemetry source"; }` ,
5962 `[role="tablist"] a[href="${ tabHref ( '/profile' ) } "]::after { content: "Settings"; }` ,
6063 ] . join ( '\n ' ) ;
6164 style . textContent = `
@@ -163,14 +166,15 @@ export default function TabLayout() {
163166 } , [ isDark ] ) ;
164167
165168 return (
169+ < View style = { { flex : 1 } } >
166170 < Tabs
167171 screenOptions = { {
168172 headerShown : false ,
169173 sceneStyle : isDesktopSidebar
170174 ? {
171175 paddingBottom : 0 ,
172176 marginBottom : 0 ,
173- // Tab bar is position absolute, width 56 — inset scenes so content (e.g. Classic iframe) is not covered
177+ // Tab bar is position absolute, width 56 — inset scenes so content is not covered
174178 paddingLeft : 56 ,
175179 }
176180 : undefined ,
@@ -238,11 +242,11 @@ export default function TabLayout() {
238242 } }
239243 />
240244 < Tabs . Screen
241- name = "classic -dashboard"
245+ name = "fullscreen -dashboard"
242246 options = { {
243- title : 'Classic ' ,
247+ title : 'Dashboard ' ,
244248 href : showInfotainmentExtraTabs ? undefined : null ,
245- tabBarIcon : ( { color, size } ) => < Ionicons name = "speedometer -outline" size = { isDesktopSidebar ? 22 : size } color = { color } /> ,
249+ tabBarIcon : ( { color, size } ) => < Ionicons name = "grid -outline" size = { isDesktopSidebar ? 22 : size } color = { color } /> ,
246250 } }
247251 />
248252 < Tabs . Screen
@@ -294,6 +298,22 @@ export default function TabLayout() {
294298 ) ,
295299 } }
296300 />
301+ < Tabs . Screen
302+ name = "telemetry-source"
303+ listeners = { {
304+ tabPress : ( e ) => {
305+ e ?. preventDefault ?. ( ) ;
306+ openTelemetryQuickSettings ( ) ;
307+ } ,
308+ } }
309+ options = { {
310+ title : 'Telemetry source' ,
311+ href : showInfotainmentExtraTabs ? undefined : null ,
312+ tabBarIcon : ( { color, size } ) => (
313+ < Ionicons name = "pulse" size = { isDesktopSidebar ? 22 : size } color = { color } />
314+ ) ,
315+ } }
316+ />
297317 < Tabs . Screen
298318 name = "profile"
299319 options = { {
@@ -302,6 +322,7 @@ export default function TabLayout() {
302322 } }
303323 />
304324 </ Tabs >
325+ </ View >
305326 ) ;
306327 }
307328
@@ -333,11 +354,11 @@ export default function TabLayout() {
333354 } ) }
334355 </ NativeTabs . Trigger >
335356
336- < NativeTabs . Trigger name = "classic -dashboard" hidden = { ! showInfotainmentExtraTabs } >
337- < Label > Classic </ Label >
357+ < NativeTabs . Trigger name = "fullscreen -dashboard" hidden = { ! showInfotainmentExtraTabs } >
358+ < Label > Dashboard </ Label >
338359 { Platform . select ( {
339- ios : < Icon sf = { { default : 'speedometer ' , selected : 'speedometer ' } } /> ,
340- android : < Icon src = { < VectorIcon family = { Ionicons } name = "speedometer -outline" /> } /> ,
360+ ios : < Icon sf = { { default : 'square.grid.2x2 ' , selected : 'square.grid.2x2.fill ' } } /> ,
361+ android : < Icon src = { < VectorIcon family = { Ionicons } name = "grid -outline" /> } /> ,
341362 } ) }
342363 </ NativeTabs . Trigger >
343364
0 commit comments