From e612aafb9c910cac47023c58c5273caa3ea62fe4 Mon Sep 17 00:00:00 2001 From: 1708-huayu <57060237+1708-huayu@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:31:25 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9Abackup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 5 +++ package-lock.json | 6 +++- package.json | 4 +-- public/index.html | 2 +- src/components/ItemTree/index.less | 2 +- src/pages/GateWay/index.less | 2 +- src/pages/SyncContext/index.jsx | 57 ------------------------------ src/redux/store.js | 2 +- src/setupProxy.js | 30 ++++++++-------- 9 files changed, 31 insertions(+), 79 deletions(-) create mode 100644 .idea/.gitignore delete mode 100644 src/pages/SyncContext/index.jsx diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/package-lock.json b/package-lock.json index ffd86d4..6b05f71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "antd": "5.17.0", + "antd": "^5.17.0", "axios": "^1.3.3", "concurrently": "^4.1.1", "craco-less": "^2.0.0", @@ -7423,6 +7423,10 @@ "scroll-into-view-if-needed": "^3.1.0", "throttle-debounce": "^5.0.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ant-design" + }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" diff --git a/package.json b/package.json index 1522662..caaaacf 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "antd": "5.17.0", + "antd": "^5.17.0", "axios": "^1.3.3", "concurrently": "^4.1.1", "craco-less": "^2.0.0", @@ -44,7 +44,7 @@ "yjs": ">=13.5.42" }, "scripts": { - "dev": "concurrently \"wait-on http://localhost:3000 && electron-forge start\" \"cross-env BROWSER=none npm start\"", + "dev": "concurrently \"wait-on http://localhost:3000 && electron .\" \"cross-env BROWSER=none npm start\"", "start": "craco start", "build": "craco build", "startel": "electron .", diff --git a/public/index.html b/public/index.html index d10112c..fb29b23 100644 --- a/public/index.html +++ b/public/index.html @@ -14,7 +14,7 @@ - 送给最亲爱的小宝贝 + Note diff --git a/src/components/ItemTree/index.less b/src/components/ItemTree/index.less index b409f7a..5e77ed5 100644 --- a/src/components/ItemTree/index.less +++ b/src/components/ItemTree/index.less @@ -1,4 +1,4 @@ -@import '~antd/dist/antd.less'; +@import '~antd/dist/reset.css'; .ant-tree{ overflow: auto scroll; height: 95.7%; diff --git a/src/pages/GateWay/index.less b/src/pages/GateWay/index.less index f2edc16..4d81df7 100644 --- a/src/pages/GateWay/index.less +++ b/src/pages/GateWay/index.less @@ -1,4 +1,4 @@ -@import '~antd/dist/antd.less'; +@import '~antd/dist/reset.css'; #components-grid-demo-playground [class~='ant-col'] { background: transparent; diff --git a/src/pages/SyncContext/index.jsx b/src/pages/SyncContext/index.jsx deleted file mode 100644 index f2b145e..0000000 --- a/src/pages/SyncContext/index.jsx +++ /dev/null @@ -1,57 +0,0 @@ -import { Button,InputNumber,message } from 'antd' -import React, { Component } from 'react' -import axios from 'axios' -import HistoryRecord from '../../components/HistoryRecord' -import { connect } from 'react-redux'; -import { historyRecordSync } from '../../redux/historyRecord_reducer'; -class SyncContext extends Component { - state={size:1} - eidtSyncContextSize=(event)=>{ - this.setState({size:event}) - } - historySync=(data)=>{ - console.info("historySync(data)",data) - this.props.historyRecordSync(data) - } - syncContext = () => { - const key = 'SYNC_CONTEXT'; - message.loading({content:'Loading...',key,duration:0}); - axios.get(`/ticai/sync/context/${this.state.size}`) - .then(response => { - const result = response.data; - if (result.status.code === 200) { - console.log(result.data.length) - message.destroy(key) - message.success({ - content: "成功同步"+result.data.length+"条", - duration: 2, - }) - this.historySync(result.data) - } else { - message.destroy(key) - message.error(result.status.message) - } - }) - .catch(function (error) { - message.destroy(key) - message.error(error) - }) - } - render() { - return ( -
- 同步最近条数据, - . -
- -
- ) - } -} - -export default connect( - null, - // state => ({ - // }),//映射状态 - {historyRecordSync}//映射操作状态的方法 -)(SyncContext) diff --git a/src/redux/store.js b/src/redux/store.js index 40b1720..6b10567 100644 --- a/src/redux/store.js +++ b/src/redux/store.js @@ -3,7 +3,7 @@ import historyReducer from './historyRecord_reducer' import dirMessageReducer from './dirMessage_reducer' import pushHotkeysReducer from "./pushHotkeys_reducer"; import tableBarItemReducer from "./tableBarItem_reducer"; -import {electronStorage} from "../utils/LocalStorage"; +import {electronStorage} from "@/utils/LocalStorage"; import { persistStore, persistReducer } from 'redux-persist' // 持久化配置 const historyRecordPersistConfig = { diff --git a/src/setupProxy.js b/src/setupProxy.js index 491e116..9127e1a 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,15 +1,15 @@ -const {createProxyMiddleware} = require('http-proxy-middleware') -module.exports=function(app){ - app.use( - createProxyMiddleware('/ticai',{ - target:'http://localhost:8090/', - changeOrigin:false, - pathRewrite:{'^/ticai':''} - }), - createProxyMiddleware('/oauth',{ - target:'http://localhost:1112', - changeOrigin:true, - pathRewrite:{'^/oauth':''} - }) - ) -} \ No newline at end of file +// const {createProxyMiddleware} = require('http-proxy-middleware') +// module.exports=function(app){ +// app.use( +// createProxyMiddleware('/ticai',{ +// target:'http://localhost:8090/', +// changeOrigin:false, +// pathRewrite:{'^/ticai':''} +// }), +// createProxyMiddleware('/oauth',{ +// target:'http://localhost:1112', +// changeOrigin:true, +// pathRewrite:{'^/oauth':''} +// }) +// ) +// } \ No newline at end of file