From 21762c21ebd56fad85aef4eb3eb407947703c301 Mon Sep 17 00:00:00 2001
From: nigel007 <609441862@qq.com>
Date: Fri, 23 Apr 2021 21:38:14 +0800
Subject: [PATCH 1/6] change blockchain related things
---
.idea/workspace.xml | 1441 ++++++++++-------------
package.json | 4 +-
src/AppConfig.js | 4 +-
src/forge/Blockchain/Dispose.jsx | 119 ++
src/forge/Merge/MessageCount.js | 17 +-
src/forge/New/Index.js | 40 +
src/forge/Order/Detail.js | 20 +
src/forge/Order/order_form.js | 50 +-
src/forge/users/BlockchainExCre.jsx | 160 +++
src/forge/users/BlockchainExHistory.jsx | 60 +
src/forge/users/BlockchainExList.jsx | 81 ++
src/forge/users/BlockchainExMenu.jsx | 38 +
src/forge/users/BlockchainExVerify.jsx | 84 ++
src/forge/users/BlockchainTransfer.jsx | 108 ++
src/forge/users/Infos.js | 64 +-
15 files changed, 1481 insertions(+), 809 deletions(-)
create mode 100644 src/forge/Blockchain/Dispose.jsx
create mode 100644 src/forge/users/BlockchainExCre.jsx
create mode 100644 src/forge/users/BlockchainExHistory.jsx
create mode 100644 src/forge/users/BlockchainExList.jsx
create mode 100644 src/forge/users/BlockchainExMenu.jsx
create mode 100644 src/forge/users/BlockchainExVerify.jsx
create mode 100644 src/forge/users/BlockchainTransfer.jsx
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f221492f6..929a33efc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,291 +2,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -311,102 +34,96 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -414,38 +131,45 @@
+
+
+
- high
- markdown
- markdown-body
- readme
- SSH
- clone
- edu_pu
- edu_
- .str
- ssh
- /projects
- 全部项目数
- 未选择标签
- 未选择里程碑
- .issueItem
- 未选择
- issueItem
- detailContent
- df mt20
- .detailHeader-wrapper
- headerMenu-wrapper
- 对话
- issueNo
- f-wrap-between
- user_img
- getCommitList
- login
- 点击开启
- build
- HEAD
+ projectId
+ params
+ token_num
+ getElementById
+ number
+ this.
+ change_issue_type
+ changeStatus
+ adjustTokenNum
+ id
+ console.log
+ onInput
+ issue_token_num
+ setAttribute
+ 创建
+ 完成度:
+ data
+ blockchain
+ setList(result.data.results);
+ componentDidMount
+ getBlockchainTokenNum
+ start_date
+ 项目简介
+ blockchain_token_num
+ 该合并请求可以进行自动合并操作
+ 变基并合并
+ 合并请求
+ menu
+ transfer_login
+ fix_issue_id
任务
@@ -467,24 +191,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -493,10 +199,8 @@
-
-
@@ -515,15 +219,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -541,7 +265,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -551,23 +288,33 @@
+
-
+
-
+
+
+
+
+
+
+
+
+
+
@@ -588,6 +335,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -636,36 +406,75 @@
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -720,471 +529,501 @@
+
+
+
+
+ file://$PROJECT_DIR$/src/forge/users/BlockchainTransfer.jsx
+ 66
+
+
+
+
+ file://$PROJECT_DIR$/src/forge/users/BlockchainExCre.jsx
+ 48
+
+
+
+
+ file://$PROJECT_DIR$/src/forge/users/BlockchainTransfer.jsx
+ 44
+
+
+
+
+ file://$PROJECT_DIR$/src/forge/users/BlockchainExVerify.jsx
+ 18
+
+
+
+
+ file://$PROJECT_DIR$/src/forge/users/BlockchainExMenu.jsx
+ 13
+
+
+
+
+ file://$PROJECT_DIR$/src/forge/Order/Detail.js
+ 71
+
+
+
+
+
+
+
+
+
+ url
+ JavaScript
+ EXPRESSION
+
+
+ orderId
+ JavaScript
+ EXPRESSION
+
+
+ result.data.blockchain_token_num
+ JavaScript
+ EXPRESSION
+
+
+ result.data
+ JavaScript
+ EXPRESSION
+
+
+ data.version
+ JavaScript
+ EXPRESSION
+
+
+ data.issue_status
+ JavaScript
+ EXPRESSION
+
+
+ data
+ JavaScript
+ EXPRESSION
+
+
+ user.user_id
+ JSX Harmony
+ EXPRESSION
+
+
+ user
+ JSX Harmony
+ EXPRESSION
+
+
+ result.data.projects
+ JSX Harmony
+ EXPRESSION
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
-
-
+
+
-
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
+
-
-
-
-
-
-
+
+
-
+
-
-
-
-
-
+
+
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
+
+
-
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/package.json b/package.json
index edc6e18e7..9d6b82b7e 100644
--- a/package.json
+++ b/package.json
@@ -178,7 +178,7 @@
"eslintConfig": {
"extends": "react-app"
},
- "proxy": "http://localhost:3000",
+ "proxy": "http://localhost:3001",
"port": "3007",
"devDependencies": {
"@babel/runtime": "7.0.0-beta.51",
@@ -198,7 +198,7 @@
"purgecss": "^2.1.2",
"reqwest": "^2.0.5",
"resize-observer-polyfill": "^1.5.1",
- "terser-webpack-plugin": "^2.3.5",
+ "terser-webpack-plugin": "^2.3.8",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.42.1",
"webpack-bundle-analyzer": "^3.7.0"
diff --git a/src/AppConfig.js b/src/AppConfig.js
index a369d843b..e0fb18bde 100644
--- a/src/AppConfig.js
+++ b/src/AppConfig.js
@@ -57,8 +57,8 @@ export function initAxiosInterceptors(props) {
initOnlineOfflineListener()
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation
var
- proxy = "http://localhost:3000";
- proxy = "https://testforgeplus.trustie.net";
+ proxy = "http://localhost:3001";
+ // proxy = "https://testforgeplus.trustie.net";
const requestMap = {};
window.setfalseInRequestMap = function (keyName) {
diff --git a/src/forge/Blockchain/Dispose.jsx b/src/forge/Blockchain/Dispose.jsx
new file mode 100644
index 000000000..f8aad2ebd
--- /dev/null
+++ b/src/forge/Blockchain/Dispose.jsx
@@ -0,0 +1,119 @@
+import React , { useState , useEffect } from 'react';
+import { Spin } from 'antd';
+import { Blueback } from '../Component/layout';
+import Editor from "react-monaco-editor";
+import Modals from './DisposeModal';
+import FileLanguage from '../Component/OpsFileLanguage';
+import axios from 'axios';
+
+
+function Dispose(props){
+ const [ spining , setSpining ] = useState(true);
+ const [ info , setInfo ] = useState('.trustie-pipeline.yml');
+ const [ visible , setVisible ] = useState(false);
+ const [ ymlValue , setYmlValue ] = useState("");
+ const [ sha , setSha ] = useState(undefined);
+ const [ fileLanguage , setFileLanguage ] = useState(undefined);
+ const [ first , setFirst ] = useState(false);
+
+ let projectsId = props.match.params.projectsId;
+ let owner = props.match.params.owner;
+ useEffect(()=>{
+ if(projectsId){
+ const url = `/${owner}/${projectsId}/get_trustie_pipeline.json`;
+ axios.get(url,{
+ params:{
+ project_id:projectsId
+ }
+ }).then(result=>{
+ if(result && result.data.content){
+ setInfo(result.data.name);
+ setYmlValue(result.data.content);
+ setFirst(true);
+ setSha(result.data.sha);
+ }else{
+ setFirst(false);
+ }
+ setSpining(false);
+ }).catch(error=>{
+ console.log(error);
+ })
+ }
+ },[projectsId])
+
+ // 修改文件内容
+ function changeEditor(value){
+ setYmlValue(value);
+ }
+
+ // 切换语言
+ function select_language(value,array){
+ setFileLanguage(value);
+ setYmlValue( array && array.content);
+ }
+
+ // 确定提交
+ function submit(){
+ let url = '';
+ const { defaultBranch } = props;
+ let params = {
+ branch: defaultBranch,
+ content:ymlValue,
+ filepath:info,
+ message:''
+ }
+ if(first){
+ // 为true,则是编辑否则是新建
+ url = `/${owner}/${projectsId}/update_trustie_pipeline.json`;
+ axios.put(url,{
+ ...params,
+ sha
+ }).then(result=>{
+ if(result){
+ setVisible(true);
+ }
+ }).catch(error=>{
+ console.log(error);
+ })
+ }else{
+ url = `/${owner}/${projectsId}/create_file.json`;
+ axios.post(url,params).then(result=>{
+ if(result){
+ setVisible(true);
+ }
+ }).catch(error=>{
+ console.log(error);
+ })
+ }
+ }
+ function suresubmit(){
+ setVisible(false);
+ props.history.push(`/projects/${owner}/${projectsId}/devops/list`);
+ }
+
+ return(
+
+ setVisible(flag)} sureFunc={suresubmit}>
+ 编程语言:
+
+
+
+
+ 配置脚本:
+
+ 确定提交
+
+ )
+}
+export default Dispose;
\ No newline at end of file
diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js
index 759217011..d2e4a1d15 100644
--- a/src/forge/Merge/MessageCount.js
+++ b/src/forge/Merge/MessageCount.js
@@ -42,6 +42,8 @@ class MessageCount extends Component {
pr_status: undefined,
copyVisible:false,
+
+ fix_issue_id: "",
};
}
@@ -120,7 +122,7 @@ class MessageCount extends Component {
SpinMerge: true,
});
const { projectsId , owner } = this.props.match.params;
- const { data, title, body, mergekey, pr_status } = this.state;
+ const { data, title, body, mergekey, pr_status, fix_issue_id } = this.state;
const url = `/${owner}/${projectsId}/pulls/${data.pull_request.id}/pr_merge.json`;
axios
.post(url, {
@@ -129,6 +131,7 @@ class MessageCount extends Component {
do: mergekey,
body: body,
title: title,
+ fix_issue_id: fix_issue_id,
})
.then((result) => {
if (result) {
@@ -160,6 +163,12 @@ class MessageCount extends Component {
});
};
+ changefixissue = (e) => {
+ this.setState({
+ fix_issue_id: parseInt(e.target.value),
+ });
+ };
+
submitmerge = () => {
if (this.state.mergekey === "rebase") {
this.setState({
@@ -497,6 +506,12 @@ class MessageCount extends Component {
value={this.state.body}
onChange={this.changbodypr}
/>
+
{
+ console.log("here need the change of display")
+ }
+
render() {
const { getFieldDecorator } = this.props.form;
// 项目类型:deposit-托管项目,mirror-镜像项目
@@ -438,6 +445,39 @@ class Index extends Component {
将项目设为私有(只有项目所有人或拥有权限的项目成员才能看到)
)}
+ {/*增加区块链选项,不要求必选,默认是选择的*/}
+
{
this.getDetail();
+ this.getBlockchainTokenNum();
};
getDetail = () => {
@@ -61,6 +63,20 @@ class Detail extends Component {
});
};
+ getBlockchainTokenNum = () => {
+ const { projectsId, orderId, owner } = this.props.match.params;
+ const url = `/blockchain/issue/get_token_num`;
+ axios.post(url,{
+ "issue_id": {orderId}
+ }).then(result=>{
+ if(result && result.data){
+ this.state.blockchain_token_num = result.data.blockchain_token_num;
+ }
+ }).catch(error=>{
+ console.log(error);
+ })
+ };
+
handleok = () => {
this.setState({
isShow: false,
@@ -330,6 +346,10 @@ class Detail extends Component {
)}
+
+ 悬赏金额:
+ {this.state.blockchain_token_num}
+
里程碑:
diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js
index db36c3ea0..f27a14b24 100644
--- a/src/forge/Order/order_form.js
+++ b/src/forge/Order/order_form.js
@@ -13,6 +13,7 @@ const Option = Select.Option;
class order_form extends Component {
constructor(props) {
super(props);
+ this.getTokenProject(props.current_user.user_id, this.props.match.params.owner, this.props.match.params.projectsId);
this.state = {
branch_name: "",
issue_tag_ids: "",
@@ -35,9 +36,27 @@ class order_form extends Component {
get_attachments: undefined,
show_token: false,
cannot_edit: false,
- issue_current_user: true
+ issue_current_user: true,
+ issue_token_num: 0,
+ blockchain_token_num: 0
};
}
+
+ getTokenProject = (user_id, owner_login, project_name) => {
+ const url = `/users/blockchain/balance_project`;
+ axios.post(url,{
+ user_id: user_id,
+ owner_login: owner_login,
+ project_name: project_name
+ }).then(result=>{
+ if(result && result.data){
+ this.state.issue_token_num = result.data.balance;
+ }
+ }).catch(error=>{
+ console.log(error);
+ })
+ }
+
componentDidUpdate=(prevPros)=>{
if(prevPros && this.props && this.props.checkIfLogin()===false){
this.props.history.push("/403")
@@ -152,7 +171,7 @@ class order_form extends Component {
if (values.issue_tag_ids.length > 0) {
values.issue_tag_ids = [values.issue_tag_ids];
}
- const { description, start_date, due_date, issue_type } = this.state;
+ const { description, start_date, due_date, issue_type, blockchain_token_num } = this.state;
if (form_type === "new") {
const url = `/${owner}/${projectsId}/issues.json`;
axios.post(url, {
@@ -162,6 +181,7 @@ class order_form extends Component {
start_date: start_date,
due_date: due_date,
issue_type: issue_type,
+ blockchain_token_num: blockchain_token_num
}).then((result) => {
if (result && result.data.id) {
this.props.showNotification("任务创建成功!");
@@ -297,6 +317,20 @@ class order_form extends Component {
}
};
+ adjustTokenNum = (e) => {
+ var val = e.target.value;
+ val = parseInt(val);
+ if (val > this.state.issue_token_num) {
+ val = this.state.issue_token_num;
+ e.target.value = this.state.issue_token_num;
+ } else {
+ e.target.value = val;
+ }
+ this.setState({
+ blockchain_token_num: val,
+ });
+ }
+
render() {
const { getFieldDecorator } = this.props.form;
const { projectsId , owner } = this.props.match.params;
@@ -379,6 +413,18 @@ class order_form extends Component {
+
+ {getFieldDecorator("issue_token_num", {rules: []})(
+ this.input_token=input}
+ type={"number"}
+ min={0}
+ max={this.state.issue_token_num}
+ onChange={this.adjustTokenNum.bind(this)}
+ placeholder="定义悬赏token数量"
+ />
+ )}
+
{getFieldDecorator("assigned_to_id", {rules: []})(
}
-
+
+
+ {
+ current_user && current_user.login && current_user.login === username &&
+
+ }
+
{/*
@@ -336,6 +386,18 @@ class Infos extends Component {
return
;
}}
>
+
{
+ return ;
+ }}
+ >
+
{
+ return ;
+ }}
+ >
{
From c52fa2e79fa2c2672d1a096cfb04f75a7fb459b9 Mon Sep 17 00:00:00 2001
From: nigel007 <609441862@qq.com>
Date: Wed, 12 May 2021 15:45:02 +0800
Subject: [PATCH 2/6] change appearance in blockchain functions
---
.idea/workspace.xml | 439 ++++++++++++------------
src/forge/New/Index.js | 19 +-
src/forge/New/new.css | 5 +
src/forge/users/BlockchainExCre.jsx | 20 +-
src/forge/users/BlockchainExHistory.jsx | 23 +-
src/forge/users/BlockchainExList.jsx | 20 +-
src/forge/users/BlockchainExVerify.jsx | 25 +-
src/forge/users/BlockchainTransfer.jsx | 17 +-
src/forge/users/Index.scss | 42 +++
9 files changed, 344 insertions(+), 266 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index e5de4991e..3324518b0 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,53 +2,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
@@ -72,23 +33,56 @@
-
-
+
+
-
-
+
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -105,37 +99,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -144,28 +112,37 @@
-
+
-
-
+
+
+
+
+
-
+
-
-
+
+
+
+
+
-
+
-
-
+
+
+
+
+
@@ -181,36 +158,36 @@
- changeStatus
- adjustTokenNum
- id
- console.log
- onInput
- issue_token_num
- setAttribute
- 创建
- 完成度:
- data
- blockchain
- setList(result.data.results);
- componentDidMount
- getBlockchainTokenNum
- start_date
- 项目简介
- blockchain_token_num
- 该合并请求可以进行自动合并操作
- 变基并合并
- 合并请求
- menu
- fix_issue_id
- initOnlineOfflineListener
- 10.13.102.14
- transfer_login
- 合并描述
- localhost:3001
proxy
3007
HEAD
+ changeDesc
+ 请填写项目token总数
+ type
+ type=
+ getElementB
+ setS
+ setState
+ getElementsBy
+ getElement
+ state
+ hidden
+ show_div
+ this.state
+ handleBlockchainChange
+ <Table
+ 请输入转给
+ 历史交易
+ 交易
+ ?
+ 售卖token数量
+ 输入售卖金额
+ selectProjectChange
+ auth
+ 确认收货
+ token_num
+ 请输入转账token
+ token数量
任务
@@ -232,8 +209,6 @@
-
-
@@ -269,12 +244,7 @@
-
-
-
-
-
@@ -282,7 +252,14 @@
+
+
+
+
+
+
+
@@ -465,12 +442,12 @@
-
+
-
+
@@ -485,7 +462,7 @@
-
+
@@ -675,24 +652,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -753,13 +712,6 @@
-
-
-
-
-
-
-
@@ -902,23 +854,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -929,33 +864,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -966,16 +874,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -993,16 +891,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1024,16 +912,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1044,15 +922,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js
index 53f62d801..3f013f593 100644
--- a/src/forge/New/Index.js
+++ b/src/forge/New/Index.js
@@ -46,7 +46,8 @@ class Index extends Component {
project_category_name: undefined,
license_name: undefined,
ignore_name: undefined,
- descNum:0
+ descNum:0,
+ show_div:"hidden",
}
}
componentDidMount = () => {
@@ -259,7 +260,15 @@ class Index extends Component {
// add by zxh: handleBlockchainChange
handleBlockchainChange = (event) => {
- console.log("here need the change of display")
+ if (this.state.show_div == 'hidden') {
+ this.setState({
+ show_div: "visible"
+ });
+ } else {
+ this.setState({
+ show_div: "hidden"
+ });
+ }
}
changeDesc=(e)=>{
@@ -516,12 +525,13 @@ class Index extends Component {
className="privatePart"
ref={(blockchain_item => {this.blockchain_item = blockchain_item})}
>
+
{getFieldDecorator('blockchain_token_all', {
rules: [{
required: false, message: '请填写项目token总数(单位:枚)'
}],
})(
-
+
)}
{getFieldDecorator('blockchain_init_token', {
@@ -529,8 +539,9 @@ class Index extends Component {
required: false, message: '请填写项目创始人获取token总数(单位:枚)'
}],
})(
-
+
)}
+
{
diff --git a/src/forge/New/new.css b/src/forge/New/new.css
index fcb6fa8cf..8442a70b9 100644
--- a/src/forge/New/new.css
+++ b/src/forge/New/new.css
@@ -54,4 +54,9 @@
.newContent_inline > .ant-form-item:nth-child(2){
margin-left:0px
}
+}
+
+.div_flex_row {
+ display: flex;
+ flex-direction: row;
}
\ No newline at end of file
diff --git a/src/forge/users/BlockchainExCre.jsx b/src/forge/users/BlockchainExCre.jsx
index 20e0e0a9e..231e22487 100644
--- a/src/forge/users/BlockchainExCre.jsx
+++ b/src/forge/users/BlockchainExCre.jsx
@@ -100,7 +100,7 @@ function BlockchainExCreate(props){
return(
-
+
-
+
-
+
- {/**/}
- {/**/}
- {/**/}
-
-
+
-
+
-
+
)
diff --git a/src/forge/users/BlockchainExHistory.jsx b/src/forge/users/BlockchainExHistory.jsx
index 1b41387e4..be8a30d0d 100644
--- a/src/forge/users/BlockchainExHistory.jsx
+++ b/src/forge/users/BlockchainExHistory.jsx
@@ -36,17 +36,28 @@ function BlockchainExHistory(props){
{
list && list.length > 0 ?
+ -
+
+
+ {"卖家名"}
+ {"项目创建者/项目名"}
+ {"token数量:价值"}
+ {"买家名"}
+ {"交易创建时间"}
+ {"交易截止时间"}
+
+
{list.map((item,key)=>{
return(
-
{item[3].id}
- {item[0].login}
- {item[1].login + "/" + item[2].name}
- {item[3].token_num + ":" + item[3].money}
- {item[4].login}
- {moment(item[3].created_at).format('YYYY-MM-DD HH:mm:ss')}
- {moment(item[3].updated_at).format('YYYY-MM-DD HH:mm:ss')}
+ {item[0].login}
+ {item[1].login + "/" + item[2].name}
+ {item[3].token_num + ":" + item[3].money}
+ {item[4].login}
+ {moment(item[3].created_at).format('YYYY-MM-DD HH:mm:ss')}
+ {moment(item[3].updated_at).format('YYYY-MM-DD HH:mm:ss')}
)
diff --git a/src/forge/users/BlockchainExList.jsx b/src/forge/users/BlockchainExList.jsx
index 55b460f6f..dbdcbe3d1 100644
--- a/src/forge/users/BlockchainExList.jsx
+++ b/src/forge/users/BlockchainExList.jsx
@@ -49,15 +49,27 @@ function BlockchainExList(props){
{
list && list.length > 0 ?
+ -
+
+
+ 卖家名
+ 项目创建者/项目名
+ token数
+ 售价
+
+ {
+
+ }
+
{list.map((item,key)=>{
return(
-
{item[3].id}
- {item[0].login}
- {item[1].login + "/" + item[2].name}
- {item[3].token_num}
- {item[3].money}
+ {item[0].login}
+ {item[1].login + "/" + item[2].name}
+ {item[3].token_num}
+ {item[3].money}
{
0 ?
+
+ -
+
+
+ 卖家名
+ 项目创建者/项目名
+ token数量:价值
+ 买家名
+ 交易时间
+
+ {
+
+ }
+
+
{list.map((item,key)=>{
return(
-
{item[3].id}
- {item[0].login}
- {item[1].login + "/" + item[2].name}
- {item[3].token_num + ":" + item[3].token_num}
- {item[4].login}
- {moment(item[3].created_at).format('YYYY-MM-DD HH:mm:ss')}
+ {item[0].login}
+ {item[1].login + "/" + item[2].name}
+ {item[3].token_num + ":" + item[3].money}
+ {item[4].login}
+ {moment(item[3].created_at).format('YYYY-MM-DD HH:mm:ss')}
{
0 ?
+ -
+ 项目创建者/项目名
+ token总量
+ 目标转账用户
+ 转账token数量
+
+
{list.map((item,index)=>{
return(
-
)
diff --git a/src/forge/users/Index.scss b/src/forge/users/Index.scss
index d8d4ecd4f..082053859 100644
--- a/src/forge/users/Index.scss
+++ b/src/forge/users/Index.scss
@@ -126,6 +126,48 @@ ul.ant-menu.menuStyle{
color: #28BD6C;
}
}
+.blockchain_proj{
+ display: inline-block;
+ font-size: 12px;
+ height: 22px;
+ width: 150px;
+}
+.blockchain_balance{
+ display: inline-block;
+ font-size: 12px;
+ height: 22px;
+ width: 60px;
+}
+.blockchain_input_to{
+ display: inline-block;
+ font-size: 12px;
+ height: 40px;
+ width: 150px;
+}
+.blockchain_input_num{
+ display: inline-block;
+ font-size: 12px;
+ height: 40px;
+ width: 150px;
+}
+.blockchain_proj_select{
+ display: inline-block;
+ font-size: 12px;
+ height: 40px;
+ width: 220px;
+}
+.blockchain_username{
+ display: inline-block;
+ font-size: 12px;
+ height: 40px;
+ width: 60px;
+}
+.blockchain_time{
+ display: inline-block;
+ font-size: 12px;
+ height: 40px;
+ width: 130px;
+}
.CIList{
padding:0px 30px;
min-height: 400px;
From 95bc2d7e3e8bede405fe3a5168e56395d83a8dbc Mon Sep 17 00:00:00 2001
From: nigel007 <609441862@qq.com>
Date: Thu, 13 May 2021 09:39:04 +0800
Subject: [PATCH 3/6] change width css
---
.idea/workspace.xml | 88 ++++++++++++++++++--------------------
src/forge/users/Index.scss | 4 +-
2 files changed, 43 insertions(+), 49 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 3324518b0..9c07a312d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,13 +2,7 @@
-
-
-
-
-
-
-
+
@@ -36,8 +30,8 @@
-
-
+
+
@@ -48,8 +42,8 @@
-
-
+
+
@@ -60,8 +54,8 @@
-
-
+
+
@@ -102,8 +96,8 @@
-
-
+
+
@@ -158,8 +152,6 @@
- proxy
- 3007
HEAD
changeDesc
请填写项目token总数
@@ -183,10 +175,12 @@
售卖token数量
输入售卖金额
selectProjectChange
- auth
确认收货
token_num
请输入转账token
+ 项目创建者/项目名
+ auth
+ token总量
token数量
@@ -442,12 +436,12 @@
-
+
-
+
@@ -462,7 +456,7 @@
-
+
@@ -476,8 +470,8 @@
-
-
+
+
@@ -980,16 +974,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1000,16 +984,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1020,10 +994,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1032,8 +1026,8 @@
-
-
+
+
diff --git a/src/forge/users/Index.scss b/src/forge/users/Index.scss
index 082053859..0037c7f93 100644
--- a/src/forge/users/Index.scss
+++ b/src/forge/users/Index.scss
@@ -130,13 +130,13 @@ ul.ant-menu.menuStyle{
display: inline-block;
font-size: 12px;
height: 22px;
- width: 150px;
+ width: 180px;
}
.blockchain_balance{
display: inline-block;
font-size: 12px;
height: 22px;
- width: 60px;
+ width: 100px;
}
.blockchain_input_to{
display: inline-block;
From 36691c25a46a1b4747834fa4d8aaa3f13f113d9a Mon Sep 17 00:00:00 2001
From: nigel007 <609441862@qq.com>
Date: Thu, 13 May 2021 16:05:54 +0800
Subject: [PATCH 4/6] remove description
---
.gitignore | 1 +
.idea/workspace.xml | 111 ++++++++++++++++++++---------------------
src/forge/New/Index.js | 2 +-
3 files changed, 57 insertions(+), 57 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9a82a1138..cf867fc58 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.idea/
# Logs
logs
*.log
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 9c07a312d..a319c472b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,8 +2,7 @@
-
-
+
@@ -42,8 +41,8 @@
-
-
+
+
@@ -51,29 +50,20 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -117,6 +107,15 @@
+
+
+
+
+
+
+
+
+
@@ -152,9 +151,6 @@
- HEAD
- changeDesc
- 请填写项目token总数
type
type=
getElementB
@@ -179,9 +175,12 @@
token_num
请输入转账token
项目创建者/项目名
- auth
token总量
token数量
+ auth
+ balance_project
+ 项目加入确权机制
+ getTokenProject
任务
@@ -247,13 +246,13 @@
-
+
@@ -436,12 +435,12 @@
-
+
-
+
@@ -470,7 +469,7 @@
-
+
@@ -892,13 +891,6 @@
-
-
-
-
-
-
-
@@ -944,16 +936,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -994,16 +976,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1026,8 +998,35 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js
index 3f013f593..01ef04315 100644
--- a/src/forge/New/Index.js
+++ b/src/forge/New/Index.js
@@ -391,7 +391,7 @@ class Index extends Component {
)}
- {descNum}/200
+ {/*{descNum}/200*/}
From 01d3972d3e46663954306138a49040c343c4b403 Mon Sep 17 00:00:00 2001
From: nigel007 <609441862@qq.com>
Date: Thu, 13 May 2021 22:28:57 +0800
Subject: [PATCH 5/6] add information
---
src/forge/Merge/MessageCount.js | 62 +++++++++++++++++++++++++++++----
1 file changed, 56 insertions(+), 6 deletions(-)
diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js
index d97078334..fc77d5431 100644
--- a/src/forge/Merge/MessageCount.js
+++ b/src/forge/Merge/MessageCount.js
@@ -45,6 +45,9 @@ class MessageCount extends Component {
copyVisible:false,
fix_issue_id: "",
+ unclosed_issue_list: [],
+ ownername: undefined,
+ reponame: undefined,
};
}
@@ -53,6 +56,7 @@ class MessageCount extends Component {
SpinFlag: true,
});
this.getDetail();
+ this.getUnclosedIssueList();
// this.clickBody();
};
@@ -68,6 +72,8 @@ class MessageCount extends Component {
getDetail = () => {
const { projectsId, mergeId, owner } = this.props.match.params;
+ this.state.ownername = owner;
+ this.state.reponame = projectsId;
const url = `/${owner}/${projectsId}/pulls/${mergeId}.json`;
axios
.get(url)
@@ -171,6 +177,41 @@ class MessageCount extends Component {
});
};
+ renderIssueList = (list) => {
+ if (list && list.length > 0) {
+ return list.map((item, index) => {
+ return (
+
+ {item[0] + ":" + item[1]}
+
+ );
+ });
+ }
+ };
+
+ getUnclosedIssueList = () => {
+ const url = `/projects/blockchain/get_unclosed_issue_list`;
+ axios.get(url,{
+ params:{
+ "ownername": this.state.ownername,
+ "reponame": this.state.reponame
+ }
+ }).then(result=>{
+ if(result && result.data){
+ this.state.unclosed_issue_list = result.data.unclosed_issues;
+ }
+ }).catch(error=>{
+ console.log(error);
+ })
+ }
+
+ selectIssueChange = (selectedKeys, info) => {
+ this.state.fix_issue_id = selectedKeys;
+ };
+
submitmerge = () => {
if (this.state.mergekey === "rebase") {
this.setState({
@@ -497,12 +538,21 @@ class MessageCount extends Component {
value={this.state.body}
onChange={this.changbodypr}
/>
-
+ {/**/}
+
+ {this.renderIssueList(this.state.unclosed_issue_list)}
+
Date: Thu, 12 Jan 2023 21:27:11 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Merge/MessageCount.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js
index 28fca0e94..9d5d5ce63 100644
--- a/src/forge/Merge/MessageCount.js
+++ b/src/forge/Merge/MessageCount.js
@@ -1,5 +1,5 @@
import React, { Component } from "react";
-import { Tabs } from 'antd';
+import { Tabs, Select } from 'antd';
import { Link } from "react-router-dom";
import axios from "axios";
import { getImageUrl , turnbar } from "educoder";
@@ -19,6 +19,7 @@ import RenderHtml from "../../components/render-html";
import "../Order/order.scss";
import MergeLinkFooter from "./MergeLinkFooter";
+const Option = Select.Option;
const TextArea = Input.TextArea;
class MessageCount extends Component {
constructor(props) {