From eecb2729632a33028e94304581311731df5c8572 Mon Sep 17 00:00:00 2001 From: "basel.issmail" Date: Thu, 10 Jun 2021 15:40:23 +0300 Subject: [PATCH 01/26] Import google sheet icon --- src/components/atoms/Icon/icons.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/atoms/Icon/icons.ts b/src/components/atoms/Icon/icons.ts index 1f2e82b3a..a06f127a5 100644 --- a/src/components/atoms/Icon/icons.ts +++ b/src/components/atoms/Icon/icons.ts @@ -23,6 +23,7 @@ import Dataset from "./Icons/datasetIcon.svg"; import DatasetAdd from "./Icons/datasetAdd.svg"; import File from "./Icons/fileIcon.svg"; import PcIcon from "./Icons/pcIcon.svg"; +import GoogleDriveIcon from "./Icons/googleDriveIcon.svg"; // Asset import AssetGrid from "./Icons/assetGrid.svg"; @@ -129,6 +130,7 @@ export default { dataset: Dataset, datasetAdd: DatasetAdd, file: File, + googleDrive: GoogleDriveIcon, computer: PcIcon, assetGrid: AssetGrid, assetGridSmall: AssetGridSmall, From 081df6074f4985e6a719eb508ef23ce1e5f2a39e Mon Sep 17 00:00:00 2001 From: "basel.issmail" Date: Thu, 10 Jun 2021 15:51:16 +0300 Subject: [PATCH 02/26] Add import from google drive option --- .../EarthEditor/DatasetPane/DatasetModal/index.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/molecules/EarthEditor/DatasetPane/DatasetModal/index.tsx b/src/components/molecules/EarthEditor/DatasetPane/DatasetModal/index.tsx index fe520d018..a185d725f 100644 --- a/src/components/molecules/EarthEditor/DatasetPane/DatasetModal/index.tsx +++ b/src/components/molecules/EarthEditor/DatasetPane/DatasetModal/index.tsx @@ -81,6 +81,16 @@ const DatasetModal: React.FC = ({ borderColor={colors.outline.weak} onClick={onSelectCsvFile} /> + ) : ( From 8b9f25911b951373c5b4134254e4b95e98206dfb Mon Sep 17 00:00:00 2001 From: "basel.issmail" Date: Thu, 10 Jun 2021 16:16:43 +0300 Subject: [PATCH 03/26] Add import from google drive second view --- .../DatasetPane/DatasetModal/Gdrive/index.tsx | 68 +++++++++++++++++++ .../DatasetPane/DatasetModal/index.tsx | 22 ++++-- 2 files changed, 83 insertions(+), 7 deletions(-) create mode 100644 src/components/molecules/EarthEditor/DatasetPane/DatasetModal/Gdrive/index.tsx diff --git a/src/components/molecules/EarthEditor/DatasetPane/DatasetModal/Gdrive/index.tsx b/src/components/molecules/EarthEditor/DatasetPane/DatasetModal/Gdrive/index.tsx new file mode 100644 index 000000000..0fc76dfa6 --- /dev/null +++ b/src/components/molecules/EarthEditor/DatasetPane/DatasetModal/Gdrive/index.tsx @@ -0,0 +1,68 @@ +import React from "react"; +import { useIntl } from "react-intl"; +import { styled, useTheme } from "@reearth/theme"; + +import Icon from "@reearth/components/atoms/Icon"; +import Flex from "@reearth/components/atoms/Flex"; +import Loading from "@reearth/components/atoms/Loading"; +import Divider from "@reearth/components/atoms/Divider"; +import Text from "@reearth/components/atoms/Text"; +import { metricsSizes } from "@reearth/theme/metrics"; +import Button from "@reearth/components/atoms/Button"; + +export type Props = { + onReturn: () => void; + syncLoading: boolean; +}; + +const Gdrive: React.FC = ({ onReturn, syncLoading }) => { + const intl = useIntl(); + const theme = useTheme(); + + return ( + <> + + {syncLoading ? ( + + ) : ( + <> + + + + {intl.formatMessage({ defaultMessage: "Connect with Google Drive" })} + + + + + + {intl.formatMessage({ + defaultMessage: "Re:earth supports Google Sheets, and CSV file to upload.", + })} + + + +