diff --git a/explorer/package-lock.json b/explorer/package-lock.json index 08ce122ea..69fbe5dee 100644 --- a/explorer/package-lock.json +++ b/explorer/package-lock.json @@ -36,7 +36,7 @@ "@types/socket.io-client": "^3.0.0", "bignumber.js": "^9.0.1", "bn.js": "^5.2.0", - "bootstrap": "^4.6.0", + "bootstrap": "~5.1.3", "bs58": "^4.0.1", "chai": "^4.3.4", "chart.js": "^2.9.4", @@ -4858,6 +4858,16 @@ "node": ">= 8" } }, + "node_modules/@popperjs/core": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.0.tgz", + "integrity": "sha512-zrsUxjLOKAzdewIDRWy9nsV1GQsKBCWaGwsZQlCgr6/q+vjyZhFgqedLfFBuI9anTPEUT4APq9Mu0SZBTzIcGQ==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@project-serum/anchor": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.11.1.tgz", @@ -8229,16 +8239,15 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, "node_modules/bootstrap": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.0.tgz", - "integrity": "sha512-Io55IuQY3kydzHtbGvQya3H+KorS/M9rSNyfCGCg9WZ4pyT/lCxIlpJgG1GXW/PswzC84Tr2fBYi+7+jFVQQBw==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz", + "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==", "funding": { "type": "opencollective", "url": "https://opencollective.com/bootstrap" }, "peerDependencies": { - "jquery": "1.9.1 - 3", - "popper.js": "^1.16.1" + "@popperjs/core": "^2.10.2" } }, "node_modules/borsh": { @@ -17948,12 +17957,6 @@ "node": ">=6" } }, - "node_modules/jquery": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", - "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==", - "peer": true - }, "node_modules/js-sha256": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", @@ -20067,17 +20070,6 @@ "node": ">=6" } }, - "node_modules/popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, "node_modules/portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -31093,6 +31085,12 @@ } } }, + "@popperjs/core": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.0.tgz", + "integrity": "sha512-zrsUxjLOKAzdewIDRWy9nsV1GQsKBCWaGwsZQlCgr6/q+vjyZhFgqedLfFBuI9anTPEUT4APq9Mu0SZBTzIcGQ==", + "peer": true + }, "@project-serum/anchor": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.11.1.tgz", @@ -33721,9 +33719,9 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, "bootstrap": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.0.tgz", - "integrity": "sha512-Io55IuQY3kydzHtbGvQya3H+KorS/M9rSNyfCGCg9WZ4pyT/lCxIlpJgG1GXW/PswzC84Tr2fBYi+7+jFVQQBw==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz", + "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==", "requires": {} }, "borsh": { @@ -41199,12 +41197,6 @@ } } }, - "jquery": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", - "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==", - "peer": true - }, "js-sha256": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", @@ -42910,12 +42902,6 @@ "ts-pnp": "^1.1.6" } }, - "popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "peer": true - }, "portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", diff --git a/explorer/package.json b/explorer/package.json index 46a33c1fc..7f0bb79f9 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -31,7 +31,7 @@ "@types/socket.io-client": "^3.0.0", "bignumber.js": "^9.0.1", "bn.js": "^5.2.0", - "bootstrap": "^4.6.0", + "bootstrap": "~5.1.3", "bs58": "^4.0.1", "chai": "^4.3.4", "chart.js": "^2.9.4", diff --git a/explorer/src/components/ClusterModal.tsx b/explorer/src/components/ClusterModal.tsx index 93a85abac..fce27bed5 100644 --- a/explorer/src/components/ClusterModal.tsx +++ b/explorer/src/components/ClusterModal.tsx @@ -5,7 +5,6 @@ import { Location } from "history"; import { useCluster, ClusterStatus, - clusterUrl, clusterName, clusterSlug, CLUSTERS, @@ -34,52 +33,50 @@ export function ClusterModal() { return ( <>
-
-
-
e.stopPropagation()}> - - × - +
e.stopPropagation()}> + + × + -

Choose a Cluster

- +

Choose a Cluster

+ - {showDeveloperSettings && ( - <> -
+ {showDeveloperSettings && ( + <> +
-

Developer Settings

-
- Enable custom url param -
- - -
-
-

- Enable this setting to easily connect to a custom cluster - via the "customUrl" url param. -

- - )} -
-
+

Developer Settings

+
+ Enable custom url param +
+ + +
+
+

+ Enable this setting to easily connect to a custom cluster via + the "customUrl" url param. +

+ + )}
- +
+ +
); } @@ -93,8 +90,9 @@ function CustomClusterInput({ activeSuffix, active }: InputProps) { const history = useHistory(); const location = useLocation(); - const customClass = (prefix: string) => - active ? `${prefix}-${activeSuffix}` : ""; + const btnClass = active + ? `border-${activeSuffix} text-${activeSuffix}` + : "btn-white"; const clusterLocation = (location: Location) => { if (customUrl.length > 0) { @@ -118,31 +116,26 @@ function CustomClusterInput({ activeSuffix, active }: InputProps) { const inputTextClass = editing ? "" : "text-muted"; return ( - clusterLocation(location)} - className="btn input-group input-group-merge p-0" - > - setEditing(true)} - onBlur={() => setEditing(false)} - onInput={(e) => onUrlInput(e.currentTarget.value)} - /> -
-
- Custom: -
-
- + <> + + Custom RPC URL + + {active && ( + setEditing(true)} + onBlur={() => setEditing(false)} + onInput={(e) => onUrlInput(e.currentTarget.value)} + /> + )} + ); } function ClusterToggle() { - const { status, cluster, customUrl } = useCluster(); + const { status, cluster } = useCluster(); let activeSuffix = ""; switch (status) { @@ -193,13 +186,10 @@ function ClusterToggle() { return ( - {`${clusterName(net)}: `} - - {clusterUrl(net, customUrl).replace("explorer-", "")} - + {clusterName(net)} ); })} diff --git a/explorer/src/components/ClusterStatusButton.tsx b/explorer/src/components/ClusterStatusButton.tsx index c7efc7cca..9456a1d1c 100644 --- a/explorer/src/components/ClusterStatusButton.tsx +++ b/explorer/src/components/ClusterStatusButton.tsx @@ -36,13 +36,13 @@ function Button() { return `btn d-block btn-${variant}`; }; - const spinnerClasses = "spinner-grow spinner-grow-sm mr-2"; + const spinnerClasses = "spinner-grow spinner-grow-sm me-2"; switch (status) { case ClusterStatus.Connected: return ( - + {statusName} ); @@ -62,7 +62,7 @@ function Button() { case ClusterStatus.Failure: return ( - + {statusName} ); diff --git a/explorer/src/components/MessageBanner.tsx b/explorer/src/components/MessageBanner.tsx index 19b22df92..90175f5d9 100644 --- a/explorer/src/components/MessageBanner.tsx +++ b/explorer/src/components/MessageBanner.tsx @@ -67,7 +67,7 @@ export function MessageBanner() {

- + {message}

{timeframe} diff --git a/explorer/src/components/Navbar.tsx b/explorer/src/components/Navbar.tsx index 70ef7c2f2..16366e95b 100644 --- a/explorer/src/components/Navbar.tsx +++ b/explorer/src/components/Navbar.tsx @@ -24,11 +24,11 @@ export function Navbar() {
-