mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
Mobile: Panes: larger items
This commit is contained in:
@@ -5,6 +5,7 @@ import { Box, List, Sheet, styled } from '@mui/joy';
|
||||
|
||||
import { NavItemApp } from '~/common/app.nav';
|
||||
import { themeScalingMap, themeZIndexDesktopPanel } from '~/common/app.theme';
|
||||
import { useIsMobile } from '~/common/components/useMatchMedia';
|
||||
import { useUIContentScaling } from '~/common/stores/store-ui';
|
||||
|
||||
import { PanelContentPortal } from './PanelContentPortal';
|
||||
@@ -64,7 +65,9 @@ const sheetClosedSx: SxProps = {
|
||||
export function DesktopPanel(props: { component: React.ElementType, currentApp?: NavItemApp }) {
|
||||
|
||||
// external state
|
||||
const contentScaling = useUIContentScaling();
|
||||
const isMobile = useIsMobile();
|
||||
const _contentScaling = useUIContentScaling();
|
||||
const contentScaling = isMobile ? 'md' : _contentScaling;
|
||||
const { panelShownAsPanel: isOpen, panelAsPopup } = useOptimaPanelOpen(false, props.currentApp);
|
||||
|
||||
// Close the panel if the current page goes for a popup instead
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Box, Checkbox, MenuList } from '@mui/joy';
|
||||
|
||||
import { ExpanderControlledBox } from '~/common/components/ExpanderControlledBox';
|
||||
import { themeScalingMap } from '~/common/app.theme';
|
||||
import { useIsMobile } from '~/common/components/useMatchMedia';
|
||||
import { useUIContentScaling } from '~/common/stores/store-ui';
|
||||
|
||||
import { OPTIMA_PANEL_GROUPS_SPACING } from '../optima.config';
|
||||
@@ -97,7 +98,9 @@ export function OptimaPanelGroupedList(props: {
|
||||
const [_expanded, setExpanded] = React.useState(props.startExpanded === true);
|
||||
|
||||
// external state
|
||||
const contentScaling = useUIContentScaling();
|
||||
const isMobile = useIsMobile();
|
||||
const _contentScaling = useUIContentScaling();
|
||||
const contentScaling = isMobile ? 'md' : _contentScaling;
|
||||
|
||||
// derived state
|
||||
const isCollapsible = !!props.persistentCollapsibleId;
|
||||
|
||||
Reference in New Issue
Block a user