summaryrefslogtreecommitdiff
path: root/components/Tweaks/BehaviorPanel.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-10-05 12:35:40 +0200
committerThomas F. K. Jorna <[email protected]>2021-10-05 12:35:40 +0200
commit33839479e269bed905f9eefc374060b9d3ee7e19 (patch)
treef628200a10e5e37aa00f05cea2464eaf67df9581 /components/Tweaks/BehaviorPanel.tsx
parentb0ddf286f087b31dc75626f709cfce3889de25dd (diff)
feat(preview): filesystem basics in place
Diffstat (limited to 'components/Tweaks/BehaviorPanel.tsx')
-rw-r--r--components/Tweaks/BehaviorPanel.tsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/components/Tweaks/BehaviorPanel.tsx b/components/Tweaks/BehaviorPanel.tsx
index 0c22e1a..27906c5 100644
--- a/components/Tweaks/BehaviorPanel.tsx
+++ b/components/Tweaks/BehaviorPanel.tsx
@@ -10,12 +10,15 @@ import {
StackDivider,
VStack,
Text,
+ Box,
} from '@chakra-ui/react'
import React from 'react'
import { initialBehavior, initialMouse } from '../config'
import { InfoTooltip } from './InfoTooltip'
import { SliderWithInfo } from './SliderWithInfo'
+import { checkFileSystemCompatibility } from '../../util/checkFileSystemCompatibility'
+
export interface BehaviorPanelProps {
behavior: typeof initialBehavior
setBehavior: any
@@ -163,6 +166,20 @@ export const BehaviorPanel = (props: BehaviorPanelProps) => {
onChange={(value) => setBehavior({ ...behavior, zoomPadding: value })}
infoText="How much to zoom out to accomodate all nodes when changing the view."
/>
+
+ <Box>
+ <Button width="100%" isDisabled={!checkFileSystemCompatibility()}>
+ Grant Filesystem Access
+ </Button>
+ {!checkFileSystemCompatibility() && (
+ <Box bg="gray.600" width="100%" padding={5}>
+ <Text>
+ You are not using a browser compatible with the FileSystem Access API. Only Chromium
+ based browsers are currently supported.
+ </Text>
+ </Box>
+ )}
+ </Box>
</VStack>
)
}