diff --git a/.eslintrc.js b/.eslintrc.js index 4bdddad..029950e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -572,7 +572,7 @@ module.exports = { "error", { "ignorePattern": "^import", - "code": 120 + "code": 180 } ], "max-lines": [ diff --git a/README.md b/README.md index 033ab9e..ea2ca4c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ # About -Common dashboard used by IOTA node software Hornet and Bee. +Dashboard used by the IOTA-Core node software. ## Prerequisites @@ -32,9 +32,9 @@ If Node.js is installed, you should see the version that's installed. # Getting Started -You need to run a local version of the Hornet node software from the main branch [https://github.com/iotaledger/hornet/](https://github.com/iotaledger/hornet/) +You need to run a local version of the IOTA-Core node software from the develop branch [https://github.com/iotaledger/iota-core/](https://github.com/iotaledger/iota-core/) -1. Make sure to set `dashboard.dev` to true in Hornet config, to enable the node to serve assets +1. Make sure to set `dashboard.dev` to true in the config, to enable the node to serve assets from the dev instance. 2. Install all needed npm modules via `npm install`. 3. Run a dev-server instance by running `npm run start` within the repo root directory. diff --git a/package-lock.json b/package-lock.json index 6ddd22f..f4e3443 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,8 @@ "version": "2.0.0-rc.1", "license": "MIT", "dependencies": { - "@iota/iota.js": "^2.0.0-rc.1", + "@iota/crypto.js": "^1.8.6", + "@iota/util.js": "^1.8.6", "classnames": "^2.3.1", "humanize-duration": "^3.27.3", "moment": "^2.29.1", @@ -2517,35 +2518,21 @@ "dev": true }, "node_modules/@iota/crypto.js": { - "version": "2.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@iota/crypto.js/-/crypto.js-2.0.0-rc.1.tgz", - "integrity": "sha512-gidDFvbIcthVIaxqntffUCFHHNZNhu1e3zjwt6yaYLeuqJcc2AXPv/UF8Lz9Mfkw9aSM8xVUwo8/uYDkvs2eOQ==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@iota/crypto.js/-/crypto.js-1.8.6.tgz", + "integrity": "sha512-bmsBL+gEJVlT1KgkOqjIkPsyNs5VV9MyrAWo9UAYdGNxfyH+KeYiiRzIaQwwhCzUkncuNzlCTbEo2qRJQoKETg==", "dependencies": { - "@iota/util.js": "2.0.0-rc.1", + "@iota/util.js": "^1.8.6", "big-integer": "^1.6.51" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@iota/iota.js": { - "version": "2.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@iota/iota.js/-/iota.js-2.0.0-rc.1.tgz", - "integrity": "sha512-GLMDsOVWvkYagdDz/rAdw58M7CJDW4bSZoFiLQHc790h3Au3Z4pn5FnBq7O258HHgSLpIfNx8RjcNRBwqDxV6Q==", - "dependencies": { - "@iota/crypto.js": "2.0.0-rc.1", - "@iota/util.js": "2.0.0-rc.1", - "big-integer": "^1.6.51", - "node-fetch": "2.6.7" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@iota/util.js": { - "version": "2.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@iota/util.js/-/util.js-2.0.0-rc.1.tgz", - "integrity": "sha512-tG+qsCHhztGuthUPqLlckih3Ump+IcKCDEl+Sb7ACOOR7JM73KOGaRud8NlLu4GNqQyQh7s9Gn2GRkXBJ1apiA==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@iota/util.js/-/util.js-1.8.6.tgz", + "integrity": "sha512-vQRYU0bDKORGFzeoN2zn7tO4Kjqv+h2P/J//MRspg9Kyy1TKgtGkn0j0M2ZSwJjScH6Cn2BQmRLet/ZBpg6osA==", "dependencies": { "big-integer": "^1.6.51" }, @@ -5343,9 +5330,9 @@ } }, "node_modules/big-integer": { - "version": "1.6.51", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", - "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", "engines": { "node": ">=0.6" } @@ -11832,25 +11819,6 @@ "tslib": "^2.0.3" } }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -16426,11 +16394,6 @@ "node": ">= 4.0.0" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -17305,20 +17268,6 @@ "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", "dev": true }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/whatwg-url/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -19509,29 +19458,18 @@ "dev": true }, "@iota/crypto.js": { - "version": "2.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@iota/crypto.js/-/crypto.js-2.0.0-rc.1.tgz", - "integrity": "sha512-gidDFvbIcthVIaxqntffUCFHHNZNhu1e3zjwt6yaYLeuqJcc2AXPv/UF8Lz9Mfkw9aSM8xVUwo8/uYDkvs2eOQ==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@iota/crypto.js/-/crypto.js-1.8.6.tgz", + "integrity": "sha512-bmsBL+gEJVlT1KgkOqjIkPsyNs5VV9MyrAWo9UAYdGNxfyH+KeYiiRzIaQwwhCzUkncuNzlCTbEo2qRJQoKETg==", "requires": { - "@iota/util.js": "2.0.0-rc.1", + "@iota/util.js": "^1.8.6", "big-integer": "^1.6.51" } }, - "@iota/iota.js": { - "version": "2.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@iota/iota.js/-/iota.js-2.0.0-rc.1.tgz", - "integrity": "sha512-GLMDsOVWvkYagdDz/rAdw58M7CJDW4bSZoFiLQHc790h3Au3Z4pn5FnBq7O258HHgSLpIfNx8RjcNRBwqDxV6Q==", - "requires": { - "@iota/crypto.js": "2.0.0-rc.1", - "@iota/util.js": "2.0.0-rc.1", - "big-integer": "^1.6.51", - "node-fetch": "2.6.7" - } - }, "@iota/util.js": { - "version": "2.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@iota/util.js/-/util.js-2.0.0-rc.1.tgz", - "integrity": "sha512-tG+qsCHhztGuthUPqLlckih3Ump+IcKCDEl+Sb7ACOOR7JM73KOGaRud8NlLu4GNqQyQh7s9Gn2GRkXBJ1apiA==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@iota/util.js/-/util.js-1.8.6.tgz", + "integrity": "sha512-vQRYU0bDKORGFzeoN2zn7tO4Kjqv+h2P/J//MRspg9Kyy1TKgtGkn0j0M2ZSwJjScH6Cn2BQmRLet/ZBpg6osA==", "requires": { "big-integer": "^1.6.51" } @@ -21625,9 +21563,9 @@ } }, "big-integer": { - "version": "1.6.51", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", - "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==" + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==" }, "big.js": { "version": "5.2.2", @@ -26508,14 +26446,6 @@ "tslib": "^2.0.3" } }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, "node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -29775,11 +29705,6 @@ } } }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, "trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -30431,22 +30356,6 @@ "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", "dev": true }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - } - } - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 74e35c1..7e0ff38 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "homepage": "/dashboard", "license": "MIT", "dependencies": { - "@iota/iota.js": "^2.0.0-rc.1", + "@iota/crypto.js": "^1.8.6", + "@iota/util.js": "^1.8.6", "classnames": "^2.3.1", "humanize-duration": "^3.27.3", "moment": "^2.29.1", @@ -23,13 +24,11 @@ "node": ">=14 <=16.16" }, "scripts": { - "start": "cross-env PORT=9090 REACT_APP_BRAND_ID=hornet craco start", - "start-bee": "cross-env PORT=9090 REACT_APP_BRAND_ID=bee craco start", - "lint": "eslint src --ext .tsx,.ts", + "start": "cross-env PORT=9090 REACT_APP_BRAND_ID=iota-core craco start", + "lint": "eslint src --fix --ext .tsx,.ts", "sass-lint": "stylelint ./src/**/*.scss --custom-syntax postcss-scss", "build-internal": "craco build", - "build": "cross-env REACT_APP_BRAND_ID=hornet run-s lint sass-lint build-internal", - "build-bee": "cross-env REACT_APP_BRAND_ID=bee run-s lint sass-lint build-internal", + "build": "cross-env REACT_APP_BRAND_ID=iota-core run-s lint sass-lint build-internal", "test": "craco test", "eject": "react-scripts eject" }, diff --git a/public/branding/bee/favicon.ico b/public/branding/bee/favicon.ico deleted file mode 100644 index d5c3d0a..0000000 Binary files a/public/branding/bee/favicon.ico and /dev/null differ diff --git a/public/branding/bee/favicon/android-chrome-192x192.png b/public/branding/bee/favicon/android-chrome-192x192.png deleted file mode 100644 index ae8fff1..0000000 Binary files a/public/branding/bee/favicon/android-chrome-192x192.png and /dev/null differ diff --git a/public/branding/bee/favicon/android-chrome-512x512.png b/public/branding/bee/favicon/android-chrome-512x512.png deleted file mode 100644 index 0436212..0000000 Binary files a/public/branding/bee/favicon/android-chrome-512x512.png and /dev/null differ diff --git a/public/branding/bee/favicon/apple-touch-icon.png b/public/branding/bee/favicon/apple-touch-icon.png deleted file mode 100644 index db0dd54..0000000 Binary files a/public/branding/bee/favicon/apple-touch-icon.png and /dev/null differ diff --git a/public/branding/bee/favicon/favicon-16x16.png b/public/branding/bee/favicon/favicon-16x16.png deleted file mode 100644 index 60a4e4a..0000000 Binary files a/public/branding/bee/favicon/favicon-16x16.png and /dev/null differ diff --git a/public/branding/bee/favicon/favicon-32x32.png b/public/branding/bee/favicon/favicon-32x32.png deleted file mode 100644 index 096c214..0000000 Binary files a/public/branding/bee/favicon/favicon-32x32.png and /dev/null differ diff --git a/public/branding/bee/favicon/favicon.ico b/public/branding/bee/favicon/favicon.ico deleted file mode 100644 index d5c3d0a..0000000 Binary files a/public/branding/bee/favicon/favicon.ico and /dev/null differ diff --git a/public/branding/bee/favicon/mstile-150x150.png b/public/branding/bee/favicon/mstile-150x150.png deleted file mode 100644 index 35e5a27..0000000 Binary files a/public/branding/bee/favicon/mstile-150x150.png and /dev/null differ diff --git a/public/branding/bee/favicon/safari-pinned-tab.svg b/public/branding/bee/favicon/safari-pinned-tab.svg deleted file mode 100644 index c99f510..0000000 --- a/public/branding/bee/favicon/safari-pinned-tab.svg +++ /dev/null @@ -1,147 +0,0 @@ - - - - -Created by potrace 1.11, written by Peter Selinger 2001-2013 - - - - - - - diff --git a/public/branding/hornet/favicon.ico b/public/branding/hornet/favicon.ico deleted file mode 100644 index 71b2dc9..0000000 Binary files a/public/branding/hornet/favicon.ico and /dev/null differ diff --git a/public/branding/hornet/favicon/android-chrome-192x192.png b/public/branding/hornet/favicon/android-chrome-192x192.png deleted file mode 100644 index 03cd996..0000000 Binary files a/public/branding/hornet/favicon/android-chrome-192x192.png and /dev/null differ diff --git a/public/branding/hornet/favicon/android-chrome-512x512.png b/public/branding/hornet/favicon/android-chrome-512x512.png deleted file mode 100644 index 6fe7347..0000000 Binary files a/public/branding/hornet/favicon/android-chrome-512x512.png and /dev/null differ diff --git a/public/branding/hornet/favicon/apple-touch-icon.png b/public/branding/hornet/favicon/apple-touch-icon.png deleted file mode 100644 index ca35287..0000000 Binary files a/public/branding/hornet/favicon/apple-touch-icon.png and /dev/null differ diff --git a/public/branding/hornet/favicon/browserconfig.xml b/public/branding/hornet/favicon/browserconfig.xml deleted file mode 100644 index d416bc5..0000000 --- a/public/branding/hornet/favicon/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #ffffff - - - diff --git a/public/branding/hornet/favicon/favicon-16x16.png b/public/branding/hornet/favicon/favicon-16x16.png deleted file mode 100644 index 8121e11..0000000 Binary files a/public/branding/hornet/favicon/favicon-16x16.png and /dev/null differ diff --git a/public/branding/hornet/favicon/favicon-32x32.png b/public/branding/hornet/favicon/favicon-32x32.png deleted file mode 100644 index a098735..0000000 Binary files a/public/branding/hornet/favicon/favicon-32x32.png and /dev/null differ diff --git a/public/branding/hornet/favicon/favicon.ico b/public/branding/hornet/favicon/favicon.ico deleted file mode 100644 index 71b2dc9..0000000 Binary files a/public/branding/hornet/favicon/favicon.ico and /dev/null differ diff --git a/public/branding/hornet/favicon/mstile-144x144.png b/public/branding/hornet/favicon/mstile-144x144.png deleted file mode 100644 index 0e1813b..0000000 Binary files a/public/branding/hornet/favicon/mstile-144x144.png and /dev/null differ diff --git a/public/branding/hornet/favicon/mstile-150x150.png b/public/branding/hornet/favicon/mstile-150x150.png deleted file mode 100644 index d2de0f2..0000000 Binary files a/public/branding/hornet/favicon/mstile-150x150.png and /dev/null differ diff --git a/public/branding/hornet/favicon/mstile-310x150.png b/public/branding/hornet/favicon/mstile-310x150.png deleted file mode 100644 index 927f988..0000000 Binary files a/public/branding/hornet/favicon/mstile-310x150.png and /dev/null differ diff --git a/public/branding/hornet/favicon/mstile-310x310.png b/public/branding/hornet/favicon/mstile-310x310.png deleted file mode 100644 index c5cd820..0000000 Binary files a/public/branding/hornet/favicon/mstile-310x310.png and /dev/null differ diff --git a/public/branding/hornet/favicon/mstile-70x70.png b/public/branding/hornet/favicon/mstile-70x70.png deleted file mode 100644 index 845d10a..0000000 Binary files a/public/branding/hornet/favicon/mstile-70x70.png and /dev/null differ diff --git a/public/branding/hornet/favicon/safari-pinned-tab.svg b/public/branding/hornet/favicon/safari-pinned-tab.svg deleted file mode 100644 index f6d3635..0000000 --- a/public/branding/hornet/favicon/safari-pinned-tab.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - -Created by potrace 1.11, written by Peter Selinger 2001-2013 - - - - - - - diff --git a/public/branding/hornet/favicon/site.webmanifest b/public/branding/hornet/favicon/site.webmanifest deleted file mode 100644 index dfd9a19..0000000 --- a/public/branding/hornet/favicon/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "Hornet", - "short_name": "Hornet", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/public/branding/iota-core/favicon.ico b/public/branding/iota-core/favicon.ico new file mode 100644 index 0000000..66ad7b9 Binary files /dev/null and b/public/branding/iota-core/favicon.ico differ diff --git a/public/branding/iota-core/favicon/android-chrome-192x192.png b/public/branding/iota-core/favicon/android-chrome-192x192.png new file mode 100644 index 0000000..cef54fe Binary files /dev/null and b/public/branding/iota-core/favicon/android-chrome-192x192.png differ diff --git a/public/branding/iota-core/favicon/android-chrome-512x512.png b/public/branding/iota-core/favicon/android-chrome-512x512.png new file mode 100644 index 0000000..ad766ac Binary files /dev/null and b/public/branding/iota-core/favicon/android-chrome-512x512.png differ diff --git a/public/branding/iota-core/favicon/apple-touch-icon.png b/public/branding/iota-core/favicon/apple-touch-icon.png new file mode 100644 index 0000000..014ebe3 Binary files /dev/null and b/public/branding/iota-core/favicon/apple-touch-icon.png differ diff --git a/public/branding/bee/favicon/browserconfig.xml b/public/branding/iota-core/favicon/browserconfig.xml similarity index 100% rename from public/branding/bee/favicon/browserconfig.xml rename to public/branding/iota-core/favicon/browserconfig.xml diff --git a/public/branding/iota-core/favicon/favicon-16x16.png b/public/branding/iota-core/favicon/favicon-16x16.png new file mode 100644 index 0000000..f8c7a75 Binary files /dev/null and b/public/branding/iota-core/favicon/favicon-16x16.png differ diff --git a/public/branding/iota-core/favicon/favicon-32x32.png b/public/branding/iota-core/favicon/favicon-32x32.png new file mode 100644 index 0000000..8659db2 Binary files /dev/null and b/public/branding/iota-core/favicon/favicon-32x32.png differ diff --git a/public/branding/iota-core/favicon/favicon.ico b/public/branding/iota-core/favicon/favicon.ico new file mode 100644 index 0000000..66ad7b9 Binary files /dev/null and b/public/branding/iota-core/favicon/favicon.ico differ diff --git a/public/branding/iota-core/favicon/mstile-150x150.png b/public/branding/iota-core/favicon/mstile-150x150.png new file mode 100644 index 0000000..74c0a2e Binary files /dev/null and b/public/branding/iota-core/favicon/mstile-150x150.png differ diff --git a/public/branding/iota-core/favicon/safari-pinned-tab.svg b/public/branding/iota-core/favicon/safari-pinned-tab.svg new file mode 100644 index 0000000..5350750 --- /dev/null +++ b/public/branding/iota-core/favicon/safari-pinned-tab.svg @@ -0,0 +1,148 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/branding/bee/favicon/site.webmanifest b/public/branding/iota-core/favicon/site.webmanifest similarity index 87% rename from public/branding/bee/favicon/site.webmanifest rename to public/branding/iota-core/favicon/site.webmanifest index 1903fc8..fb18292 100644 --- a/public/branding/bee/favicon/site.webmanifest +++ b/public/branding/iota-core/favicon/site.webmanifest @@ -1,6 +1,6 @@ { - "name": "Bee", - "short_name": "Bee", + "name": "IOTA-Core", + "short_name": "IOTA-Core", "icons": [ { "src": "/android-chrome-192x192.png", diff --git a/src/app/App.tsx b/src/app/App.tsx index b5c484b..5fde2ac 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1,17 +1,15 @@ import moment from "moment"; import React, { ReactNode } from "react"; import { Redirect, Route, RouteComponentProps, Switch, withRouter } from "react-router-dom"; -import { ReactComponent as ExplorerIcon } from "../assets/explorer.svg"; import { ReactComponent as HomeIcon } from "../assets/home.svg"; import { ReactComponent as MoonIcon } from "../assets/moon.svg"; import { ReactComponent as PadlockUnlockedIcon } from "../assets/padlock-unlocked.svg"; import { ReactComponent as PadlockIcon } from "../assets/padlock.svg"; import { ReactComponent as PeersIcon } from "../assets/peers.svg"; -import { ReactComponent as PluginsIcon } from "../assets/plugins.svg"; import { ReactComponent as SunIcon } from "../assets/sun.svg"; import { ReactComponent as VisualizerIcon } from "../assets/visualizer.svg"; import { ServiceFactory } from "../factories/serviceFactory"; -import { INodeStatus } from "../models/websocket/INodeStatus"; +import { INodeInfoExtended } from "../models/websocket/INodeInfoExtended"; import { IPublicNodeStatus } from "../models/websocket/IPublicNodeStatus"; import { ISyncStatus } from "../models/websocket/ISyncStatus"; import { WebSocketTopic } from "../models/websocket/webSocketTopic"; @@ -29,26 +27,11 @@ import Header from "./components/layout/Header"; import HealthIndicator from "./components/layout/HealthIndicator"; import NavMenu from "./components/layout/NavMenu"; import NavPanel from "./components/layout/NavPanel"; -import Explorer from "./routes/Explorer"; -import Address from "./routes/explorer/Address"; -import { AddressProps } from "./routes/explorer/AddressProps"; -import Block from "./routes/explorer/Block"; -import { BlockProps } from "./routes/explorer/BlockProps"; -import Milestone from "./routes/explorer/Milestone"; -import { MilestoneProps } from "./routes/explorer/MilestoneProps"; -import OutputRoute from "./routes/explorer/OutputRoute"; -import { OutputRouteProps } from "./routes/explorer/OutputRouteProps"; -import OutputsRoute from "./routes/explorer/OutputsRoute"; -import { OutputsRouteProps } from "./routes/explorer/OutputsRouteProps"; import Home from "./routes/Home"; import Login from "./routes/Login"; import Peer from "./routes/Peer"; import { PeerRouteProps } from "./routes/PeerRouteProps"; import Peers from "./routes/Peers"; -import Plugins from "./routes/Plugins"; -import Search from "./routes/Search"; -import { SearchRouteProps } from "./routes/SearchRouteProps"; -import Unavailable from "./routes/Unavailable"; import Visualizer from "./routes/Visualizer"; /** @@ -83,7 +66,7 @@ class App extends AsyncComponent { /** * The status subscription id. */ - private _statusSubscription?: string; + private _nodeInfoExtendedSubscription?: string; /** * The sync status metrics subscription id. @@ -137,8 +120,8 @@ class App extends AsyncComponent { isLoggedIn: Boolean(this._authService.isLoggedIn()), theme: this._themeService.get(), online: false, - syncHealth: false, - nodeHealth: false + isNetworkHealthy: false, + isNodeHealthy: false }; this.updateTitle(); @@ -164,8 +147,8 @@ class App extends AsyncComponent { this.setState({ theme }); }); - this._statusSubscription = this._metricsService.subscribe( - WebSocketTopic.NodeStatus, + this._nodeInfoExtendedSubscription = this._metricsService.subscribe( + WebSocketTopic.NodeInfoExtended, data => { if (data && data.nodeAlias !== this._alias) { this._alias = data.nodeAlias; @@ -177,8 +160,8 @@ class App extends AsyncComponent { WebSocketTopic.SyncStatus, data => { if (data) { - const lmi = data.lmi ? data.lmi.toString() : ""; - const smi = data.cmi ? data.cmi.toString() : ""; + const lmi = data.latestCommitmentSlot ? data.latestCommitmentSlot.toString() : ""; + const smi = data.latestFinalizedSlot ? data.latestFinalizedSlot.toString() : ""; if (lmi !== this._lmi || smi !== this._cmi) { this._cmi = smi; @@ -199,11 +182,11 @@ class App extends AsyncComponent { online: true }); } - if (data.isHealthy !== this.state.nodeHealth) { - this.setState({ nodeHealth: data.isHealthy }); + if (data.isNodeHealthy !== this.state.isNodeHealthy) { + this.setState({ isNodeHealthy: data.isNodeHealthy }); } - if (data.isSynced !== this.state.syncHealth) { - this.setState({ syncHealth: data.isSynced }); + if (data.isNetworkHealthy !== this.state.isNetworkHealthy) { + this.setState({ isNetworkHealthy: data.isNetworkHealthy }); } } }); @@ -228,9 +211,9 @@ class App extends AsyncComponent { EventAggregator.unsubscribe("auth-state", "app"); EventAggregator.unsubscribe("theme", "app"); - if (this._statusSubscription) { - this._metricsService.unsubscribe(this._statusSubscription); - this._statusSubscription = undefined; + if (this._nodeInfoExtendedSubscription) { + this._metricsService.unsubscribe(this._nodeInfoExtendedSubscription); + this._nodeInfoExtendedSubscription = undefined; } if (this._syncStatusSubscription) { @@ -269,22 +252,11 @@ class App extends AsyncComponent { route: "/peers", hidden: !this.state.isLoggedIn }, - { - label: "Explorer", - icon: , - route: "/explorer" - }, { label: "Visualizer", icon: , route: "/visualizer" }, - { - label: "Plugins", - icon: , - route: "/plugins", - hidden: !this.state.isLoggedIn - }, { label: "Login", icon: , @@ -344,13 +316,13 @@ class App extends AsyncComponent {
@@ -380,56 +352,13 @@ class App extends AsyncComponent { ()} + component={(props: RouteComponentProps) => ()} /> )} - ()} - /> - ) => - ()} - /> - ) => ()} - /> - ) => - ()} - /> - ) => - ()} - /> - ) => - (
)} - /> - ) => - ()} - /> - ) => - ()} - /> ()} /> - ()} - /> ()} diff --git a/src/app/AppState.ts b/src/app/AppState.ts index cb8cba6..bf7d35a 100644 --- a/src/app/AppState.ts +++ b/src/app/AppState.ts @@ -16,12 +16,12 @@ export interface AppState { online: boolean; /** - * The sync health. + * The node health. */ - syncHealth: boolean; + isNodeHealthy: boolean; /** - * The node health. + * The network health. */ - nodeHealth: boolean; + isNetworkHealthy: boolean; } diff --git a/src/app/components/layout/Header.tsx b/src/app/components/layout/Header.tsx index 3f936e3..78a909d 100644 --- a/src/app/components/layout/Header.tsx +++ b/src/app/components/layout/Header.tsx @@ -1,9 +1,9 @@ import React, { ReactNode } from "react"; import { RouteComponentProps, withRouter } from "react-router-dom"; import { ServiceFactory } from "../../../factories/serviceFactory"; -import { IBpsMetrics } from "../../../models/websocket/IBpsMetrics"; -import { IDBSizeMetric } from "../../../models/websocket/IDBSizeMetric"; -import { INodeStatus } from "../../../models/websocket/INodeStatus"; +import { IDatabaseSizesMetrics } from "../../../models/websocket/IDatabaseSizesMetrics"; +import { IGossipMetrics } from "../../../models/websocket/IGossipMetrics"; +import { INodeInfoExtended } from "../../../models/websocket/INodeInfoExtended"; import { IPublicNodeStatus } from "../../../models/websocket/IPublicNodeStatus"; import { WebSocketTopic } from "../../../models/websocket/webSocketTopic"; import { AuthService } from "../../../services/authService"; @@ -17,7 +17,6 @@ import { HeaderProps } from "./HeaderProps"; import { HeaderState } from "./HeaderState"; import HealthIndicator from "./HealthIndicator"; import MicroGraph from "./MicroGraph"; -import SearchInput from "./SearchInput"; /** * Header panel. @@ -36,7 +35,7 @@ class Header extends AsyncComponent("auth"); this.state = { - syncHealth: false, - nodeHealth: false, + isNetworkHealthy: false, + isNodeHealthy: false, bps: "-", bpsValues: [], memorySizeFormatted: "-", memorySize: [], - dbLedgerSizeFormatted: "-", - dbLedgerSize: [], - dbTangleSizeFormatted: "-", - dbTangleSize: [], + dbSizeTotalFormatted: "-", + dbSizeTotal: [], isLoggedIn: Boolean(this._authService.isLoggedIn()), online: false }; @@ -108,20 +105,20 @@ class Header extends AsyncComponent( - WebSocketTopic.NodeStatus, + this._nodeInfoExtendedSubscription = this._metricsService.subscribe( + WebSocketTopic.NodeInfoExtended, data => { if (data) { - const memorySizeFormatted = FormatHelper.iSize(data.memUsage, 1); + const memorySizeFormatted = FormatHelper.iSize(data.memoryUsage, 1); if (memorySizeFormatted !== this.state.memorySizeFormatted) { this.setState({ memorySizeFormatted }); @@ -132,49 +129,43 @@ class Header extends AsyncComponent d !== undefined && d !== null); this.setState({ memorySize: nonNull - .map(d => d.memUsage) + .map(d => d.memoryUsage) }); }); - this._databaseSizeSubscription = this._metricsService.subscribe( - WebSocketTopic.DBSizeMetric, + this._databaseSizeSubscription = this._metricsService.subscribe( + WebSocketTopic.DatabaseSizeMetric, data => { if (data) { - const dbLedgerSizeFormatted = FormatHelper.size(data.utxo); + const nonNull = data.databaseSizes.filter(d => d !== undefined && d !== null); - if (dbLedgerSizeFormatted !== this.state.dbLedgerSizeFormatted) { - this.setState({ dbLedgerSizeFormatted }); - } + const dbSizeTotalValues = nonNull + .map(d => d.total); - const dbTangleSizeFormatted = FormatHelper.size(data.tangle); + this.setState({ dbSizeTotal: dbSizeTotalValues }); - if (dbTangleSizeFormatted !== this.state.dbTangleSizeFormatted) { - this.setState({ dbTangleSizeFormatted }); + let dbSizeTotalFormatted = "-"; + if (dbSizeTotalValues.length > 0) { + dbSizeTotalFormatted = FormatHelper.size(dbSizeTotalValues[0]); } - } - }, - allData => { - const nonNull = allData.filter(d => d !== undefined && d !== null); - - const dbLedgerSizeValues = nonNull - .map(d => d.utxo); - - this.setState({ dbLedgerSize: dbLedgerSizeValues }); - const dbTangleSizeValues = nonNull - .map(d => d.tangle); - - this.setState({ dbTangleSize: dbTangleSizeValues }); + if (dbSizeTotalFormatted !== this.state.dbSizeTotalFormatted) { + this.setState({ dbSizeTotalFormatted }); + } + } }); - this._bpsMetricsSubscription = this._metricsService.subscribe( - WebSocketTopic.BPSMetrics, + this._gossipMetricsSubscription = this._metricsService.subscribe( + WebSocketTopic.GossipMetrics, data => { if (data) { const bpsValues = this.state.bpsValues.slice(-40); bpsValues.push(data.new); - const bpsFormatted = bpsValues[bpsValues.length - 1].toString(); + let bpsFormatted = "-"; + if (bpsValues.length > 0) { + bpsFormatted = bpsValues[bpsValues.length - 1].toString(); + } if (bpsFormatted !== this.state.bps) { this.setState({ bps: bpsFormatted }); @@ -198,9 +189,9 @@ class Header extends AsyncComponent {this.props.children} - this.props.history.push(`/explorer/search/${query}`)} - className="child child-fill" - /> - { public render(): ReactNode { let cmi = ""; let lmi = ""; - if (this.props.caption === MILESTONE_CAPTION && this.props.value) { + if (this.props.caption === SYNC_STATUS_CAPTION && this.props.value) { const milestone = this.props.value.split("/"); cmi = milestone[0]; lmi = milestone[1]; @@ -31,7 +31,7 @@ class InfoPanel extends Component {

{this.props.caption}

{ - this.props.caption === MILESTONE_CAPTION ? + this.props.caption === SYNC_STATUS_CAPTION ? diff --git a/src/app/components/layout/SearchInput.scss b/src/app/components/layout/SearchInput.scss deleted file mode 100644 index fb4d699..0000000 --- a/src/app/components/layout/SearchInput.scss +++ /dev/null @@ -1,39 +0,0 @@ -@import '../../../scss/fonts'; -@import '../../../scss/variables'; - -.search-input { - display: flex; - flex: 1; - align-items: center; - - img { - width: 19px; - height: 19px; - } - - input { - @include font-size(16px); - - flex: 1; - margin-left: 10px; - padding: 6px 12px; - border: 0; - border-radius: $spacing-small; - outline: 0; - background: transparent; - color: var(--text-color-secondary); - font-family: $font-sans; - font-weight: 500; - - &::placeholder { - opacity: 1; - color: var(--text-color-secondary); - } - } - - &.search-input--compact { - input { - @include font-size(14px); - } - } -} diff --git a/src/app/components/layout/SearchInput.tsx b/src/app/components/layout/SearchInput.tsx deleted file mode 100644 index ce89920..0000000 --- a/src/app/components/layout/SearchInput.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import classNames from "classnames"; -import React, { Component, ReactNode } from "react"; -import { ReactComponent as SearchIcon } from "../../../assets/search.svg"; -import "./SearchInput.scss"; -import { SearchInputProps } from "./SearchInputProps"; -import { SearchInputState } from "./SearchInputState"; - -/** - * Search Input panel. - */ -class SearchInput extends Component { - /** - * Create a new instance of SearchInput. - * @param props The properties. - */ - constructor(props: SearchInputProps) { - super(props); - - this.state = { - query: "" - }; - } - - /** - * Render the component. - * @returns The node to render. - */ - public render(): ReactNode { - return ( -
- - this.setState({ query: e.target.value })} - onKeyDown={e => { - if (e.key === "Enter") { - this.props.onSearch(this.state.query); - } - }} - placeholder={ - this.props.compact - ? "Search the Tangle" - : "Search blocks, addresses, outputs, milestones, indexes" - } - /> -
- ); - } -} - -export default SearchInput; diff --git a/src/app/components/layout/SearchInputProps.ts b/src/app/components/layout/SearchInputProps.ts deleted file mode 100644 index f5c205b..0000000 --- a/src/app/components/layout/SearchInputProps.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface SearchInputProps { - /** - * Class names. - */ - className?: string; - - /** - * Display in compact mode. - */ - compact: boolean; - - /** - * The query to search for. - */ - onSearch: (query: string) => void; -} diff --git a/src/app/components/layout/SearchInputState.ts b/src/app/components/layout/SearchInputState.ts deleted file mode 100644 index e659316..0000000 --- a/src/app/components/layout/SearchInputState.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface SearchInputState { - /** - * The query to search for. - */ - query: string; -} diff --git a/src/app/components/plugins/Participation.scss b/src/app/components/plugins/Participation.scss deleted file mode 100644 index cca53e0..0000000 --- a/src/app/components/plugins/Participation.scss +++ /dev/null @@ -1,177 +0,0 @@ -@import '../../../scss/card'; -@import '../../../scss/fonts'; -@import '../../../scss/variables'; -@import '../../../scss/media-queries'; - -.participation { - display: flex; - flex: 1; - justify-content: center; - - .event-item { - width: 145px; - height: 75px; - margin-right: $spacing-tiny; - - @include desktop-down { - width: 160px; - } - - h4 { - min-height: 30px; - } - - .event-value { - @include font-size(16px); - - color: var(--text-color-primary); - font-family: $font-sans; - font-weight: bold; - } - - &.event-item--small { - width: 125px; - } - - &.event-item--stretch { - width: 100%; - height: auto; - } - } - - .content { - flex: 1; - max-width: $content-width-desktop; - - .add-button { - @include font-size(14px); - - display: flex; - flex-direction: row; - align-items: center; - padding: 6px 12px; - border: 1px solid var(--text-color-secondary); - border-radius: $form-input-radius; - outline: 0; - background: var(--bar-color-2); - color: var(--text-color-primary); - font-family: $font-sans; - cursor: pointer; - - &:hover { - color: var(--accent-primary); - } - - &:focus { - box-shadow: 0 0 3px 0 var(--accent-primary); - } - } - - .events-panel { - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-between; - - @media (max-width: 1340px) { - flex-direction: column; - flex-wrap: nowrap; - justify-content: flex-start; - } - - .events-panel--item { - width: calc($content-width-desktop / 2 - $spacing-small / 2); - margin-top: $spacing-small; - overflow: hidden; - - @media (max-width: 1340px) { - width: 100%; - } - - .card { - padding: $spacing-large; - - .event-id { - @include font-size(14px); - - @media (min-width: 1340px) { - @include font-size(12px); - } - - display: flex; - flex-direction: column; - color: var(--text-color-primary); - font-family: $font-sans; - font-weight: 500; - - h4 { - display: inline; - } - } - - .event-actions { - justify-content: end; - margin-top: $spacing-small; - - @media (max-width: 720px) { - flex-direction: column; - - .card--action { - justify-content: center; - margin-right: 0; - } - - p { - display: flex; - justify-content: center; - } - } - } - } - } - } - } - - .event-item--highlight { - padding: $spacing-small; - border-radius: $spacing-small; - background-color: var(--panel-background-highlight); - } - - .dialog--value-textarea { - @include font-size(12px); - - min-height: 150px; - max-height: 150px; - padding: 10px; - overflow: auto; - border: 1px solid var(--text-color-secondary); - border-radius: $form-input-radius; - outline: none; - background-color: transparent; - color: var(--text-color-primary); - font-family: $font-sans; - appearance: none; - resize: vertical; - - &.dialog--value-textarea__json { - max-height: 350px; - white-space: pre-wrap; - } - } - - .dialog-content { - overflow-y: auto; - } - - .textarea--stretch { - width: 100%; - } - - .validation--error { - @include font-size(12px); - - color: $danger; - font-family: $font-sans; - } -} diff --git a/src/app/components/plugins/Participation.tsx b/src/app/components/plugins/Participation.tsx deleted file mode 100644 index 08bce83..0000000 --- a/src/app/components/plugins/Participation.tsx +++ /dev/null @@ -1,623 +0,0 @@ -import classNames from "classnames"; -import React, { ReactNode } from "react"; -import { ServiceFactory } from "../../../factories/serviceFactory"; -import { IParticipationEventInfo } from "../../../models/plugins/participation/IParticipationEventInfo"; -import { PluginService } from "../../../services/pluginService"; -import { TangleService } from "../../../services/tangleService"; -import { FetchHelper } from "../../../utils/fetchHelper"; -import AsyncComponent from "../../components/layout/AsyncComponent"; -import Dialog from "../../components/layout/Dialog"; -import Spinner from "../../components/layout/Spinner"; -import "./Participation.scss"; -import { IParticipationEventAnswer } from "./../../../models/plugins/participation/IParticipationEventAnswer"; -import { IParticipationEventQuestion } from "./../../../models/plugins/participation/IParticipationEventQuestion"; -import { ParticipationState } from "./ParticipationState"; - -/** - * Participation panel. - */ -class Participation extends AsyncComponent { - /** - * The title of the plugin. - */ - private static readonly PLUGIN_TITLE = "Participation"; - - /** - * The description of the plugin. - */ - private static readonly PLUGIN_DESCRIPTION = "Manage on-tangle ballots and staking events tracked by the node."; - - /** - * Is the participation plugin available. - */ - private static _isAvailable: boolean = false; - - /** - * Service for plugin requests. - */ - private readonly _pluginService: PluginService; - - /** - * Create a new instance of Participation. - * @param props The props. - */ - constructor(props: unknown) { - super(props); - - this._pluginService = ServiceFactory.get("plugin"); - - this.state = { - events: {}, - eventIds: [], - eventInfo: "" - }; - } - - /** - * Is the plugin available. - */ - public static async initPlugin(): Promise { - Participation._isAvailable = false; - const tangleService = ServiceFactory.get("tangle"); - - try { - const routes = await tangleService.routes(); - if (routes.routes.includes("participation/v1")) { - Participation._isAvailable = true; - } - } catch (err) { - console.log(err); - } - } - - /** - * Get the plugin details if its availabe. - * @returns The plugin details if available. - */ - public static pluginDetails(): { - title: string; - description: string; - settings: ReactNode; - } | undefined { - if (Participation._isAvailable) { - return { - title: Participation.PLUGIN_TITLE, - description: Participation.PLUGIN_DESCRIPTION, - settings: - }; - } - } - - /** - * The component did mount. - */ - public async componentDidMount(): Promise { - super.componentDidMount(); - - await this.fetchEvents(); - } - - /** - * The component updated. - * @param prevProps The previous properties. - * @param prevState The previous state. - */ - public async componentDidUpdate(prevProps: unknown, prevState: ParticipationState): Promise { - if (this.state.eventIds !== prevState.eventIds) { - const difference = this.state.eventIds.filter(e => !prevState.eventIds.includes(e)); - for (const id of difference) { - await this.fetchEventInfo(id); - await this.fetchEventStatus(id); - } - } - } - - /** - * Render the component. - * @returns The node to render. - */ - public render(): ReactNode { - return ( -
-
-
- -
-
- {this.state.eventIds.length === 0 && ( -

There are no events.

- )} - {this.state.eventIds.map((e, idx) => { - const eventInfo = this.state.events[e]; - return ( -
-
-
-
-

ID

{e}
-
-
-

Name

-
- {eventInfo?.name} -
-
-
-
-
-

Milestone index commence

-
- {eventInfo?.milestoneIndexCommence} -
-
-
-

Milestone index start

-
- {eventInfo?.milestoneIndexStart} -
-
-
-

Milestone index end

-
- {eventInfo?.milestoneIndexEnd} -
-
-
-

Type

-
- {eventInfo?.payload.type === 0 ? "Ballot" : "Staking"} -
-
-
-

Status

-
- {eventInfo?.status?.status - .slice(0, 1).toUpperCase()}{eventInfo?.status?.status.slice(1)} -
-
-
- -
- - -
-
-
- ); - })} -
- {this.state.dialogType && ( - { - if (this.state.dialogType === "add") { - await this.submitEvent(); - } else if (this.state.deleteId) { - await this.eventDelete(this.state.deleteId); - } - }} - key={0} - disabled={this.state.dialogBusy || ( - this.state.dialogType === "add" && - (!this.state.eventInfo || - this.state.eventInfo.trim().length === 0 || - !this.validateJsonOrUrl(this.state?.eventInfo)) - )} - > - {this.state.dialogType === "add" ? "OK" : "Yes"} - , - - ]} - > - {this.state.dialogType === "delete" && ( -

- {`Are you sure you want to delete the event - ${(this.state.deleteId) - ? this.state.events[this.state.deleteId].name : ""}?`} -

- )} - {(this.state.dialogType === "details" && this.state.dialogDetailsEvent) && ( -
-
-

Milestone index

-
- {this.state.dialogDetailsEvent.status?.milestoneIndex} -
-
-
-

Status

-
- {this.state.dialogDetailsEvent.status?.status - .slice(0, 1).toUpperCase()} - {this.state.dialogDetailsEvent.status?.status.slice(1)} -
-
- {/* Ballot */} - {this.state.dialogDetailsEvent.payload.type === 0 && ( -
- {this.state.dialogDetailsEvent.payload.questions - ?.map((q: IParticipationEventQuestion, idx: number) => ( -
-
-
-

Question

-
- {q.text} -
-
-
- {q.answers.map((a: IParticipationEventAnswer, idy) => ( -
-
-

Answer

-
- {a.text} -
-
-
-

current

-
- {(this.state.dialogDetailsEvent?.status?.questions) - ? this.state.dialogDetailsEvent.status - .questions[idx].answers[idy].current : "" } -
-
-
-

accumulated

-
- {(this.state.dialogDetailsEvent?.status?.questions) - ? this.state.dialogDetailsEvent.status - .questions[idx].answers[idy].accumulated : ""} -
-
-
- ))} -
- ))} -
- )} - {/* Staking */} - {this.state.dialogDetailsEvent.payload.type === 1 && ( -
-
-

Symbol

-
- {this.state.dialogDetailsEvent.status?.staking?.symbol} -
-
-
-

Staked

-
- {this.state.dialogDetailsEvent.status?.staking?.staked} -
-
-
-

Rewarded

-
- {this.state.dialogDetailsEvent.status?.staking?.rewarded} -
-
-
- )} -
- )} - {this.state.dialogType === "add" && ( - -

Please enter the details of the event to {this.state.dialogType}.

- -
- JSON Configuration or URL -
-
-