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' :
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;
export function initAxiosInterceptors(props) {

View File

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

View File

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

View File

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