-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Zoom control on mini map - Temp geofence create dialog
- Loading branch information
1 parent
a1f4fce
commit d8e3afe
Showing
6 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import * as React from 'react' | ||
import { | ||
Button, | ||
Dialog, | ||
DialogActions, | ||
DialogContent, | ||
Link, | ||
} from '@mui/material' | ||
import { useRaStore } from '@hooks/useRaStore' | ||
import Add from '@mui/icons-material/Add' | ||
|
||
export function CreateDialog() { | ||
const geofenceCreateDialog = useRaStore((state) => state.geofenceCreateDialog) | ||
const setRaStore = useRaStore((state) => state.setRaStore) | ||
|
||
return ( | ||
<Dialog | ||
open={geofenceCreateDialog} | ||
onClose={() => setRaStore('geofenceCreateDialog', false)} | ||
> | ||
<DialogContent> | ||
Creating a geofence from the admin panel is currently not supported. To | ||
create one or import from a file, please go to the{' '} | ||
<Link href="/map">map</Link> and open the "JSON Manager" from | ||
the side panel. | ||
</DialogContent> | ||
<DialogActions> | ||
<Button onClick={() => setRaStore('geofenceCreateDialog', false)}> | ||
Close | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
) | ||
} | ||
|
||
export default function GeofenceCreateButton() { | ||
const setRaStore = useRaStore((state) => state.setRaStore) | ||
|
||
return ( | ||
<> | ||
<Button | ||
color="primary" | ||
onClick={() => setRaStore('geofenceCreateDialog', true)} | ||
> | ||
<Add /> | ||
Create | ||
</Button> | ||
<CreateDialog /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters