From 6138f774f62f32a24b124e49cb663db349631257 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Tue, 19 Dec 2023 11:12:46 +0100 Subject: [PATCH 1/2] :sparkles: Loader for anchoring download --- .../Layouts/Folder/FolderInformation/index.tsx | 16 ++++++++++++++-- .../FolderInformation/classes.module.scss | 4 ++-- .../FolderArchived/FolderInformation/index.tsx | 16 ++++++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx index aeee5287..684a6806 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx @@ -48,6 +48,7 @@ type IState = { hasValidateAnchoring: boolean; isVerifDeleteModalVisible: boolean; isPreventArchiveModalOpen: boolean; + loadingAnchoring: boolean; }; class FolderInformationClass extends BasePage { public constructor(props: IPropsClass) { @@ -59,6 +60,7 @@ class FolderInformationClass extends BasePage { hasValidateAnchoring: false, isVerifDeleteModalVisible: false, isPreventArchiveModalOpen: false, + loadingAnchoring: false, }; this.openArchivedModal = this.openArchivedModal.bind(this); this.closeArchivedModal = this.closeArchivedModal.bind(this); @@ -159,8 +161,16 @@ class FolderInformationClass extends BasePage { {this.props.isAnchored === AnchorStatus.VERIFIED_ON_CHAIN && ( )} @@ -339,7 +349,7 @@ class FolderInformationClass extends BasePage { private async downloadAnchoringProof(uid?: string) { if (!uid) return; - + this.setState({ loadingAnchoring: true }); try { const file: Blob = await OfficeFolderAnchors.getInstance().download(uid); const url = window.URL.createObjectURL(file); @@ -351,7 +361,9 @@ class FolderInformationClass extends BasePage { document.body.appendChild(a); a.click(); window.URL.revokeObjectURL(url); + this.setState({ loadingAnchoring: false }); } catch (e) { + this.setState({ loadingAnchoring: false }); console.error(e); } } diff --git a/src/front/Components/Layouts/FolderArchived/FolderInformation/classes.module.scss b/src/front/Components/Layouts/FolderArchived/FolderInformation/classes.module.scss index 7b91758b..be75ff2b 100644 --- a/src/front/Components/Layouts/FolderArchived/FolderInformation/classes.module.scss +++ b/src/front/Components/Layouts/FolderArchived/FolderInformation/classes.module.scss @@ -95,7 +95,7 @@ justify-content: center; height: 100%; .loader { - width: 40px; - height: 40px; + width: 21px; + height: 21px; } } diff --git a/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx b/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx index c11a8732..9e06a63c 100644 --- a/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx @@ -32,6 +32,7 @@ type IPropsClass = IProps & { type IState = { selectedFolder: OfficeFolder | null; isArchivedModalOpen: boolean; + loadingAnchoring: boolean; }; class FolderInformationClass extends BasePage { public constructor(props: IPropsClass) { @@ -39,6 +40,7 @@ class FolderInformationClass extends BasePage { this.state = { selectedFolder: null, isArchivedModalOpen: false, + loadingAnchoring: false, }; this.onSelectedFolder = this.onSelectedFolder.bind(this); this.openArchivedModal = this.openArchivedModal.bind(this); @@ -119,8 +121,16 @@ class FolderInformationClass extends BasePage { {this.props.isAnchored === AnchorStatus.VERIFIED_ON_CHAIN && ( )} @@ -180,7 +190,7 @@ class FolderInformationClass extends BasePage { private async downloadAnchoringProof(uid?: string) { if (!uid) return; - + this.setState({ loadingAnchoring: true }); try { const file: Blob = await OfficeFolderAnchors.getInstance().download(uid); const url = window.URL.createObjectURL(file); @@ -192,7 +202,9 @@ class FolderInformationClass extends BasePage { document.body.appendChild(a); a.click(); window.URL.revokeObjectURL(url); + this.setState({ loadingAnchoring: false }); } catch (e) { + this.setState({ loadingAnchoring: false }); console.error(e); } } From 3e086ad066cba8494f7f84b71379db8a427d6c95 Mon Sep 17 00:00:00 2001 From: Vins Date: Tue, 19 Dec 2023 15:10:20 +0100 Subject: [PATCH 2/2] cell_phone not reauired --- package-lock.json | 104 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/package-lock.json b/package-lock.json index e463010a..89f2f3c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "eslint-config-next": "13.2.4", "form-data": "^4.0.0", "jwt-decode": "^3.1.2", - "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.104", + "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.106", "next": "13.2.4", "prettier": "^2.8.7", "react": "18.2.0", @@ -497,14 +497,14 @@ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==" }, "node_modules/@mui/base": { - "version": "5.0.0-beta.27", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.27.tgz", - "integrity": "sha512-duL37qxihT1N0pW/gyXVezP7SttLkF+cLAs/y6g6ubEFmVadjbnZ45SeF12/vAiKzqwf5M0uFH1cczIPXFZygA==", + "version": "5.0.0-beta.28", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.28.tgz", + "integrity": "sha512-KIoSc5sUFceeCaZTq5MQBapFzhHqMo4kj+4azWaCAjorduhcRQtN+BCgVHmo+gvEjix74bUfxwTqGifnu2fNTg==", "dependencies": { "@babel/runtime": "^7.23.5", "@floating-ui/react-dom": "^2.0.4", "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.0", + "@mui/utils": "^5.15.1", "@popperjs/core": "^2.11.8", "clsx": "^2.0.0", "prop-types": "^15.8.1" @@ -528,26 +528,26 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.0.tgz", - "integrity": "sha512-NpGtlHwuyLfJtdrlERXb8qRqd279O0VnuGaZAor1ehdNhUJOD1bSxHDeXKZkbqNpvi50hasFj7lsbTpluworTQ==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.1.tgz", + "integrity": "sha512-y/nUEsWHyBzaKYp9zLtqJKrLod/zMNEWpMj488FuQY9QTmqBiyUhI2uh7PVaLqLewXRtdmG6JV0b6T5exyuYRw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" } }, "node_modules/@mui/material": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.0.tgz", - "integrity": "sha512-60CDI/hQNwJv9a3vEZtFG7zz0USdQhVwpBd3fZqrzhuXSdiMdYMaZcCXeX/KMuNq0ZxQEAZd74Pv+gOb408QVA==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.1.tgz", + "integrity": "sha512-WA5DVyvacxDakVyAhNqu/rRT28ppuuUFFw1bLpmRzrCJ4uw/zLTATcd4WB3YbB+7MdZNEGG/SJNWTDLEIyn3xQ==", "dependencies": { "@babel/runtime": "^7.23.5", - "@mui/base": "5.0.0-beta.27", - "@mui/core-downloads-tracker": "^5.15.0", - "@mui/system": "^5.15.0", + "@mui/base": "5.0.0-beta.28", + "@mui/core-downloads-tracker": "^5.15.1", + "@mui/system": "^5.15.1", "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.0", - "@types/react-transition-group": "^4.4.9", + "@mui/utils": "^5.15.1", + "@types/react-transition-group": "^4.4.10", "clsx": "^2.0.0", "csstype": "^3.1.2", "prop-types": "^15.8.1", @@ -581,12 +581,12 @@ } }, "node_modules/@mui/private-theming": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.0.tgz", - "integrity": "sha512-7WxtIhXxNek0JjtsYy+ut2LtFSLpsUW5JSDehQO+jF7itJ8ehy7Bd9bSt2yIllbwGjCFowLfYpPk2Ykgvqm1tA==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.1.tgz", + "integrity": "sha512-wTbzuy5KjSvCPE9UVJktWHJ0b/tD5biavY9wvF+OpYDLPpdXK52vc1hTDxSbdkHIFMkJExzrwO9GvpVAHZBnFQ==", "dependencies": { "@babel/runtime": "^7.23.5", - "@mui/utils": "^5.15.0", + "@mui/utils": "^5.15.1", "prop-types": "^15.8.1" }, "engines": { @@ -607,9 +607,9 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.0.tgz", - "integrity": "sha512-6NysIsHkuUS2lF+Lzv1jiK3UjBJk854/vKVcJQVGKlPiqNEVZJNlwaSpsaU5xYXxWEZYfbVFSAomLOS/LV/ovQ==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.1.tgz", + "integrity": "sha512-7WDZTJLqGexWDjqE9oAgjU8ak6hEtUw2yQU7SIYID5kLVO2Nj/Wi/KicbLsXnTsJNvSqePIlUIWTBSXwWJCPZw==", "dependencies": { "@babel/runtime": "^7.23.5", "@emotion/cache": "^11.11.0", @@ -638,15 +638,15 @@ } }, "node_modules/@mui/system": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.0.tgz", - "integrity": "sha512-8TPjfTlYBNB7/zBJRL4QOD9kImwdZObbiYNh0+hxvhXr2koezGx8USwPXj8y/JynbzGCkIybkUztCdWlMZe6OQ==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.1.tgz", + "integrity": "sha512-LAnP0ls69rqW9eBgI29phIx/lppv+WDGI7b3EJN7VZIqw0RezA0GD7NRpV12BgEYJABEii6z5Q9B5tg7dsX0Iw==", "dependencies": { "@babel/runtime": "^7.23.5", - "@mui/private-theming": "^5.15.0", - "@mui/styled-engine": "^5.15.0", + "@mui/private-theming": "^5.15.1", + "@mui/styled-engine": "^5.15.1", "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.0", + "@mui/utils": "^5.15.1", "clsx": "^2.0.0", "csstype": "^3.1.2", "prop-types": "^15.8.1" @@ -690,9 +690,9 @@ } }, "node_modules/@mui/utils": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.0.tgz", - "integrity": "sha512-XSmTKStpKYamewxyJ256+srwEnsT3/6eNo6G7+WC1tj2Iq9GfUJ/6yUoB7YXjOD2jTZ3XobToZm4pVz1LBt6GA==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.1.tgz", + "integrity": "sha512-V1/d0E3Bju5YdB59HJf2G0tnHrFEvWLN+f8hAXp9+JSNy/LC2zKyqUfPPahflR6qsI681P8G9r4mEZte/SrrYA==", "dependencies": { "@babel/runtime": "^7.23.5", "@types/prop-types": "^15.7.11", @@ -966,9 +966,9 @@ } }, "node_modules/@rushstack/eslint-patch": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.6.0.tgz", - "integrity": "sha512-2/U3GXA6YiPYQDLGwtGlnNgKYBSwCFIHf8Y9LUY5VATHdtbLlU0Y1R3QoBnT0aB4qv/BEiVVsj7LJXoQCgJ2vA==" + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.6.1.tgz", + "integrity": "sha512-UY+FGM/2jjMkzQLn8pxcHGMaVLh9aEitG3zY2CiY7XHdLiz3bZOwa6oDxNqEMv7zZkV+cj5DOdz0cQ1BP5Hjgw==" }, "node_modules/@swc/helpers": { "version": "0.4.14", @@ -2167,9 +2167,9 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", - "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dependencies": { "array-includes": "^3.1.7", "array.prototype.findlastindex": "^1.2.3", @@ -2187,7 +2187,7 @@ "object.groupby": "^1.0.1", "object.values": "^1.1.7", "semver": "^6.3.1", - "tsconfig-paths": "^3.14.2" + "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" @@ -2462,9 +2462,9 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", "dependencies": { "reusify": "^1.0.4" } @@ -3361,7 +3361,7 @@ } }, "node_modules/le-coffre-resources": { - "resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#fb0edf7da461aacab22b6bbf3a8928335f94e51a", + "resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#fc76a3ac63e5b6aee5ffc2ad3027aa9fdab01de0", "license": "MIT", "dependencies": { "class-transformer": "^0.5.1", @@ -3382,9 +3382,9 @@ } }, "node_modules/libphonenumber-js": { - "version": "1.10.51", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.51.tgz", - "integrity": "sha512-vY2I+rQwrDQzoPds0JeTEpeWzbUJgqoV0O4v31PauHBb/e+1KCXKylHcDnBMgJZ9fH9mErsEbROJY3Z3JtqEmg==" + "version": "1.10.52", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.52.tgz", + "integrity": "sha512-6vCuCHgem+OW1/VCAKgkasfegItCea8zIT7s9/CG/QxdCMIM7GfzbEBG5d7lGO3rzipjt5woOQL3DiHa8Fy78Q==" }, "node_modules/lines-and-columns": { "version": "1.2.4", @@ -4170,9 +4170,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regexp.prototype.flags": { "version": "1.5.1", @@ -4725,9 +4725,9 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", diff --git a/package.json b/package.json index 9b32d4d6..423dd9cb 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "eslint-config-next": "13.2.4", "form-data": "^4.0.0", "jwt-decode": "^3.1.2", - "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.104", + "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.106", "next": "13.2.4", "prettier": "^2.8.7", "react": "18.2.0",