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/Footers/MainFooter/MainFooter.tsx b/src/components/Footers/MainFooter/MainFooter.tsx index cf1f91ce..ed9d04be 100644 --- a/src/components/Footers/MainFooter/MainFooter.tsx +++ b/src/components/Footers/MainFooter/MainFooter.tsx @@ -27,7 +27,7 @@ const MainFooter: FC = () => { const { intl } = useLocales(); return ( -
+
{ } = useFdpStorage(); const router = useRouter(); const { intl } = useLocales(); + const fdsLoginEnabled = router?.query['fdsLogin'] === 'true'; const onSubmit = async (data: { user_name: string; password: string }) => { try { @@ -116,10 +118,12 @@ const LoginForm: FC = () => { return (
- +
+ +
{
-
- - - - - - - - - {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..3aa7fb29 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 */} +
= ({
-
+
diff --git a/src/components/Modals/UploadFileModal/UploadFileModal.tsx b/src/components/Modals/UploadFileModal/UploadFileModal.tsx index c077b9be..5a6136ef 100644 --- a/src/components/Modals/UploadFileModal/UploadFileModal.tsx +++ b/src/components/Modals/UploadFileModal/UploadFileModal.tsx @@ -120,9 +120,9 @@ const UploadFileModal: FC = ({ podName: activePod, }, (event: UploadProgressInfo) => { - const { uploadPercentage } = event.data || {}; + const { percentage } = event.data || {}; - if (uploadPercentage) { + if (percentage) { setUploadPercentage( calculateUploadPercentage( uploadedItemsRef.current.length + failedUplods.length, diff --git a/src/components/NavigationBars/AuthenticationNavbar/AuthenticationNavbar.tsx b/src/components/NavigationBars/AuthenticationNavbar/AuthenticationNavbar.tsx index ed42efa6..83e35f11 100644 --- a/src/components/NavigationBars/AuthenticationNavbar/AuthenticationNavbar.tsx +++ b/src/components/NavigationBars/AuthenticationNavbar/AuthenticationNavbar.tsx @@ -9,9 +9,12 @@ import ConnectDropdown from '@components/Dropdowns/ConnectDropdown/ConnectDropdo import classes from './AuthenticationNavbar.module.scss'; import { useLocales } from '@context/LocalesContext'; import LanguageDropdown from '@components/Dropdowns/LanguageDropdown/LanguageDropdown'; +import { useRouter } from 'next/router'; const AuthenticationNavbar: FC = () => { const { intl } = useLocales(); + const router = useRouter(); + const fdsLoginEnabled = router?.query['fdsLogin'] === 'true'; return (
{
- - - + {fdsLoginEnabled && ( + + + + )} diff --git a/src/components/NavigationBars/DriveActionBar/DriveActionBarMobile.module.scss b/src/components/NavigationBars/DriveActionBar/DriveActionBarMobile.module.scss new file mode 100644 index 00000000..4d2c85d3 --- /dev/null +++ b/src/components/NavigationBars/DriveActionBar/DriveActionBarMobile.module.scss @@ -0,0 +1,6 @@ +@media (max-width: 440px) { + .DriveActionBarItem { + width: 80px; + font-size: 12px; + } +} diff --git a/src/components/NavigationBars/DriveActionBar/DriveActionBarMobile.tsx b/src/components/NavigationBars/DriveActionBar/DriveActionBarMobile.tsx index 39340fe9..b6f8b4de 100644 --- a/src/components/NavigationBars/DriveActionBar/DriveActionBarMobile.tsx +++ b/src/components/NavigationBars/DriveActionBar/DriveActionBarMobile.tsx @@ -24,6 +24,8 @@ import { UpdateDriveProps } from '@interfaces/handlers'; import { useLocales } from '@context/LocalesContext'; import PodContext from '@context/PodContext'; +import classes from './DriveActionBarMobile.module.scss'; + export interface DriveActionBarMobileProps extends UpdateDriveProps { refreshPods?: () => void; } @@ -38,7 +40,7 @@ const DriveActionBarItem = ( ) => { return (
diff --git a/src/components/NavigationBars/MainNavigationBar/MainNavigationBar.tsx b/src/components/NavigationBars/MainNavigationBar/MainNavigationBar.tsx index 0678c37c..7684a70e 100644 --- a/src/components/NavigationBars/MainNavigationBar/MainNavigationBar.tsx +++ b/src/components/NavigationBars/MainNavigationBar/MainNavigationBar.tsx @@ -31,7 +31,7 @@ const MainNavigationBar: FC> = () => {
- {metamaskMigrationNotification === 'closed' && ( + {/* {metamaskMigrationNotification === 'closed' && (
= ({ {intl.get('MIGRATE_ACCOUNT')}
- )} + )} */}
= ({ setRenderDriveMenu(Boolean(router.pathname === '/drive' && updateDrive)); }, [updateDrive]); + // Moved from NavigationItems, should be removed when the NavigationItems is enabled + useEffect(() => { + if (router.pathname === '/drive') { + driveSideBarToggle(); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + return (
- + /> */} {renderDriveMenu && (