Merge branch 'gitlink_server' of http://106.75.45.236:3000/Gitlink/forgeplus-react into feature_GLCC

This commit is contained in:
何童崇 2022-05-20 18:08:56 +08:00
commit 3b820fb65c
4 changed files with 11 additions and 11 deletions

View File

@ -25,7 +25,7 @@ if (isDev) {
} }
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' : window.location.search.indexOf('debug=s') !== -1 ? 'student' :
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
} }
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

View File

@ -11,8 +11,8 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
const [ content ,setContent ] = useState(undefined); const [ content ,setContent ] = useState(undefined);
useEffect(()=>{ useEffect(()=>{
if(readme && readme.content){ if(readme && readme.replace_content){
setContent(readme.content); setContent(readme.replace_content);
}else{ }else{
setContent(undefined); setContent(undefined);
} }

View File

@ -21,7 +21,7 @@ class CoderRootFileDetail extends Component {
value: undefined, value: undefined,
language: undefined, language: undefined,
languages: undefined, languages: undefined,
description: props.detail.content, description: props.detail.replace_content,
menuList:undefined menuList:undefined
}; };
} }
@ -36,12 +36,12 @@ class CoderRootFileDetail extends Component {
}; };
componentDidUpdate=(prevProps)=>{ componentDidUpdate=(prevProps)=>{
const { content } = this.props && this.props.detail; const { replace_content } = this.props && this.props.detail;
const prevcontent = prevProps.detail && prevProps.detail.content; const prevcontent = prevProps.detail && prevProps.detail.replace_content;
if (content && prevcontent) { if (replace_content && prevcontent) {
if (prevcontent !== content){ if (prevcontent !== replace_content){
this.setState({ this.setState({
description: content description: replace_content
}); });
} }
} }
@ -319,7 +319,7 @@ class CoderRootFileDetail extends Component {
{...this.state} {...this.state}
language={language ? language : "javascript"} language={language ? language : "javascript"}
filepath={`/${detail.path}`} filepath={`/${detail.path}`}
content={description} content={detail.content}
readOnly={readOnly} readOnly={readOnly}
editorType="update" editorType="update"
currentBranch={currentBranch} currentBranch={currentBranch}

View File

@ -18,7 +18,7 @@ const menu = [
// {name:"资源库",index:"resources"}, // {name:"资源库",index:"resources"},
{name:"里程碑",index:"versions"}, {name:"里程碑",index:"versions"},
{name:"维基 (Wiki)",index:"wiki"}, {name:"维基 (Wiki)",index:"wiki"},
{name:"服务",index:"services"}, // {name:"服务",index:"services"},
{name:"动态",index:"activity"}, {name:"动态",index:"activity"},
] ]
class Setting extends Component { class Setting extends Component {