From f9961857cfd092cc01fa96634cb9ef10bee7c9e8 Mon Sep 17 00:00:00 2001 From: Igor Shadurin Date: Thu, 17 Aug 2023 12:03:01 +0300 Subject: [PATCH 01/25] fix: blur when theme not chosen --- src/styles/globals.scss | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/styles/globals.scss b/src/styles/globals.scss index 9ec3f679..17330da6 100644 --- a/src/styles/globals.scss +++ b/src/styles/globals.scss @@ -305,11 +305,9 @@ scrollbar-width: none; /* Firefox */ } -.light { - .blurred-text { - color: transparent; - text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); - } +.blurred-text { + color: transparent; + text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); } .dark { From aba38edb3faced4a786d07059a0b9618ea1a7feb Mon Sep 17 00:00:00 2001 From: Not Darko <93942788+darkobas2@users.noreply.github.com> Date: Fri, 6 Oct 2023 23:59:26 +0200 Subject: [PATCH 02/25] Update swarm.yml --- .github/workflows/swarm.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/swarm.yml b/.github/workflows/swarm.yml index 0c0d1dbf..5bba28f3 100644 --- a/.github/workflows/swarm.yml +++ b/.github/workflows/swarm.yml @@ -62,6 +62,7 @@ jobs: bee-url: ${{ env.SWARM_URL }} dir: ./out index-document: index.html + pin: true timeout: 200000 - name: update feed id: swarm-feed @@ -71,7 +72,7 @@ jobs: with: bee-url: ${{ env.SWARM_URL }} reference: ${{ steps.swarm-upload.outputs.reference }} - topic: consents + topic: theapp signer: ${{ secrets[env.SIGNER] }} - name: get CID id: swarm-cid From e70587ebd489c562f66915d406431b03444419a1 Mon Sep 17 00:00:00 2001 From: darkobas Date: Sat, 7 Oct 2023 01:22:45 +0200 Subject: [PATCH 03/25] [ci] seperate swarm vars --- .github/workflows/swarm.yml | 2 +- .github/workflows/variables.json | 66 ++++++++++++++++++++++++++++++-- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/.github/workflows/swarm.yml b/.github/workflows/swarm.yml index 5bba28f3..c2097a06 100644 --- a/.github/workflows/swarm.yml +++ b/.github/workflows/swarm.yml @@ -23,7 +23,7 @@ jobs: - name: Set environment specific variables uses: jnus/json-variables@v1.0 with: - scope: ${{ github.ref_name }} + scope: "swarm" configFile: '.github/workflows/variables.json' secrets: '${{ toJson(secrets.github_token) }}' diff --git a/.github/workflows/variables.json b/.github/workflows/variables.json index 672404bd..47ab125c 100644 --- a/.github/workflows/variables.json +++ b/.github/workflows/variables.json @@ -6,7 +6,8 @@ "Scope": { "Environment": [ "master", - "main" + "main", + "swarm" ] } }, @@ -74,6 +75,15 @@ ] } }, + { + "Name": "NEXT_PUBLIC_FAIRDRIVEHOST", + "Value": "https://app.fairdrive.io", + "Scope": { + "Environment": [ + "swarm" + ] + } + }, { "Name": "NEXT_PUBLIC_FAIRDRIVEHOST", "Value": "https://fairdrive#{DEPLOYMENT}fairdatasociety.org", @@ -103,17 +113,65 @@ { "Name": "NEXT_PUBLIC_CREATE_ACCOUNT_REDIRECT", "Value": "https://create#{DEPLOYMENT}fairdatasociety.org", - "Scope": {} + "Scope": { + "Environment": [ + "main", + "master", + "staging", + "development" + ] + } + }, + { + "Name": "NEXT_PUBLIC_CREATE_ACCOUNT_REDIRECT", + "Value": "https://create.faridrive.io", + "Scope": { + "Environment": [ + "swarm" + ] + } }, { "Name": "NEXT_PUBLIC_NFT_GENERATOR_URL", "Value": "https://nft#{DEPLOYMENT}fairdatasociety.org", - "Scope": {} + "Scope": { + "Environment": [ + "main", + "master", + "staging", + "development" + ] + } + }, + { + "Name": "NEXT_PUBLIC_NFT_GENERATOR_URL", + "Value": "https://nft.fairdrive.io", + "Scope": { + "Environment": [ + "swarm" + ] + } }, { "Name": "NEXT_PUBLIC_CONSENT_VIEWER", "Value": "https://app.crviewer#{DEPLOYMENT}fairdatasociety.org", - "Scope": {} + "Scope": { + "Environment": [ + "main", + "master", + "staging", + "development" + ] + } + }, + { + "Name": "NEXT_PUBLIC_CONSENT_VIEWER", + "Value": "https://crviewer.fairdrive.org", + "Scope": { + "Environment": [ + "swarm" + ] + } }, { "Name": "NEXT_PUBLIC_BLOCKCHAIN_INFO", From 5119598857c73c2b96411ad3e452a2000bc509b4 Mon Sep 17 00:00:00 2001 From: darkobas Date: Sat, 7 Oct 2023 01:25:09 +0200 Subject: [PATCH 04/25] [skip-ci] swarm: run only on master --- .github/workflows/swarm.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/swarm.yml b/.github/workflows/swarm.yml index c2097a06..2d703468 100644 --- a/.github/workflows/swarm.yml +++ b/.github/workflows/swarm.yml @@ -4,8 +4,6 @@ on: push: branches: - master - - development - - staging jobs: build: From 80597240500de73dea61f2ecf08c26afce220eb2 Mon Sep 17 00:00:00 2001 From: darkobas Date: Sat, 7 Oct 2023 01:35:56 +0200 Subject: [PATCH 05/25] [ci] swarm: fix bee url fix derp --- .github/workflows/variables.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/variables.json b/.github/workflows/variables.json index 47ab125c..e1cc6871 100644 --- a/.github/workflows/variables.json +++ b/.github/workflows/variables.json @@ -101,7 +101,8 @@ "main", "master", "staging", - "development" + "development", + "swarm" ] } }, @@ -124,7 +125,7 @@ }, { "Name": "NEXT_PUBLIC_CREATE_ACCOUNT_REDIRECT", - "Value": "https://create.faridrive.io", + "Value": "https://create.fairdrive.io", "Scope": { "Environment": [ "swarm" From 4f75a9f878502e659d519d45858cf36afe0a5192 Mon Sep 17 00:00:00 2001 From: darkobas Date: Sun, 8 Oct 2023 00:22:37 +0200 Subject: [PATCH 06/25] [skip ci] swarm: change cache purge site for swarm --- .github/workflows/swarm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swarm.yml b/.github/workflows/swarm.yml index 2d703468..bdcae3f3 100644 --- a/.github/workflows/swarm.yml +++ b/.github/workflows/swarm.yml @@ -87,4 +87,4 @@ jobs: env: TOKEN: '${{ secrets.purge_token }}' run: | - curl -s ${{ env.PURGE_URL }}/deploy/purge?token=${{ secrets.purge_token }} -H "site: app.fairdrive${{ env.DEPLOYMENT }}fairdatasociety.org" -H "uri: " + curl -s ${{ env.PURGE_URL }}/deploy/purge?token=${{ secrets.purge_token }} -H "site: app.fairdrive${{ env.DEPLOYMENT }}io" -H "uri: /" From 74b489880469e8c70d458c83ae5252fa167489ad Mon Sep 17 00:00:00 2001 From: tamas6 <81620050+tamas6@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:06:01 +0100 Subject: [PATCH 07/25] feat: docs update --- docs/CONTACT.md | 10 +++------- docs/GETTING-STARTED.md | 18 +++++++++++++++--- docs/USER-GUIDE.md | 24 +++++++++++++++--------- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/docs/CONTACT.md b/docs/CONTACT.md index f33c498e..cd74bcc9 100644 --- a/docs/CONTACT.md +++ b/docs/CONTACT.md @@ -1,11 +1,10 @@ - # Contact Us If you have any questions, concerns, or feedback about Fairdrive, we'd love to hear from you! Here's how you can reach us: ## Discussions -You can join discussions on [GitHub](https://github.com/orgs/fairDataSociety/discussions) +You can join discussions on [GitHub](https://github.com/orgs/fairDataSociety/discussions) ## Social Media @@ -15,11 +14,8 @@ You can also reach out to us on social media: - [GitHub](https://github.com/fairDataSociety) - [Discord](https://discord.com/invite/vw3PmWf2rE) - ## Getting Help -If you need help using Fairdrive, check out our [User Guide](USER-GUIDE.md) and [FAQ](FAQ.md). -Start [here](GETTING-STARTED.md) or see [Design](DESIGN.md), [Functionality](FUNCTIONALITY.md) or [Architecture](ARCHITECTURE.md). +If you need help using Fairdrive, check out our [User Guide](USER-GUIDE.md) and [FAQ](FAQ.md). +Start [here](GETTING-STARTED.md) or see [Design](DESIGN.md), [Functionality](FUNCTIONALITY.md) or [Architecture](ARCHITECTURE.md). Developers can check [Development Instructions](DEVELOPMENT.md). - -If you can't find the answer to your question, feel free to [contact us](CONTACT.md). \ No newline at end of file diff --git a/docs/GETTING-STARTED.md b/docs/GETTING-STARTED.md index 24b15af5..33224430 100644 --- a/docs/GETTING-STARTED.md +++ b/docs/GETTING-STARTED.md @@ -15,13 +15,25 @@ Fairdrive is a web application, so there's no need to install anything on your c ## Creating an Account -To use Fairdrive, you'll need to create an account. Here's how: +To use Fairdrive, you'll need to create an account, or migrate through Metamask. + +Follow these steps to create an account: 1. Go to the Fairdrive website. 2. Click on the "Sign Up" button. 3. Fill out the registration form with your details. 4. Click "Submit" to create your account. +Follow these steps to login with Metamask + +1. Install Metamask extension to Chrome. +2. Go to the Fairdrive website. +3. Click on the connect button in the right header corner. +4. Select Metamask, if you are not logged in currently, please login. +5. Provide a one-time-only password for athentication. +6. Send the neccessary gas fee. +7. When the funding is done, you are able to see the Fairdrive overview section. In this page you will see the migrate button above, to proceed with user credentials for interoperability. + ## Logging In Once you've created your account, you can log in to Fairdrive: @@ -41,8 +53,8 @@ Once you're logged in, you can start using Fairdrive to manage your pods, files, ## Getting Help -If you need help using Fairdrive, check out our [User Guide](USER-GUIDE.md) and [FAQ](FAQ.md). -Start [here](GETTING-STARTED.md) or see [Design](DESIGN.md), [Functionality](FUNCTIONALITY.md) or [Architecture](ARCHITECTURE.md). +If you need help using Fairdrive, check out our [User Guide](USER-GUIDE.md) and [FAQ](FAQ.md). +Start [here](GETTING-STARTED.md) or see [Design](DESIGN.md), [Functionality](FUNCTIONALITY.md) or [Architecture](ARCHITECTURE.md). Developers can check [Development Instructions](DEVELOPMENT.md). If you can't find the answer to your question, feel free to [contact us](CONTACT.md). diff --git a/docs/USER-GUIDE.md b/docs/USER-GUIDE.md index b75c14ed..de8515be 100644 --- a/docs/USER-GUIDE.md +++ b/docs/USER-GUIDE.md @@ -19,38 +19,45 @@ Welcome to the Fairdrive User Guide! This guide will walk you through all the fe To use Fairdrive, you'll need to create an account using any of below options. Here's how: #### 1. Using Metamask + 1. Click Connect -2. Select Metamask -3. Type passphrase +2. Select Metamask +3. Type passphrase 4. Connect Metamask to site with your preffered account 5. Sign Message #### 2. Using FDP Portable account + 1. Go to the Fairdrive website. 2. Click on the "Register New Account" button. 3. Fill out the registration form with your details. 4. When you finish procedure your FDP account will be ready -4. Login into Fairdrive using your username/password +5. Login into Fairdrive using your username/password #### 3. Using Bloosom extension + 1. Make sure you are logged in inside Blossom extension 2. Click Connect 3. Select Blossom 4. Allow Fairdrive full access of your personal storage ## Logging In + **Metamask** account: + 1. Click Connect 2. Enter passphrase -3. Sign message +3. Sign message **FDP Portable account** to log in to Fairdrive: + 1. Go to the Fairdrive website. 2. Click on the "Log In" button. 3. Enter your username and password. 4. Click "Submit" to log in. ## Account Migration + You have the option to transition your Metamask-created Lite account to an FDP Portable account. This transition enables you to utilize a username/password combination to access your data from mobile devices or other devices where Metamask isn't installed. Your Lite account will be connected with your new Portable account. During this transition process, you'll be given a new mnemonic. It's crucial to note this down and keep it in a secure location, as it will serve as your mnemonic for your Portable account recovery. @@ -59,6 +66,7 @@ During this transition process, you'll be given a new mnemonic. It's crucial to ## Manage Your Profile You can view your profile information at any time: + 1. Click on Blockie in the top right corner of the screen. 2. Dropdown menu will display available options. @@ -99,15 +107,13 @@ To search your pods, files, and directories: To change the theme of Fairdrive: -1. Click on Blockie in the top right corner of the screen. +1. Click on Blockie in the top right corner of the screen. 2. Click Theme Toggle. ## Getting Help -## Getting Help - -If you need help using Fairdrive, check out our [User Guide](USER-GUIDE.md) and [FAQ](FAQ.md). -Start [here](GETTING-STARTED.md) or see [Design](DESIGN.md), [Functionality](FUNCTIONALITY.md) or [Architecture](ARCHITECTURE.md). +If you need help using Fairdrive, check out our [User Guide](USER-GUIDE.md) and [FAQ](FAQ.md). +Start [here](GETTING-STARTED.md) or see [Design](DESIGN.md), [Functionality](FUNCTIONALITY.md) or [Architecture](ARCHITECTURE.md). Developers can check [Development Instructions](DEVELOPMENT.md). If you can't find the answer to your question, feel free to [contact us](CONTACT.md). From 4fb115d8015122169cbd2137269e2e1095a72bbf Mon Sep 17 00:00:00 2001 From: tamas6 <81620050+tamas6@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:12:19 +0100 Subject: [PATCH 08/25] typo fixx --- docs/USER-GUIDE.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/USER-GUIDE.md b/docs/USER-GUIDE.md index c51d5878..0a3163fa 100644 --- a/docs/USER-GUIDE.md +++ b/docs/USER-GUIDE.md @@ -23,11 +23,7 @@ To use Fairdrive, you'll need to create an account using any of below options. H 1. Click Connect 2. Select Metamask 3. Type passphrase -<<<<<<< HEAD -4. Connect Metamask to site with your preffered account -======= 4. Connect Metamask to site with your preferred account ->>>>>>> b33ba95f0aa99f54d47b2903d511fd45e954b0e0 5. Sign Message #### 2. Using FDP Portable account From 7297294a141a5709e679a8ddcee0782d7c6104c1 Mon Sep 17 00:00:00 2001 From: Not Darko <93942788+darkobas2@users.noreply.github.com> Date: Wed, 6 Dec 2023 08:55:00 +0100 Subject: [PATCH 09/25] Update swarm.yml --- .github/workflows/swarm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swarm.yml b/.github/workflows/swarm.yml index bdcae3f3..cf840039 100644 --- a/.github/workflows/swarm.yml +++ b/.github/workflows/swarm.yml @@ -13,7 +13,7 @@ jobs: working-directory: . strategy: matrix: - node-version: [18.x] + node-version: [16.x] steps: - name: checkout uses: actions/checkout@v3 From 11e0bdbf0eb0ea2ab504a927109aae38b86074c9 Mon Sep 17 00:00:00 2001 From: Not Darko <93942788+darkobas2@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:05:35 +0100 Subject: [PATCH 10/25] Update swarm.yml --- .github/workflows/swarm.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/swarm.yml b/.github/workflows/swarm.yml index cf840039..eaba9066 100644 --- a/.github/workflows/swarm.yml +++ b/.github/workflows/swarm.yml @@ -15,6 +15,11 @@ jobs: matrix: node-version: [16.x] steps: + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: checkout uses: actions/checkout@v3 From 39438162d0a2a19676458e74a6e25439aa5902f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladan=20Tomi=C4=87?= Date: Fri, 8 Dec 2023 13:49:39 +0100 Subject: [PATCH 11/25] fix: list view (#565) --- .../Views/DriveListView/DriveListView.tsx | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/src/components/Views/DriveListView/DriveListView.tsx b/src/components/Views/DriveListView/DriveListView.tsx index 0e8ee5cf..4194ae43 100644 --- a/src/components/Views/DriveListView/DriveListView.tsx +++ b/src/components/Views/DriveListView/DriveListView.tsx @@ -24,18 +24,39 @@ const DriveListView: FC = ({ }) => { const [page, setPage] = useState(0); const [rowsPerPage, setRowsPerPage] = useState(10); - const startIndex = page * rowsPerPage; - const endIndex = startIndex + rowsPerPage; + + const folderLength = directories.length; + const folderStartIndex = + page * rowsPerPage > folderLength ? folderLength : page * rowsPerPage; + const folderEndIndex = + folderStartIndex + rowsPerPage > folderLength + ? folderLength + : folderStartIndex + rowsPerPage; + + const someFoldersAreDisplayed = folderEndIndex - folderStartIndex > 0; + const fileStartIndex = someFoldersAreDisplayed + ? 0 + : page * rowsPerPage - folderLength; + const fileEndIndex = someFoldersAreDisplayed + ? rowsPerPage - (folderEndIndex - folderStartIndex) + : fileStartIndex + rowsPerPage; const { pageDirectories, pageFiles } = useMemo( () => ({ - pageDirectories: (directories || []).slice(startIndex, endIndex), - pageFiles: (files || []).slice( - startIndex - directories.length, - endIndex - directories.length + pageDirectories: (directories || []).slice( + folderStartIndex, + folderEndIndex ), + pageFiles: (files || []).slice(fileStartIndex, fileEndIndex), }), - [directories, files, startIndex, endIndex] + [ + directories, + files, + folderStartIndex, + folderEndIndex, + fileStartIndex, + fileEndIndex, + ] ); const handlePageUp = () => { From b7366554d78c087f6f20725170420f0d7b8f608c Mon Sep 17 00:00:00 2001 From: Vladan Date: Wed, 13 Dec 2023 14:07:29 +0100 Subject: [PATCH 12/25] fix: metamask migration dialog --- .../MetamaskCreateAccount.tsx | 2 +- .../MetamaskMigrationDialog.tsx | 4 +++- src/context/FdpStorageContext.tsx | 21 ++++++++++++------- src/styles/globals.scss | 8 +++---- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/components/Dialogs/MetamaskMigrationDialog/MetamaskCreateAccount.tsx b/src/components/Dialogs/MetamaskMigrationDialog/MetamaskCreateAccount.tsx index 444301d1..5baf0125 100644 --- a/src/components/Dialogs/MetamaskMigrationDialog/MetamaskCreateAccount.tsx +++ b/src/components/Dialogs/MetamaskMigrationDialog/MetamaskCreateAccount.tsx @@ -97,7 +97,7 @@ export default function MetamaskCreateAccount({ await fdpClientRef.current.account.register(request); setWallet(fdpClientRef.current.account.wallet); - setFdpStorageType('native'); + setFdpStorageType('native', undefined, false); setIsLoggedIn(true); setLoginType('username'); setUser(username); diff --git a/src/components/Dialogs/MetamaskMigrationDialog/MetamaskMigrationDialog.tsx b/src/components/Dialogs/MetamaskMigrationDialog/MetamaskMigrationDialog.tsx index 997c187d..b0791063 100644 --- a/src/components/Dialogs/MetamaskMigrationDialog/MetamaskMigrationDialog.tsx +++ b/src/components/Dialogs/MetamaskMigrationDialog/MetamaskMigrationDialog.tsx @@ -55,7 +55,9 @@ const MetamaskMigrationDialog = ({ if (clickOutside) { return; } - setMetamaskMigrationNotification('closed'); + setMetamaskMigrationNotification( + step === Step.COMPLETE ? 'completed' : 'closed' + ); onClose(); }; diff --git a/src/context/FdpStorageContext.tsx b/src/context/FdpStorageContext.tsx index 59d8ab16..db12b716 100644 --- a/src/context/FdpStorageContext.tsx +++ b/src/context/FdpStorageContext.tsx @@ -70,7 +70,8 @@ interface FdpStorageContext { setWallet: (wallet: Wallet) => void; setFdpStorageType: ( type: FDP_STORAGE_TYPE, - config?: FdpContracts.EnsEnvironment + config?: FdpContracts.EnsEnvironment, + create?: boolean ) => void; setFdpStorageConfig: (config: FdpContracts.EnsEnvironment) => void; setUsername: (username: string) => void; @@ -153,15 +154,19 @@ function FdpStorageProvider(props: FdpStorageContextProps) { */ const setFdpStorageType = ( type: FDP_STORAGE_TYPE, - config?: FdpContracts.EnsEnvironment + config?: FdpContracts.EnsEnvironment, + create = true ) => { - if (type === 'native') { - fdpClientRef.current = createFdpStorage(config); - } else if (type === 'blossom') { - fdpClientRef.current = blossom.fdpStorage; - } else { - throw new Error('Unknown FDP storage type'); + if (create) { + if (type === 'native') { + fdpClientRef.current = createFdpStorage(config); + } else if (type === 'blossom') { + fdpClientRef.current = blossom.fdpStorage; + } else { + throw new Error('Unknown FDP storage type'); + } } + setIsLoggedIn(false); setStorageType(type); }; diff --git a/src/styles/globals.scss b/src/styles/globals.scss index 9ec3f679..17330da6 100644 --- a/src/styles/globals.scss +++ b/src/styles/globals.scss @@ -305,11 +305,9 @@ scrollbar-width: none; /* Firefox */ } -.light { - .blurred-text { - color: transparent; - text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); - } +.blurred-text { + color: transparent; + text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); } .dark { From 6b14e4a53ee9aba4e00d9bd114ee90db08a60e8a Mon Sep 17 00:00:00 2001 From: Vladan Date: Wed, 13 Dec 2023 15:12:32 +0100 Subject: [PATCH 13/25] feat: hidden functionalities --- package-lock.json | 27 ++-- package.json | 2 +- .../Connect/Metamask/MetamaskConnect.tsx | 2 +- src/components/Forms/LoginForm/LoginForm.tsx | 147 ++++++++++-------- .../Layouts/MainLayout/MainLayout.tsx | 3 +- .../AuthenticationNavbar.tsx | 11 +- .../MainNavigationBar/MainNavigationBar.tsx | 4 +- .../MainSideBar/MainSideBar.tsx | 4 +- 8 files changed, 110 insertions(+), 90 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73874493..b9d5d7c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", "@fairdatasociety/blossom": "^0.5.0", - "@fairdatasociety/fdp-storage": "^0.13.0", + "@fairdatasociety/fdp-storage": "^0.16.0", "@headlessui/react": "^1.7.14", "@metamask/sdk": "^0.5.6", "@types/react-blockies": "^1.4.1", @@ -3080,13 +3080,13 @@ } }, "node_modules/@fairdatasociety/fdp-storage": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-storage/-/fdp-storage-0.13.0.tgz", - "integrity": "sha512-7AWAC/enq1SQCisMuD3wT5cKSOxe8KdC5f3nolWcruCUpdWcwe65YtjDeL88m/E/kcituQGAl2IgWGkqoysB/g==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-storage/-/fdp-storage-0.16.0.tgz", + "integrity": "sha512-UM8NBAHyN9yTUi0S8ddyr/lo2cg9oia1xDarS/K8pLCW8CAcvDx4rLC1qUsSmN80fbkOnJpiU0/DY4T7EN6iwQ==", "dependencies": { "@ethersphere/bee-js": "^6.2.0", "@fairdatasociety/fdp-contracts-js": "^3.8.0", - "crypto-js": "^4.1.1", + "crypto-js": "^4.2.0", "ethers": "^5.5.2", "js-sha3": "^0.8.0" }, @@ -9819,8 +9819,9 @@ } }, "node_modules/crypto-js": { - "version": "4.1.1", - "license": "MIT" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" }, "node_modules/crypto-random-string": { "version": "2.0.0", @@ -25008,13 +25009,13 @@ "requires": {} }, "@fairdatasociety/fdp-storage": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-storage/-/fdp-storage-0.13.0.tgz", - "integrity": "sha512-7AWAC/enq1SQCisMuD3wT5cKSOxe8KdC5f3nolWcruCUpdWcwe65YtjDeL88m/E/kcituQGAl2IgWGkqoysB/g==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-storage/-/fdp-storage-0.16.0.tgz", + "integrity": "sha512-UM8NBAHyN9yTUi0S8ddyr/lo2cg9oia1xDarS/K8pLCW8CAcvDx4rLC1qUsSmN80fbkOnJpiU0/DY4T7EN6iwQ==", "requires": { "@ethersphere/bee-js": "^6.2.0", "@fairdatasociety/fdp-contracts-js": "^3.8.0", - "crypto-js": "^4.1.1", + "crypto-js": "^4.2.0", "ethers": "^5.5.2", "js-sha3": "^0.8.0" } @@ -29926,7 +29927,9 @@ } }, "crypto-js": { - "version": "4.1.1" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" }, "crypto-random-string": { "version": "2.0.0" diff --git a/package.json b/package.json index f1cd9020..186b57df 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", "@fairdatasociety/blossom": "^0.5.0", - "@fairdatasociety/fdp-storage": "^0.13.0", + "@fairdatasociety/fdp-storage": "^0.16.0", "@headlessui/react": "^1.7.14", "@metamask/sdk": "^0.5.6", "@types/react-blockies": "^1.4.1", diff --git a/src/components/Connect/Metamask/MetamaskConnect.tsx b/src/components/Connect/Metamask/MetamaskConnect.tsx index 9917e233..6a1c4ccf 100644 --- a/src/components/Connect/Metamask/MetamaskConnect.tsx +++ b/src/components/Connect/Metamask/MetamaskConnect.tsx @@ -74,7 +74,7 @@ const MetamaskConnect = ({ onConnect }: MetamaskConnectProps) => { setAddress(wallet.address); setMnemonic(mnemonic); - router.push('/overview'); + router.push('/drive'); } catch (error) { console.error(error); setErrorMessage(String(error.message || error)); diff --git a/src/components/Forms/LoginForm/LoginForm.tsx b/src/components/Forms/LoginForm/LoginForm.tsx index 3443a668..ff06b46d 100644 --- a/src/components/Forms/LoginForm/LoginForm.tsx +++ b/src/components/Forms/LoginForm/LoginForm.tsx @@ -19,6 +19,7 @@ import { setDefaultNetwork } from '@utils/localStorage'; import { useLocales } from '@context/LocalesContext'; import CustomCheckbox from '@components/Inputs/CustomCheckbox/CustomCheckbox'; import { useMatomoContext } from '@context/Matomo'; +import MetamaskConnect from '@components/Connect/Metamask/MetamaskConnect'; const ALLOW_TRACKING_KEY = 'allow-matomo'; @@ -51,6 +52,7 @@ const LoginForm: FC = () => { } = useFdpStorage(); const router = useRouter(); const { intl } = useLocales(); + const fdsLoginEnabled = router?.query['fdsLogin'] === 'true'; const onSubmit = async (data: { user_name: string; password: string }) => { try { @@ -131,78 +133,87 @@ const LoginForm: FC = () => { -
- - - - - - - - - {intl.get('ALLOW_TRACKING')} - - -
-
-
- - {intl.get('REGISTER_NEW_ACCOUNT')} - + {intl.get('ALLOW_TRACKING')} + + +
+
+ + + + ) : ( +
+ + {/* eslint-disable-next-line @typescript-eslint/no-empty-function */} + {}} onError={() => {}} /> +
- + )}
); diff --git a/src/components/Layouts/MainLayout/MainLayout.tsx b/src/components/Layouts/MainLayout/MainLayout.tsx index 54a802f2..6f5e1a86 100644 --- a/src/components/Layouts/MainLayout/MainLayout.tsx +++ b/src/components/Layouts/MainLayout/MainLayout.tsx @@ -49,7 +49,8 @@ const MainLayout: FC = ({
-
+ {/* sm:w-28 */} +
{ const { intl } = useLocales(); + const router = useRouter(); + const fdsLoginEnabled = router?.query['fdsLogin'] === 'true'; return (
{
- - - + {fdsLoginEnabled && ( + + + + )} diff --git a/src/components/NavigationBars/MainNavigationBar/MainNavigationBar.tsx b/src/components/NavigationBars/MainNavigationBar/MainNavigationBar.tsx index 0678c37c..8ddc77d1 100644 --- a/src/components/NavigationBars/MainNavigationBar/MainNavigationBar.tsx +++ b/src/components/NavigationBars/MainNavigationBar/MainNavigationBar.tsx @@ -31,7 +31,7 @@ const MainNavigationBar: FC> = () => {