feat:backup
This commit is contained in:
parent
5d83324f50
commit
e612aafb9c
|
@ -0,0 +1,5 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
|
@ -34,7 +34,7 @@
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
"@testing-library/react": "^13.4.0",
|
"@testing-library/react": "^13.4.0",
|
||||||
"@testing-library/user-event": "^13.5.0",
|
"@testing-library/user-event": "^13.5.0",
|
||||||
"antd": "5.17.0",
|
"antd": "^5.17.0",
|
||||||
"axios": "^1.3.3",
|
"axios": "^1.3.3",
|
||||||
"concurrently": "^4.1.1",
|
"concurrently": "^4.1.1",
|
||||||
"craco-less": "^2.0.0",
|
"craco-less": "^2.0.0",
|
||||||
|
@ -7423,6 +7423,10 @@
|
||||||
"scroll-into-view-if-needed": "^3.1.0",
|
"scroll-into-view-if-needed": "^3.1.0",
|
||||||
"throttle-debounce": "^5.0.0"
|
"throttle-debounce": "^5.0.0"
|
||||||
},
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/ant-design"
|
||||||
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=16.9.0",
|
"react": ">=16.9.0",
|
||||||
"react-dom": ">=16.9.0"
|
"react-dom": ">=16.9.0"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
"@testing-library/react": "^13.4.0",
|
"@testing-library/react": "^13.4.0",
|
||||||
"@testing-library/user-event": "^13.5.0",
|
"@testing-library/user-event": "^13.5.0",
|
||||||
"antd": "5.17.0",
|
"antd": "^5.17.0",
|
||||||
"axios": "^1.3.3",
|
"axios": "^1.3.3",
|
||||||
"concurrently": "^4.1.1",
|
"concurrently": "^4.1.1",
|
||||||
"craco-less": "^2.0.0",
|
"craco-less": "^2.0.0",
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
"yjs": ">=13.5.42"
|
"yjs": ">=13.5.42"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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",
|
"start": "craco start",
|
||||||
"build": "craco build",
|
"build": "craco build",
|
||||||
"startel": "electron .",
|
"startel": "electron .",
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||||
<!-- 应用加壳 -->
|
<!-- 应用加壳 -->
|
||||||
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
|
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
|
||||||
<title>送给最亲爱的小宝贝</title>
|
<title>Note</title>
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<script src="js/html5.js"></script>
|
<script src="js/html5.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import '~antd/dist/antd.less';
|
@import '~antd/dist/reset.css';
|
||||||
.ant-tree{
|
.ant-tree{
|
||||||
overflow: auto scroll;
|
overflow: auto scroll;
|
||||||
height: 95.7%;
|
height: 95.7%;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import '~antd/dist/antd.less';
|
@import '~antd/dist/reset.css';
|
||||||
|
|
||||||
#components-grid-demo-playground [class~='ant-col'] {
|
#components-grid-demo-playground [class~='ant-col'] {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
|
|
@ -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 (
|
|
||||||
<div>
|
|
||||||
<span>同步最近</span><InputNumber min={1} max={10000} defaultValue={this.state.size} onChange={this.eidtSyncContextSize}/>条数据,
|
|
||||||
<Button onClick={this.syncContext}>确认</Button>.
|
|
||||||
<hr/>
|
|
||||||
<HistoryRecord/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default connect(
|
|
||||||
null,
|
|
||||||
// state => ({
|
|
||||||
// }),//映射状态
|
|
||||||
{historyRecordSync}//映射操作状态的方法
|
|
||||||
)(SyncContext)
|
|
|
@ -3,7 +3,7 @@ import historyReducer from './historyRecord_reducer'
|
||||||
import dirMessageReducer from './dirMessage_reducer'
|
import dirMessageReducer from './dirMessage_reducer'
|
||||||
import pushHotkeysReducer from "./pushHotkeys_reducer";
|
import pushHotkeysReducer from "./pushHotkeys_reducer";
|
||||||
import tableBarItemReducer from "./tableBarItem_reducer";
|
import tableBarItemReducer from "./tableBarItem_reducer";
|
||||||
import {electronStorage} from "../utils/LocalStorage";
|
import {electronStorage} from "@/utils/LocalStorage";
|
||||||
import { persistStore, persistReducer } from 'redux-persist'
|
import { persistStore, persistReducer } from 'redux-persist'
|
||||||
// 持久化配置
|
// 持久化配置
|
||||||
const historyRecordPersistConfig = {
|
const historyRecordPersistConfig = {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
const {createProxyMiddleware} = require('http-proxy-middleware')
|
// const {createProxyMiddleware} = require('http-proxy-middleware')
|
||||||
module.exports=function(app){
|
// module.exports=function(app){
|
||||||
app.use(
|
// app.use(
|
||||||
createProxyMiddleware('/ticai',{
|
// createProxyMiddleware('/ticai',{
|
||||||
target:'http://localhost:8090/',
|
// target:'http://localhost:8090/',
|
||||||
changeOrigin:false,
|
// changeOrigin:false,
|
||||||
pathRewrite:{'^/ticai':''}
|
// pathRewrite:{'^/ticai':''}
|
||||||
}),
|
// }),
|
||||||
createProxyMiddleware('/oauth',{
|
// createProxyMiddleware('/oauth',{
|
||||||
target:'http://localhost:1112',
|
// target:'http://localhost:1112',
|
||||||
changeOrigin:true,
|
// changeOrigin:true,
|
||||||
pathRewrite:{'^/oauth':''}
|
// pathRewrite:{'^/oauth':''}
|
||||||
})
|
// })
|
||||||
)
|
// )
|
||||||
}
|
// }
|
Loading…
Reference in New Issue