Skip to content

Commit 9e7cb3c

Browse files
author
tombertrand
committed
Update NodeJS & packages
1 parent 975693e commit 9e7cb3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1648
-7128
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
id: setup-node
1616
uses: actions/setup-node@v3
1717
with:
18-
node-version: 16.17.0
18+
node-version: 18.16.0
1919
cache: "npm"
2020

2121
- name: Build static assets

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.17.0
1+
18.16.0

package-lock.json

Lines changed: 1286 additions & 6740 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@
3030
]
3131
},
3232
"overrides": {
33-
"autoprefixer": "10.4.5"
33+
"autoprefixer": "10.4.5",
34+
"react-scripts": {
35+
"typescript": "$typescript"
36+
}
3437
},
3538
"dependencies": {
3639
"@antv/g2plot": "^2.3.39",
3740
"@google-cloud/translate": "^6.2.0",
38-
"@material-ui/core": "^4.12.4",
3941
"@sentry/node": "^6.19.2",
40-
"@umijs/plugin-antd": "^0.15.2",
41-
"antd": "^4.23.2",
42+
"antd": "^5.5.0",
4243
"bignumber.js": "^9.0.0",
4344
"body-parser": "^1.19.0",
4445
"cors": "^2.8.5",
@@ -49,7 +50,7 @@
4950
"fs-extra": "^10.0.0",
5051
"ga-4-react": "^0.1.281",
5152
"html5-qrcode": "github:mebjas/html5-qrcode#master",
52-
"i18next": "^19.9.0",
53+
"i18next": "^22.4.15",
5354
"i18next-browser-languagedetector": "^6.0.1",
5455
"leaflet": "^1.8.0",
5556
"leaflet-extra-markers": "^1.2.1",
@@ -69,9 +70,10 @@
6970
"react-dom": "^17.0.1",
7071
"react-helmet": "^6.1.0",
7172
"react-hook-form": "^7.7.1",
72-
"react-i18next": "^11.8.8",
73+
"react-i18next": "^12.2.2",
7374
"react-leaflet": "^3.2.5",
7475
"react-markdown": "^8.0.1",
76+
"react-responsive": "^9.0.2",
7577
"react-router-dom": "^5.2.0",
7678
"react-scripts": "^5.0.1",
7779
"reconnecting-websocket": "^4.4.0",
@@ -106,7 +108,7 @@
106108
"@types/prettier": "^2.2.1",
107109
"@types/qrcode": "^1.3.4",
108110
"@types/qs": "^6.9.1",
109-
"@types/react": "^16.9.23",
111+
"@types/react": "^18.2.6",
110112
"@types/react-beautiful-dnd": "^12.1.2",
111113
"@types/react-copy-to-clipboard": "^4.3.0",
112114
"@types/react-dom": "^16.9.0",
@@ -132,6 +134,6 @@
132134
"eslint-plugin-simple-import-sort": "^10.0.0",
133135
"nodemon": "^2.0.20",
134136
"prettier": "^2.2.1",
135-
"typescript": "^4.8.3"
137+
"typescript": "^5.0.4"
136138
}
137139
}

server/ws/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ ws.onclose = () => {
6464
updateDb();
6565
};
6666

67-
ws.onerror = () => {
68-
console.log("WS ERROR");
67+
ws.onerror = err => {
68+
console.log("WS ERROR", err);
6969
clearInterval(updateDbInterval);
7070
updateDb();
7171
};

src/App.css

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ a:hover {
124124
}
125125

126126
.app-sub-header {
127-
padding: 3px 12px;
127+
padding: 6px 12px;
128128
}
129129

130130
.cps-container {
@@ -162,7 +162,7 @@ h3.ant-typography,
162162
}
163163

164164
.app-sub-header {
165-
padding: 3px 18px;
165+
padding: 6px 18px;
166166
}
167167

168168
.cps-container {
@@ -333,7 +333,8 @@ h3.ant-typography,
333333
font-weight: bold;
334334
}
335335

336-
.detail-layout .ant-row + .ant-row {
336+
.detail-layout .ant-row + .ant-row,
337+
.detail-layout.ant-row + .ant-row {
337338
margin-top: 8px;
338339
padding-top: 8px;
339340
border-top: solid 1px #f0f2f5;
@@ -390,10 +391,6 @@ h4.ant-typography {
390391
border-color: rgba(255, 255, 255, 0.7);
391392
}
392393

393-
/* .home-banner .ant-input-affix-wrapper {
394-
border: none;
395-
} */
396-
397394
.what-is-card {
398395
text-align: center;
399396
}
@@ -448,19 +445,6 @@ h4.ant-typography {
448445
margin-top: 2px;
449446
}
450447

451-
body,
452-
.ant-card,
453-
.ant-menu,
454-
.ant-input,
455-
.ant-timeline,
456-
.ant-typography,
457-
.ant-dropdown-menu-item,
458-
.ant-dropdown-menu-submenu-title,
459-
.ant-select-item,
460-
.ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
461-
color: rgba(0, 0, 0, 0.65);
462-
}
463-
464448
.ant-input-search .anticon-search,
465449
.ant-input-search .search-history-icon {
466450
color: rgba(0, 0, 0, 0.45);
@@ -495,7 +479,7 @@ body,
495479
}
496480

497481
.transaction-card .ant-row:not(:last-child) {
498-
border-bottom: solid 1px #f0f0f0;
482+
border-bottom: solid 1px #f0f2f5;
499483
}
500484

501485
.transaction-card .ant-row.row-header {
@@ -515,25 +499,10 @@ body,
515499
margin-bottom: 12px;
516500
}
517501

518-
.ant-menu-horizontal .ant-menu-item,
519-
.ant-menu-horizontal .ant-menu-submenu:not(.ant-menu-submenu-popup) {
520-
margin: 0 6px !important;
521-
padding: 0 18px 0 12px !important;
522-
}
523-
524502
.ant-menu-item .anticon,
525503
.ant-menu-submenu-title .anticon {
526504
min-width: 14px;
527505
margin-right: 10px;
528-
font-size: 14px;
529-
}
530-
531-
.ant-menu-vertical > .ant-menu-item:hover {
532-
background-color: #f5f5f5;
533-
}
534-
535-
.ant-menu-vertical > .ant-menu-item:not(.ant-menu-item-selected) {
536-
color: rgba(0, 0, 0, 0.65);
537506
}
538507

539508
.qrcode-reader {
@@ -581,3 +550,15 @@ body,
581550
.guide td {
582551
padding: 0 6px;
583552
}
553+
554+
.ant-tree-switcher {
555+
display: none;
556+
}
557+
558+
.tree-container {
559+
margin: 10px 0;
560+
}
561+
562+
.ant-tree {
563+
padding: 10px 0;
564+
}

src/App.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import "antd/dist/antd.css";
1+
// import "antd/dist/antd.css";
2+
import "antd/dist/reset.css";
23
import "leaflet/dist/leaflet.css";
34
import "leaflet-extra-markers/dist/css/leaflet.extra-markers.min.css";
45
import "./App.css";
@@ -9,7 +10,7 @@ import { Helmet } from "react-helmet";
910
import { useTranslation } from "react-i18next";
1011
import { Route, Switch } from "react-router-dom";
1112

12-
import { Layout } from "antd";
13+
import { ConfigProvider, Layout, theme } from "antd";
1314

1415
import "components/utils/analytics";
1516
import { PreferencesContext, Theme } from "api/contexts/Preferences";
@@ -45,10 +46,15 @@ const { Content } = Layout;
4546

4647
const App: React.FC = () => {
4748
const { t } = useTranslation();
48-
const { theme } = React.useContext(PreferencesContext);
49+
const { theme: themeContext } = React.useContext(PreferencesContext);
4950

5051
return (
51-
<>
52+
<ConfigProvider
53+
theme={{
54+
algorithm:
55+
themeContext === Theme.DARK ? theme.darkAlgorithm : undefined,
56+
}}
57+
>
5258
<Helmet>
5359
<html lang={i18next.language} />
5460
<title>NanoLooker {t("common.blockExplorer")}</title>
@@ -58,12 +64,12 @@ const App: React.FC = () => {
5864
/>
5965
<meta
6066
name="theme-color"
61-
content={theme === Theme.DARK ? "#131313" : "#eff2f5"}
67+
content={themeContext === Theme.DARK ? "#131313" : "#eff2f5"}
6268
/>
6369
</Helmet>
6470
<Layout
6571
style={{ minHeight: "100vh" }}
66-
className={theme ? `theme-${theme}` : undefined}
72+
className={themeContext ? `theme-${themeContext}` : undefined}
6773
>
6874
<NodeHealth />
6975
<AppHeader />
@@ -108,7 +114,7 @@ const App: React.FC = () => {
108114
</Content>
109115
<AppFooter />
110116
</Layout>
111-
</>
117+
</ConfigProvider>
112118
);
113119
};
114120

0 commit comments

Comments
 (0)