forked from Gitlink/forgeplus-react
merge
This commit is contained in:
commit
6098ffa36a
|
|
@ -144,7 +144,7 @@ export function getUrl(path, goTest) {
|
|||
// if (isDev) {
|
||||
// return `${local}${path?path:''}`
|
||||
// }
|
||||
return `${path ? path: TEST_HOST}`;
|
||||
return `${path ? path: ''}`;
|
||||
}
|
||||
|
||||
export function getZoneUrl(path) {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ function ProjectSource(props) {
|
|||
// 获取wiki内容
|
||||
setLoading(true);
|
||||
getWiki({
|
||||
pageName: wiki.titleStr,
|
||||
pageName: wiki.title_sub,
|
||||
...wikiParams
|
||||
}).then(res=>{
|
||||
setLoading(false);
|
||||
|
|
@ -78,7 +78,7 @@ function ProjectSource(props) {
|
|||
message.error("加载失败")
|
||||
}
|
||||
})
|
||||
}, [wiki && wiki.titleStr])
|
||||
}, [wiki && wiki.title_sub])
|
||||
|
||||
useEffect(() => {
|
||||
if (scroller) {
|
||||
|
|
@ -236,7 +236,7 @@ function ProjectSource(props) {
|
|||
<div className='wikiTitleHC font-20 mb5'>{wikiDetail.name}</div>
|
||||
{wikiDetail.commit && <div className='wikiUpdateTimeHC font-15'>更新时间:{wikiDetail.commit.author.date || '刚刚'}</div>}
|
||||
</div>
|
||||
{adminUrl && <Button onClick={()=>{wiki && window.open(`${data && data.gitlinkProject.wiki_url}/${wiki.titleStr}/${wiki.key}`)}} className='zone_apply_button' style={{width: '90px', height: '34px'}}>配置内容</Button>}
|
||||
{adminUrl && <Button onClick={()=>{wiki && window.open(`${data && data.gitlinkProject.wiki_url}/${wiki.title_sub}/${wiki.key}`)}} className='zone_apply_button' style={{width: '90px', height: '34px'}}>配置内容</Button>}
|
||||
</FlexAJ>
|
||||
{wikiDetail.md_content && <RenderHtml className="wikiContentHC editor-content-panel mt20 imageLayerParent" value={ Base64.decode(wikiDetail.md_content) } url={history.location}/>}
|
||||
</LongWidth>
|
||||
|
|
|
|||
|
|
@ -54,6 +54,11 @@ class CoderRootFileDetail extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
isCommit = () => {
|
||||
const {detail, branch} = this.props;
|
||||
return detail && detail.commit && detail.commit.sha.includes(branch)
|
||||
}
|
||||
|
||||
// 更新网页标题
|
||||
updateDocumentTitle(){
|
||||
const {projectDetail, treeValuePath, location} = this.props;
|
||||
|
|
@ -300,7 +305,7 @@ class CoderRootFileDetail extends Component {
|
|||
</span>
|
||||
</div>
|
||||
<p className="text-right">
|
||||
{flag && platform && (
|
||||
{flag && platform && !this.isCommit() && (
|
||||
<div>
|
||||
{readOnly ? (
|
||||
<span>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { formatParsedResult } from '../../api';
|
|||
|
||||
function TimerShaft(props) {
|
||||
const {current_user, period, history, showLoginDialog, id, glccSettings} = props;
|
||||
let repoApplyEnd = undefined
|
||||
const step = [{
|
||||
title: "Step1",
|
||||
date: "4.22",
|
||||
|
|
@ -71,6 +72,9 @@ function TimerShaft(props) {
|
|||
const repoApply = glccSettings.filter(item=>item.name === "repoApply");
|
||||
repoApply[0] && (step[0].date = formatParsedResult(repoApply, "startMonthDay"))
|
||||
repoApply[0] && (step[1].date = formatParsedResult(repoApply, "rangeConcatDot"))
|
||||
if(repoApply[0]){
|
||||
repoApplyEnd = new Date(repoApply[0].value.split(",")[1]).getTime()-new Date().getTime() < 0
|
||||
}
|
||||
// 学生报名
|
||||
const stuApply = glccSettings.filter(item=>item.name === "stuApply");
|
||||
stuApply[0] && (step[3].date = formatParsedResult(stuApply, "rangeConcatDot"))
|
||||
|
|
@ -93,12 +97,12 @@ function TimerShaft(props) {
|
|||
<div className="teacher-text">
|
||||
<h3 className="teacher-invite">有兴趣成为GLCC的导师吗?</h3>
|
||||
<div className="teacher-content">想要扩大项目知名度和影响力,为开源项目吸引新鲜血液,培养长期开发者。通过GitLink平台,与高校建立连接,指导开源新人传授他们的开源文化,享受开源的乐趣</div>
|
||||
{period === "repoApply" ? <div className='applyBut' onClick={goToApply}>立即报名</div> : <div className='applyBut project'><span className='hover-none'>项目报名</span><span className='hover-show'>已结束</span></div>}
|
||||
{period === "repoApply" ? <div className='applyBut' onClick={goToApply}>立即报名</div> : <div className='applyBut project'><span className='hover-none'>项目报名</span><span className='hover-show'>{repoApplyEnd ? "已结束" : "敬请期待"}</span></div>}
|
||||
</div>
|
||||
<div className="teacher-text">
|
||||
<h3 className="teacher-invite">你是开源新手,有兴趣参加GLCC吗?</h3>
|
||||
<div className="teacher-content">想要参与一线开源项目开发,熟悉开源社区运作流程,接受资深开源软件专家指导,获得丰厚奖金和实习机会。参加GLCC,开启全新的开源之旅。</div>
|
||||
{(period === "stuApply" || period === "stuApply1") ? <div className='applyBut' onClick={goToApply}>学生报名</div> : <div className='applyBut project'><span className='hover-none'>学生报名</span><span className='hover-show'>{period === "repoApply" ? "敬请期待" : "已结束"}</span></div>}
|
||||
{(period === "stuApply" || period === "stuApply1") ? <div className='applyBut' onClick={goToApply}>学生报名</div> : <div className='applyBut project'><span className='hover-none'>学生报名</span><span className='hover-show'>{(period === "repoApply" || !period) ? "敬请期待" : "已结束"}</span></div>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue