Skip to content

Commit

Permalink
feat: log version
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxy0551 committed Dec 3, 2024
1 parent 8bb4994 commit 42e1452
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions app/web/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { bindActionCreators } from 'redux';

import routes from '@/router';
import * as actions from '@/store/actions';
import { version } from '../../package.json';
import 'antd/dist/antd.less';
import 'ant-design-dtinsight-theme/theme/dt-theme/reset.less';
import 'ant-design-dtinsight-theme/theme/dt-theme/index.less';
Expand All @@ -33,10 +34,20 @@ const App = () => {
a.appendChild(r);
})(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
};

const logVersion = () => {
window.console.log(
`%cApp current version: v${version}`,
'font-family: Cabin, Helvetica, Arial, sans-serif;text-align: left;font-size:32px;color:#B21212;'
);
};

useEffect(() => {
logVersion();
hotJar();
changeLocalIp();
}, []);

return (
<div style={{ height: '100%' }}>
<ConfigProvider locale={zhCN}>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
}
},
"engines": {
"node": "14"
"node": ">=14"
},
"ci": {
"version": "8, 9"
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4275,9 +4275,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001400:
version "1.0.30001622"
resolved "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001622.tgz"
integrity sha512-H+g7cwL2r1TzN4HpM1ZzhaOf7zwMNAZomX/uao6flMFsT3sLIpxi9H3QMo7U0KPWr0a8/Zvl8sQgrr6RXJ0HRw==
version "1.0.30001686"
resolved "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz"
integrity sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==

capture-stack-trace@^1.0.0:
version "1.0.2"
Expand Down

0 comments on commit 42e1452

Please sign in to comment.