forked from Gitlink/forgeplus-react
Merge branch 'gitlink_server' of http://106.75.45.236:3000/Gitlink/forgeplus-react into feature_GLCC
This commit is contained in:
commit
3b820fb65c
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue