mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 05:21:15 +00:00
feat(mobile): the assistant is an entry of the dock, sorted like the pages
The home assistant sat behind the More button on every page outside a trip, so a dock with free slots showed "..." for a single entry. It is now an entry of the dock list while its addon is on and it can run for the user: an account that never sorted its dock gets it in a slot the addons leave free, and Settings > Appearance > Mobile can move it between the bar and More like any page.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useNavItems, splitMobileNav, MOBILE_NAV_MAX_BAR, type NavItemDef } from '../Layout/navItems'
|
||||
import { useDockNavItems, splitMobileNav, MOBILE_NAV_MAX_BAR, type NavItemDef } from '../Layout/navItems'
|
||||
|
||||
export interface MobileNavValue {
|
||||
bar: string[]
|
||||
@@ -36,7 +36,7 @@ export function useMobileNavEditor(
|
||||
value: MobileNavValue,
|
||||
onChange: (next: MobileNavValue) => void,
|
||||
): MobileNavEditor {
|
||||
const items = useNavItems()
|
||||
const items = useDockNavItems()
|
||||
const split = splitMobileNav(items, value)
|
||||
const dashboard = split.bar.find((i) => i.id === 'dashboard')
|
||||
const barItems = split.bar.filter((i) => i.id !== 'dashboard')
|
||||
|
||||
Reference in New Issue
Block a user