@@ -15,6 +15,7 @@ import { CreateMirabuf } from "@/mirabuf/MirabufSceneObject"
15
15
import { Box } from "@mui/material"
16
16
import { ToggleButton , ToggleButtonGroup } from "@/ui/components/ToggleButtonGroup"
17
17
import { usePanelControlContext } from "@/ui/PanelContext"
18
+ import { useModalControlContext } from "@/ui/ModalContext"
18
19
import TaskStatus from "@/util/TaskStatus"
19
20
import {
20
21
PositiveButton ,
@@ -23,9 +24,11 @@ import {
23
24
DeleteButton ,
24
25
RefreshButton ,
25
26
SynthesisIcons ,
27
+ Spacer ,
26
28
} from "@/ui/components/StyledComponents"
27
29
import { ProgressHandle } from "@/ui/components/ProgressNotificationData"
28
30
import Panel , { PanelPropsImpl } from "@/ui/components/Panel"
31
+ import Button from "@/ui/components/Button"
29
32
30
33
interface ItemCardProps {
31
34
id : string
@@ -100,6 +103,7 @@ function SpawnCachedMira(info: MirabufCacheInfo, type: MiraType, progressHandle?
100
103
const ImportMirabufPanel : React . FC < PanelPropsImpl > = ( { panelId } ) => {
101
104
const { showTooltip } = useTooltipControlContext ( )
102
105
const { closePanel, openPanel } = usePanelControlContext ( )
106
+ const { openModal } = useModalControlContext ( )
103
107
104
108
const [ cachedRobots , setCachedRobots ] = useState ( GetCacheInfo ( MiraType . ROBOT ) )
105
109
const [ cachedFields , setCachedFields ] = useState ( GetCacheInfo ( MiraType . FIELD ) )
@@ -378,6 +382,10 @@ const ImportMirabufPanel: React.FC<PanelPropsImpl> = ({ panelId }) => {
378
382
</ SectionLabel >
379
383
< SectionDivider />
380
384
{ cachedFieldElements }
385
+ { Spacer ( 5 ) }
386
+ < Box alignSelf = { "center" } >
387
+ < Button value = "Import from File" onClick = { ( ) => openModal ( "import-local-mirabuf" ) } />
388
+ </ Box >
381
389
</ >
382
390
) }
383
391
< Box
@@ -419,6 +427,9 @@ const ImportMirabufPanel: React.FC<PanelPropsImpl> = ({ panelId }) => {
419
427
{ remoteFieldElements }
420
428
</ >
421
429
) }
430
+ < Box alignSelf = { "center" } >
431
+ < Button value = "Import from File" onClick = { ( ) => openModal ( "import-local-mirabuf" ) } />
432
+ </ Box >
422
433
</ div >
423
434
</ Panel >
424
435
)
0 commit comments