diff --git a/package.json b/package.json index 397d4ee5..36235f0f 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "dependencies": { "@monaco-editor/react": "^2.3.0", "@novnc/novnc": "^1.1.0", + "actioncable": "^5.2.4-3", "antd": "^3.26.15", "array-flatten": "^2.1.2", "autoprefixer": "7.1.6", diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index fa82f304..9f6e8b28 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -1569,6 +1569,7 @@ a.edu-txt-w80, .font-80 { font-size: 80px !important; } +.color-grey-b{color: #bbb !important} /*a标签的下划线*/ a.decoration { diff --git a/public/css/merge.css b/public/css/merge.css index c72b582a..59200bb6 100755 --- a/public/css/merge.css +++ b/public/css/merge.css @@ -29,4 +29,12 @@ color:#fff !important; } .display-flex{display: flex !important;} -.merge-flex1{flex:1} \ No newline at end of file +.merge-flex1{flex:1} +.ant-tag.pr-branch-tag{ + border-radius: 12px; + height: 24px; + background: rgba(241,248,255,1); + border: none; + font-size: 13px; + padding: 0 10px; +} \ No newline at end of file diff --git a/src/AppConfig.js b/src/AppConfig.js index 620f6d68..dadadc5f 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -59,52 +59,14 @@ function setpostcookie() { } setpostcookie(); - -function railsgettimes(proxy) { - clearAllCookie() - if (timestamp && checkSubmitFlg === false) { - $.ajax({ - url: proxy, async: true, success: function (data) { - if (data.status === 0) { - timestamp = data.message; - setpostcookie(); - } - } - }) - checkSubmitFlg = true - window.setTimeout(() => { - checkSubmitFlg = false; - }, 2000); - } else if (checkSubmitFlg === false) { - $.ajax({ - url: proxy, async: true, success: function (data) { - if (data.status === 0) { - timestamp = data.message; - setpostcookie(); - } - } - }) - checkSubmitFlg = true - window.setTimeout(() => { - checkSubmitFlg = false; - }, 2000); - } - -} - window._debugType = debugType; export function initAxiosInterceptors(props) { initOnlineOfflineListener() - // TODO 避免重复的请求 https://github.com/axios/axios#cancellation - // TODO 读取到package.json中的配置? - var proxy = "http://localhost:3000" - // proxy = "https://pre-newweb.educoder.net" - proxy = "http://192.168.2.59:3000" + var + proxy = "http://localhost:3000" + proxy = "https://testforgeplus.trustie.net" - // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; - - // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 const requestMap = {}; window.setfalseInRequestMap = function (keyName) { requestMap[keyName] = false; @@ -115,19 +77,13 @@ export function initAxiosInterceptors(props) { setpostcookie() clearAllCookie() - if (config.url.indexOf(proxy) != -1 || config.url.indexOf(':') != -1) { + if (config.url.indexOf(proxy) !== -1 || config.url.indexOf(':') !== -1) { return config } requestProxy(config) let url = `/api${config.url}`; - //qq登录去掉api - if (config.params && config.params.redirect_uri !== undefined) { - if (config.params.redirect_uri.indexOf('otherloginqq') !== -1) { - url = `${config.url}`; - } - } if (`${config[0]}` !== `true`) { if (window.location.port === "3007") { config.url = `${proxy}${url}`; diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js index 74dbca7d..4102fd75 100644 --- a/src/forge/Main/CoderRootDirectory.js +++ b/src/forge/Main/CoderRootDirectory.js @@ -241,7 +241,7 @@ class CoderRootDirectory extends Component { message: item.commit && item.commit.message, ...item, }); - if (item.name === "README.md") { + if (item.is_readme_file) { readMeContent.push({ ...item }); readMeFile.push({ ...item }); } @@ -348,7 +348,7 @@ class CoderRootDirectory extends Component { dataIndex: 'name', width:"30%", render: (text,item) => ( - this.goToSubRoot(item.path,item.type)} className="ml12"> + this.goToSubRoot(item.path,item.type)} className="ml12 task-hide" style={{ display: "block", maxWidth: "345px" }}> {text} ), @@ -482,7 +482,7 @@ class CoderRootDirectory extends Component { )}
+
{project && project.author &&
{project.author.name}
@@ -361,95 +383,98 @@ class Detail extends Component {
{
projectDetail && checkLogin && projectDetail.type && projectDetail.type === 2 ?
@@ -92,21 +96,33 @@ class MergeItem extends Component {
{item.pr_time}
-