feat: optional provider

This commit is contained in:
DarkSky
2022-08-12 16:54:47 +08:00
parent 57b8263acd
commit edfa95057b
11 changed files with 267 additions and 85 deletions
+1 -7
View File
@@ -46,7 +46,7 @@ const requestPermission = async (workspace: string) => {
};
export const FileSystem = (props: { onError: () => void }) => {
const onSelected = useLocalTrigger();
const [, onSelected] = useLocalTrigger();
const apiSupported = useMemo(() => {
try {
@@ -56,12 +56,6 @@ export const FileSystem = (props: { onError: () => void }) => {
}
}, []);
useEffect(() => {
if (process.env['NX_E2E']) {
onSelected();
}
}, []);
return (
<MuiButton
variant="outlined"
+1 -2
View File
@@ -21,7 +21,7 @@ export function Login() {
<MuiSnackbar
anchorOrigin={{ vertical: 'top', horizontal: 'right' }}
open={error}
message="Login failed, please check if you have permission"
message="Request File Permission failed, please check if you have permission"
/>
<MuiGrid item xs={8}>
<Error
@@ -32,7 +32,6 @@ export function Login() {
</MuiGrid>
<MuiGrid item xs={4}>
{' '}
<MuiBox
style={{
display: 'flex',