mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 15:17:30 +00:00
feat(managed): an install's own admin tabs on the phone too
The mobile admin never read managedAdminTabs, so a tab an install attaches there (managed/index.tsx) existed on the desktop only. The phone's section picker now lists them after the built-in sections, as the desktop sidebar does, and shows `mobileElement` when a tab brings a phone layout of its own, else its desktop `element`. TREK itself attaches nothing; the seam stays empty.
This commit is contained in:
@@ -78,6 +78,12 @@ export interface ManagedAdminTab {
|
||||
group?: 'users' | 'config' | 'integration' | 'maintenance'
|
||||
/** Rendered in the tab body. /admin already requires an admin to get here. */
|
||||
element: ReactElement
|
||||
/**
|
||||
* The same tab laid out for a phone, in the mobile admin's section picker.
|
||||
* Without it the phone shows `element`, which then has to hold up on a narrow
|
||||
* screen by itself.
|
||||
*/
|
||||
mobileElement?: ReactElement
|
||||
}
|
||||
|
||||
/** Extra protected routes. Spread into the router next to the built-in ones. */
|
||||
|
||||
Reference in New Issue
Block a user