内网版本issue修改

This commit is contained in:
caishi 2024-09-11 08:38:19 +08:00
parent fb1bfdb3e2
commit 2ab5ffd699
5 changed files with 15 additions and 18 deletions

View File

@ -32,7 +32,7 @@ export function initAxiosInterceptors(props) {
// 判断网络是否连接
initOnlineOfflineListener();
var proxy = "https://testforgeplus.trustie.net";
var proxy = "http://172.20.32.202:4000/";
// var proxy = "https://www.gitlink.org.cn";
//响应前的设置

View File

@ -37,9 +37,8 @@ export default (({ projectsId , branch , owner , changeBranch , branchList , tag
function ChangeB(params,type) {
setVisible(false);
// let en = turnbar(params);
changeBranch(params);
setShowValue(type ? truncateCommitId(params) : params);
let en = turnbar(params);
changeBranch(en);
}
const menu = (

View File

@ -303,7 +303,7 @@ function Index(props) {
</div>
<div>
{isManager && <Link to={`/${owner}/${projectsId}/settings/branches`} className="btn-83" style={{width: '102px'}}><i className="iconfont icon-xuanzhongjibenshezhiicon font-14 mr5"></i>分支设置</Link>}
{(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) && <Button type='primary' onClick={addBranchBtn}>+ 新建分支</Button>}
{(projectDetail && projectDetail.type!==2) && <Button type='primary' onClick={addBranchBtn}>+ 新建分支</Button>}
</div>
</div>
<Table

View File

@ -275,8 +275,8 @@ class CreateMerge extends Component {
let _url = `/${mergeOwner}/${projectId}/compare/`;
// type为pull时pullBranch取value否则取原有值
// type为pull时mergeBranch取原有值否则取value
let _pullBranch = type === 'pull' ? value : pullBranch;
let _mergeBranch = type === 'pull' ? mergeBranch : value;
let _pullBranch = type === 'pull' ? value : returnbar(pullBranch);
let _mergeBranch = type === 'pull' ? returnbar(mergeBranch) : value;
if (pullOwner === mergeOwner) {
// 如果仓库相同, compare/目标分支...源分支
_url += `${turnbar(_mergeBranch)}...${turnbar(_pullBranch)}`;

View File

@ -1,9 +1,9 @@
import React, { Component, Fragment } from "react";
// import { UnControlled as CodeMirror } from 'react-codemirror2';
// import 'codemirror/addon/selection/active-line.js';
// import 'codemirror/mode/javascript/javascript.js';
// import 'codemirror/mode/clike/clike';
// import 'codemirror/mode/css/css';
import { UnControlled as CodeMirror } from 'react-codemirror2';
import 'codemirror/addon/selection/active-line.js';
import 'codemirror/mode/javascript/javascript.js';
import 'codemirror/mode/clike/clike';
import 'codemirror/mode/css/css';
import UserSubmitComponent from "./UserSubmitComponent";
// import CloudIDE from "./cloudIDE";
import Editor from "react-monaco-editor";
@ -63,16 +63,13 @@ class m_editor extends Component {
return (
<Fragment>
<div className="branchTable" style={{border:"1px solid #eee"}}>
<Editor
height="400px"
language={language ? language : "plaintext"}
theme={"vs-grey"}
<CodeMirror
placeholder="请输入内容"
value={editorValue}
options={editor_options}
onChange={this.changeEditor}
editorWillMount={this.editorWillMount}
/>
readOnly={readOnly}
/>
</div>
{!readOnly && (
<div className="editorBorderSubmitBox" style={{ padding: "20px" }}>
@ -88,6 +85,7 @@ class m_editor extends Component {
onEmpty={onEmpty}
empty={empty}
filename={filename}
changeValueFlag={this.props.content !== changeValue}
></UserSubmitComponent>
</div>
)}