Compare commits

..

No commits in common. "gitlink_server" and "master" have entirely different histories.

178 changed files with 874 additions and 6389 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1268,17 +1268,11 @@ a.shixun-task-btn {
/*-----------实训配置、评测脚本-------------*/ /*-----------实训配置、评测脚本-------------*/
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1631773579834') format('woff2'),
url('iconfont.woff?t=1631773579834') format('woff'),
url('iconfont.ttf?t=1631773579834') format('truetype');
}
html body { html body {
font-size: 14px; font-size: 14px;
line-height: 2.0; line-height: 2.0;
background: #fafafa; background: #fafafa;
font-family: "iconfont"; font-family: "Microsoft YaHei", "SimSun";
color: #05101a; color: #05101a;
height: 100%; height: 100%;
position: relative; position: relative;
@ -3947,7 +3941,7 @@ html>body #ajax-indicator {
} }
.head-nav { .head-nav {
text-align: center; text-align: center;
height: 58px; height: 70px;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -3959,14 +3953,14 @@ html>body #ajax-indicator {
position: absolute; position: absolute;
top: 0px; top: 0px;
z-index: 3; z-index: 3;
height: 58px; height: 70px;
box-sizing: border-box; box-sizing: border-box;
} }
.head-nav ul#header-nav li { .head-nav ul#header-nav li {
float: left; float: left;
height: 58px; height: 70px;
line-height: 58px; line-height: 70px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
font-size: 16px; font-size: 16px;
@ -3977,7 +3971,7 @@ html>body #ajax-indicator {
display: block; display: block;
height: 100%; height: 100%;
width: 100%; width: 100%;
color: #fff; color: #333;
font-size: 16px; font-size: 16px;
} }
@ -3989,6 +3983,10 @@ html>body #ajax-indicator {
margin-right: 0px margin-right: 0px
} }
.head-nav ul#header-nav li.active{
/* background-color: #3B3B3B; */
}
.head-nav ul#header-nav li p:hover { .head-nav ul#header-nav li p:hover {
color: #cccccc; color: #cccccc;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -3,14 +3,14 @@ import './App.css';
import { ConfigProvider } from 'antd' import { ConfigProvider } from 'antd'
import zhCN from 'antd/lib/locale-provider/zh_CN'; import zhCN from 'antd/lib/locale-provider/zh_CN';
import { import {
// BrowserRouter as Router, // BrowserRouter as Router,
Route, Route,
Switch Switch
} from 'react-router-dom'; } from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';
import LoginDialog from './modules/login/LoginDialog'; import LoginDialog from './modules/login/LoginDialog';
import 'babel-polyfill'; import 'babel-polyfill';
import Loading from './Loading'; import Loading from './Loading'
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import marked from './common/marked'; import marked from './common/marked';
@ -26,18 +26,18 @@ import configureStore from './redux/stores/configureStore';
const store = configureStore(); const store = configureStore();
window.marked = marked; window.marked = marked;
const theme = createMuiTheme({ const theme = createMuiTheme({
palette: { palette: {
primary: { primary: {
main: '#4CACFF', main: '#4CACFF',
contrastText: 'rgba(255, 255, 255, 0.87)' contrastText: 'rgba(255, 255, 255, 0.87)'
}, },
secondary: { main: '#4CACFF' }, // #11cb5f This is just green.A700 as hex. secondary: { main: '#4CACFF' }, // #11cb5f This is just green.A700 as hex.
}, },
}); });
//forge项目 //forge项目
const Projects = Loadable({ const Projects = Loadable({
loader: () => import('./forge/Index'), loader: () => import('./forge/Index'),
loading: Loading, loading: Loading,
}) })
// forge项目详情 // forge项目详情
const ProjectDetail = Loadable({ const ProjectDetail = Loadable({
@ -46,493 +46,470 @@ const ProjectDetail = Loadable({
}); });
//forge安全设置 //forge安全设置
const Security = Loadable({ const Security = Loadable({
loader: () => import('./forge/SecuritySetting/Index'), loader: () => import('./forge/SecuritySetting/Index'),
loading: Loading, loading: Loading,
}) })
//forge项目-devOps详情 //forge项目-devOps详情
const OpsDetail = Loadable({ const OpsDetail = Loadable({
loader: () => import('./forge/DevOps/opsDetail'), loader: () => import('./forge/DevOps/opsDetail'),
loading: Loading, loading: Loading,
}) })
//403页面 //403页面
const Shixunauthority = Loadable({ const Shixunauthority = Loadable({
loader: () => import('./modules/403/Shixunauthority'), loader: () => import('./modules/403/Shixunauthority'),
loading: Loading, loading: Loading,
}) })
//404页面 //404页面
const Shixunnopage = Loadable({ const Shixunnopage = Loadable({
loader: () => import('./modules/404/Shixunnopage'), loader: () => import('./modules/404/Shixunnopage'),
loading: Loading, loading: Loading,
}) })
//500页面 //500页面
const http500 = Loadable({ const http500 = Loadable({
loader: () => import('./modules/500/http500'), loader: () => import('./modules/500/http500'),
loading: Loading, loading: Loading,
}) })
const InfosIndex = Loadable({ const InfosIndex = Loadable({
loader: () => import('./forge/users/Index'), loader: () => import('./forge/users/Index'),
loading: Loading, loading: Loading,
}) })
// 组织 // 组织
const OrganizeIndex = Loadable({ const OrganizeIndex = Loadable({
loader: () => import('./forge/Team/Index'), loader: () => import('./forge/Team/Index'),
loading: Loading, loading: Loading,
}) })
const EducoderLogin = Loadable({ const EducoderLogin = Loadable({
loader: () => import('./modules/login/EducoderLogin'), loader: () => import('./modules/login/EducoderLogin'),
loading: Loading, loading: Loading,
}) })
const Search = Loadable({ const Search = Loadable({
loader: () => import('./modules/search/'), loader: () => import('./modules/search/'),
loading: Loading, loading: Loading,
}) })
const WikiPreview = Loadable({ const WikiPreview = Loadable({
loader: () => import('./forge/Wiki/Preview'), loader: () => import('./forge/Wiki/Preview'),
loading: Loading, loading: Loading,
}) })
const ProjectIndex = Loadable({ const ProjectIndex = Loadable({
loader: () => import("./forge/Index"), loader: () => import("./forge/Index"),
loading: Loading, loading: Loading,
}); });
const Home = Loadable({
loader: () => import('./home/Index'),
loading: Loading,
})
const LoginRegisterPage = Loadable({
loader: () => import("./modules/loginRegister/LoginRegisterPage"),
loading: Loading,
});
// const CreateMerge = Loadable({ // const CreateMerge = Loadable({
// loader: () => import('./forge/Merge/NewMerge'), // loader: () => import('./forge/Merge/NewMerge'),
// loading: Loading, // loading: Loading,
// }) // })
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。 // 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize","login","register","resetPassword"]; const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize"];
class App extends Component { class App extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
Addcoursestype: false, Addcoursestype: false,
Addcoursestypes: false, Addcoursestypes: false,
mydisplay: false, mydisplay: false,
occupation: 0, occupation: 0,
mygetHelmetapi: null, mygetHelmetapi: null,
pathType: null, pathType: null,
pathName: null, pathName: null,
} }
} }
UNSAFE_componentWillMount() { UNSAFE_componentWillMount() {
initAxiosInterceptors(this.props); initAxiosInterceptors(this.props);
let pathname = window.location.pathname ? window.location.pathname.split('/')[1] : ''; let pathname = window.location.pathname ? window.location.pathname.split('/')[1] : '';
pathname && this.getPathnameType(pathname); pathname && this.getPathnameType(pathname);
// 添加路由监听,决定组织还是个人 // 添加路由监听,决定组织还是个人
this.unlisten = this.props.history.listen((location) => { this.unlisten = this.props.history.listen((location) => {
let newPathname = location.pathname.split('/')[1]; let newPathname = location.pathname.split('/')[1];
if (this.state.pathName !== newPathname) { if (this.state.pathName !== newPathname) {
// this.setState({ pathType: '' }); // this.setState({ pathType: '' });
newPathname && this.getPathnameType(newPathname); newPathname && this.getPathnameType(newPathname);
} }
}); });
} }
shouldComponentUpdate(nextProps, nextState) { shouldComponentUpdate(nextProps, nextState) {
if(!nextProps.location.pathname==='/'){ // (!keyWord.includes(this.props.location.pathname.split('/')[1])) &&
return true; if (nextProps.location.pathname.split('/')[1] !== this.props.location.pathname.split('/')[1] && nextState.pathType === this.state.pathType) {
} return false;
// 阻止个人与组织切换时组件渲染请求导致的404 } else {
if (nextProps.location.pathname.split('/')[1] !== this.props.location.pathname.split('/')[1] && nextState.pathType === this.state.pathType) { return true;
return false; }
} else { }
return true;
}
}
getPathnameType = (pathname) => { getPathnameType = (pathname) => {
if (!keyWord.includes(pathname)) { if (!keyWord.includes(pathname)) {
let url = `/owners/${pathname}.json`; let url = `/owners/${pathname}.json`;
axios.get(url).then((response) => { axios.get(url).then((response) => {
if (response && response.status === 200) { if (response && response.status === 200) {
this.setState({ this.setState({
pathType: response.data.type || '404', pathType: response.data.type || '404',
pathName: pathname, pathName: pathname,
}) })
} }
}); });
}else{ }else{
this.setState({ this.setState({
pathType: pathname, pathType: pathname,
pathName: pathname, pathName: pathname,
}); });
} }
} }
HideAddcoursestypess = (i) => { HideAddcoursestypess = (i) => {
this.setState({ this.setState({
Addcoursestype: false, Addcoursestype: false,
Addcoursestypes: false, Addcoursestypes: false,
mydisplay: true, mydisplay: true,
occupation: i, occupation: i,
}) })
}; };
hideAddcoursestypes = () => { hideAddcoursestypes = () => {
this.setState({ this.setState({
Addcoursestypes: false Addcoursestypes: false
}) })
}; };
componentDidMount() { componentDidMount() {
document.title = "loading..."; document.title = "loading...";
this.getAppdata(); this.getAppdata();
window.addEventListener('error', (event) => { window.addEventListener('error', (event) => {
const msg = `${event.type}: ${event.message}`; const msg = `${event.type}: ${event.message}`;
}); });
} }
componentWillUnmount() { componentWillUnmount() {
this.unlisten && this.unlisten(); // 执行解绑 this.unlisten && this.unlisten(); // 执行解绑
} }
//修改登录方法 //修改登录方法
Modifyloginvalue = () => { Modifyloginvalue = () => {
this.setState({ this.setState({
isRender: false, isRender: false,
}) })
}; };
//获取数据为空的时候 //获取数据为空的时候
gettablogourlnull = () => { gettablogourlnull = () => {
this.setState({ this.setState({
mygetHelmetapi: undefined mygetHelmetapi: undefined
}); });
document.title = "Forge"; document.title = "Forge";
var link = document.createElement('link'), var link = document.createElement('link'),
oldLink = document.getElementById('dynamic-favicon'); oldLink = document.getElementById('dynamic-favicon');
link.id = 'dynamic-favicon'; link.id = 'dynamic-favicon';
link.rel = 'shortcut icon'; link.rel = 'shortcut icon';
link.href = "/react/build/./favicon.ico"; link.href = "/react/build/./favicon.ico";
if (oldLink) { if (oldLink) {
document.head.removeChild(oldLink); document.head.removeChild(oldLink);
} }
document.head.appendChild(link); document.head.appendChild(link);
}; };
//获取数据的时候 //获取数据的时候
gettablogourldata = (response) => { gettablogourldata = (response) => {
document.title = response.data.setting.name; document.title = response.data.setting.name;
var link = document.createElement('link'), var link = document.createElement('link'),
oldLink = document.getElementById('dynamic-favicon'); oldLink = document.getElementById('dynamic-favicon');
link.id = 'dynamic-favicon'; link.id = 'dynamic-favicon';
link.rel = 'shortcut icon'; link.rel = 'shortcut icon';
link.href = '/' + response.data.setting.tab_logo_url; link.href = '/' + response.data.setting.tab_logo_url;
if (oldLink) { if (oldLink) {
document.head.removeChild(oldLink); document.head.removeChild(oldLink);
} }
document.head.appendChild(link); document.head.appendChild(link);
} }
//获取当前定制信息 //获取当前定制信息
getAppdata = () => { getAppdata = () => {
let url = "/setting.json"; let url = "/setting.json";
axios.get(url).then((response) => { axios.get(url).then((response) => {
if (response) { if (response) {
if (response.data) { if (response.data) {
this.setState({ this.setState({
mygetHelmetapi: response.data.setting mygetHelmetapi: response.data.setting
}); });
//存储配置到游览器 //存储配置到游览器
localStorage.setItem('chromesetting', JSON.stringify(response.data.setting)); localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
localStorage.setItem('chromesettingresponse', JSON.stringify(response)); localStorage.setItem('chromesettingresponse', JSON.stringify(response));
try { try {
if (response.data.setting.tab_logo_url) { if (response.data.setting.tab_logo_url) {
this.gettablogourldata(response); this.gettablogourldata(response);
} else { } else {
this.gettablogourlnull(); this.gettablogourlnull();
} }
} catch (e) { } catch (e) {
this.gettablogourlnull(); this.gettablogourlnull();
} }
} else { } else {
this.gettablogourlnull(); this.gettablogourlnull();
} }
} else { } else {
this.gettablogourlnull(); this.gettablogourlnull();
} }
}).catch((error) => { }).catch((error) => {
this.gettablogourlnull(); this.gettablogourlnull();
}); });
}; };
render() { render() {
const { mygetHelmetapi, pathType} = this.state; const { mygetHelmetapi, pathType} = this.state;
let personal = mygetHelmetapi && mygetHelmetapi.personal; let personal = mygetHelmetapi && mygetHelmetapi.personal;
return ( return (
<Provider store={store}> <Provider store={store}>
<ConfigProvider locale={zhCN}> <ConfigProvider locale={zhCN}>
<MuiThemeProvider theme={theme}> <MuiThemeProvider theme={theme}>
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={() => this.Modifyloginvalue()}></LoginDialog> <LoginDialog {...this.props} {...this.state} Modifyloginvalue={() => this.Modifyloginvalue()}></LoginDialog>
<SiderBar /> <SiderBar />
{/* <Router> */} {/* <Router> */}
<Switch> <Switch>
{/* wiki预览 */} {/* wiki预览 */}
<Route path="/:owner/:projectsId/wiki/preview/:projectName/:projectId" render={ <Route path="/:owner/:projectsId/wiki/preview/:projectName/:projectId" render={
(props) => { (props) => {
return (<WikiPreview {...this.props} {...props} {...this.state} />) return (<WikiPreview {...this.props} {...props} {...this.state} />)
} }
} /> } />
{/* 项目PR */} {/* 项目PR */}
<Route path="/:owner/:projectsId/compare" <Route path="/:owner/:projectsId/compare"
render={ render={
(props) => (<ProjectDetail {...this.props} {...props} {...this.state} />) (props) => (<ProjectDetail {...this.props} {...props} {...this.state} />)
} }
></Route>
{/*项目*/}
<Route
path={"/:owner/:projectId/devops/:opsId/detail"}
render={
(props) => {
return (<OpsDetail {...this.props} {...props} {...this.state} />)
}
}>
</Route>
<Route
path={"/settings"}
render={
(props) => {
return (<Security {...this.props} {...props} {...this.state} />)
}
}>
</Route>
{/*403*/}
<Route path="/403" component={Shixunauthority} />
<Route path="/500" component={http500} />
{/*404*/}
<Route path="/nopage" component={Shixunnopage} />
{/* 查询 */}
<Route path="/search" component={Search} />
<Route exact path="/explore/all"
render={
(props) => (
<ProjectIndex {...this.props} {...props} />
)
}
/>
<Route exact path="/explore"
render={
(props) => (
<ProjectIndex {...this.props} {...props} />
)
}
/>
{/* 登录 */}
<Route
path="/login"
render={(props) =><LoginRegisterPage {...this.props} {...props}/>}
></Route> ></Route>
{/* 注册 */} {/*项目*/}
<Route
path={"/:owner/:projectId/devops/:opsId/detail"}
render={
(props) => {
return (<OpsDetail {...this.props} {...props} {...this.state} />)
}
}>
</Route>
<Route
path={"/settings"}
render={
(props) => {
return (<Security {...this.props} {...props} {...this.state} />)
}
}>
</Route>
<Route <Route
path="/register" path="/register"
render={(props) =><LoginRegisterPage {...this.props} {...props}/>} render={
></Route> (props) => {
return (<EducoderLogin {...this.props} {...props} {...this.state} />)
}
}
/>
{/*403*/}
<Route path="/403" component={Shixunauthority} />
{/* 忘记密码 */} <Route path="/500" component={http500} />
{/*404*/}
<Route path="/nopage" component={Shixunnopage} />
{/* 查询 */}
<Route path="/search" component={Search} />
<Route exact path="/explore"
render={
(props) => (
<ProjectIndex {...this.props} {...props} />
)
}
/>
{/* 组织 */}
<Route path={"/organize"}
render={
(props) => {
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
}
}>
</Route>
{/*新建项目等*/}
<Route <Route
path="/resetPassword" path={"/projects"}
render={(props) =><LoginRegisterPage {...this.props} {...props}/>} render={
></Route> (props) => {
return (<Projects {...this.props} {...props} {...this.state} />)
}
}>
</Route>
{/* 组织 */} {/* 判断为用户/组织,并进入对应页面 */}
<Route path={"/organize"} {
render={ pathType === 'User' ?
(props) => { <Route exact path="/:username"
return (<OrganizeIndex {...props} {...this.props} {...this.state} />) render={
} (props) => {
}> return (<InfosIndex {...this.props} {...this.state} />)
</Route> }
}
{/*新建项目等*/} /> : pathType === 'Organization' ? <Route path={"/:OIdentifier"}
<Route render={
path={"/projects"} (props) => {
render={ return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
(props) => { }
return (<Projects {...this.props} {...props} {...this.state} />) }>
} </Route> : pathType === '404' ? <Route component={Shixunnopage} />:
}> <Route exact path="/"
</Route> render={
(props) => (
{/* 判断为用户/组织,并进入对应页面 */} personal && personal.length > 0 ?
{ <InfosIndex {...this.props} {...props} />
pathType === 'User' ? :
<Route exact path="/:username" <ProjectIndex {...this.props} {...props} />
render={ )
(props) => { }
return (<InfosIndex {...this.props} {...this.state} />) />
} // <Route path="/" component={Loading} />
} // <Route path="/" component={Shixunnopage} />
/> : pathType === 'Organization' ? <Route path={"/:OIdentifier"} }
render={
(props) => {
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
}
}>
</Route> : pathType === '404' ? <Route component={Shixunnopage} />:
""
}
<Route exact path="/"
render={
(props) => (
<Home {...props} {...this.props} {...this.state}/>
)
}
/>
{/* 个人主页 */}
<Route path="/:username"
render={
(props) => {
return (<InfosIndex {...this.props} {...this.state} />)
}
}></Route>
<Route component={Shixunnopage} />
</Switch> {/* 个人主页 */}
{/* </Router> */} <Route path="/:username"
</MuiThemeProvider> render={
</ConfigProvider> (props) => {
</Provider> return (<InfosIndex {...this.props} {...this.state} />)
); }
} }></Route>
<Route component={Shixunnopage} />
</Switch>
{/* </Router> */}
</MuiThemeProvider>
</ConfigProvider>
</Provider>
);
}
} }
// moment国际化设置为中文 // moment国际化设置为中文
moment.defineLocale('zh-cn', { moment.defineLocale('zh-cn', {
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'), weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
weekdaysMin: '日_一_二_三_四_五_六'.split('_'), weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
longDateFormat: { longDateFormat: {
LT: 'Ah点mm分', LT: 'Ah点mm分',
LTS: 'Ah点m分s秒', LTS: 'Ah点m分s秒',
L: 'YYYY-MM-DD', L: 'YYYY-MM-DD',
LL: 'YYYY年MMMD日', LL: 'YYYY年MMMD日',
LLL: 'YYYY年MMMD日Ah点mm分', LLL: 'YYYY年MMMD日Ah点mm分',
LLLL: 'YYYY年MMMD日ddddAh点mm分', LLLL: 'YYYY年MMMD日ddddAh点mm分',
l: 'YYYY-MM-DD', l: 'YYYY-MM-DD',
ll: 'YYYY年MMMD日', ll: 'YYYY年MMMD日',
lll: 'YYYY年MMMD日Ah点mm分', lll: 'YYYY年MMMD日Ah点mm分',
llll: 'YYYY年MMMD日ddddAh点mm分' llll: 'YYYY年MMMD日ddddAh点mm分'
}, },
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
meridiemHour: function (hour, meridiem) { meridiemHour: function (hour, meridiem) {
if (hour === 12) { if (hour === 12) {
hour = 0; hour = 0;
} }
if (meridiem === '凌晨' || meridiem === '早上' || if (meridiem === '凌晨' || meridiem === '早上' ||
meridiem === '上午') { meridiem === '上午') {
return hour; return hour;
} else if (meridiem === '下午' || meridiem === '晚上') { } else if (meridiem === '下午' || meridiem === '晚上') {
return hour + 12; return hour + 12;
} else { } else {
// '中午' // '中午'
return hour >= 11 ? hour : hour + 12; return hour >= 11 ? hour : hour + 12;
} }
}, },
meridiem: function (hour, minute, isLower) { meridiem: function (hour, minute, isLower) {
var hm = hour * 100 + minute; var hm = hour * 100 + minute;
if (hm < 600) { if (hm < 600) {
return '凌晨'; return '凌晨';
} else if (hm < 900) { } else if (hm < 900) {
return '早上'; return '早上';
} else if (hm < 1130) { } else if (hm < 1130) {
return '上午'; return '上午';
} else if (hm < 1230) { } else if (hm < 1230) {
return '中午'; return '中午';
} else if (hm < 1800) { } else if (hm < 1800) {
return '下午'; return '下午';
} else { } else {
return '晚上'; return '晚上';
} }
}, },
calendar: { calendar: {
sameDay: function () { sameDay: function () {
return this.minutes() === 0 ? '[今天]Ah[点整]' : '[今天]LT'; return this.minutes() === 0 ? '[今天]Ah[点整]' : '[今天]LT';
}, },
nextDay: function () { nextDay: function () {
return this.minutes() === 0 ? '[明天]Ah[点整]' : '[明天]LT'; return this.minutes() === 0 ? '[明天]Ah[点整]' : '[明天]LT';
}, },
lastDay: function () { lastDay: function () {
return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT'; return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT';
}, },
nextWeek: function () { nextWeek: function () {
var startOfWeek, prefix; var startOfWeek, prefix;
startOfWeek = moment().startOf('week'); startOfWeek = moment().startOf('week');
prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]'; prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]';
return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm'; return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';
}, },
lastWeek: function () { lastWeek: function () {
var startOfWeek, prefix; var startOfWeek, prefix;
startOfWeek = moment().startOf('week'); startOfWeek = moment().startOf('week');
prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]'; prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]';
return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm'; return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';
}, },
sameElse: 'LL' sameElse: 'LL'
}, },
ordinalParse: /\d{1,2}(日|月|周)/, ordinalParse: /\d{1,2}(日|月|周)/,
ordinal: function (number, period) { ordinal: function (number, period) {
switch (period) { switch (period) {
case 'd': case 'd':
case 'D': case 'D':
case 'DDD': case 'DDD':
return number + '日'; return number + '日';
case 'M': case 'M':
return number + '月'; return number + '月';
case 'w': case 'w':
case 'W': case 'W':
return number + '周'; return number + '周';
default: default:
return number; return number;
} }
}, },
relativeTime: { relativeTime: {
future: '%s内', future: '%s内',
past: '%s前', past: '%s前',
s: '几秒', s: '几秒',
m: '1分钟', m: '1分钟',
mm: '%d分钟', mm: '%d分钟',
h: '1小时', h: '1小时',
hh: '%d小时', hh: '%d小时',
d: '1天', d: '1天',
dd: '%d天', dd: '%d天',
M: '1个月', M: '1个月',
MM: '%d个月', MM: '%d个月',
y: '1年', y: '1年',
yy: '%d年' yy: '%d年'
}, },
week: { week: {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
dow: 1, // Monday is the first day of the week. dow: 1, // Monday is the first day of the week.
doy: 4 // The week that contains Jan 4th is the first week of the year. doy: 4 // The week that contains Jan 4th is the first week of the year.
} }
}); });
export default SnackbarHOC()(App); export default SnackbarHOC()(App);

View File

@ -68,8 +68,6 @@ export function initAxiosInterceptors(props) {
if (response.data.status === -1) { if (response.data.status === -1) {
if (window.location.pathname.startsWith('/tasks/')) { if (window.location.pathname.startsWith('/tasks/')) {
props.showSnackbar(response.data.message || '服务器异常,请联系管理员。') props.showSnackbar(response.data.message || '服务器异常,请联系管理员。')
} else if(window.location.pathname.startsWith('/login') || window.location.pathname.startsWith('/register') || window.location.pathname.startsWith('/resetPassword')) {
return response;
} else { } else {
notification.open({ notification.open({
message: "提示", message: "提示",

View File

@ -363,7 +363,7 @@ li.ant-menu-item{
color: #333; color: #333;
height: 34px; height: 34px;
line-height: 34px; line-height: 34px;
margin-bottom: 10px!important; margin-bottom: 10px;
a{ a{
display: block; display: block;
overflow: hidden; overflow: hidden;

View File

@ -32,7 +32,7 @@ export default ({history}) => {
/> />
</div> </div>
: :
<i className="iconfont icon-sousuo font-18 ml30" style={{color:"#a5a5a5"}} onClick={() => { <i className="iconfont icon-sousuo font-18 color-grey-6 ml30" onClick={() => {
setOpenSearch(true) setOpenSearch(true)
}} /> }} />
} }

View File

@ -3,40 +3,25 @@ import { Modal , Button } from 'antd';
import './Index.scss'; import './Index.scss';
import '../../css/index.scss'; import '../../css/index.scss';
import RenderHtml from '../../../components/render-html'; import RenderHtml from '../../../components/render-html';
// import cookie from 'react-cookies'; import cookie from 'react-cookies';
import axios from 'axios';
function SystemNotice({showNotice,system_notification,history,login,hideSystemNotice}){ function SystemNotice({system_notification,history}){
const [ visible , setVisible ] = useState(false); const [ visible , setVisible ] = useState(false);
useEffect(()=>{ useEffect(()=>{
if(system_notification && !system_notification.is_read && showNotice && login){ if(system_notification && !cookie.load('notice_stage')){
setVisible(true); setVisible(true);
} }
},[system_notification]) },[system_notification,history.location])
function sureContinue() { function sureContinue() {
if(login && ( system_notification && system_notification.id )){ cookie.remove('notice_stage');
const url = `/users/${login}/system_notification_histories.json`;
axios.post(url,{
system_notification_id:system_notification.id
}).then(result=>{
if(result){
setVisible(false);
hideSystemNotice();
}
}).catch(error=>{})
}else{
setVisible(false);
hideSystemNotice();
}
// cookie.remove('notice_stage');
// let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);// let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//
// // let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);// // let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//
// cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" }); cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" });
// setVisible(false); setVisible(false);
} }
return ( return (

View File

@ -19,44 +19,48 @@ function Footer(){
return( return(
<div> <div>
{value && showhtml(value)} <div style={{height:"543px"}}></div>
<div className="newFooter edu-txt-center">
{value && showhtml(value)}
{/* <div className="footerInfos">
<ul>
<li>社区</li>
<li><a href={`/`} target="_blank">网站首页</a></li>
<li><a href={`https://www.trustie.net/agreement`} target="_blank">服务协议</a></li>
<li><a href={`https://forum.trustie.net/forums/1168/detail`} target="_blank">帮助中心</a></li>
<li><a href={`https://forum.trustie.net/`} target="_blank">问吧交流</a></li>
<li><a href={`https://www.trustie.net/cooperation`} target="_blank">合作伙伴</a></li>
</ul>
<ul>
<li>支持与服务</li>
<li><a href={`https://forgeplus.trustie.net/docs/api`} target="_blank">API文档</a></li>
<li><a href={`https://forum.trustie.net/forums/1168/detail`} target="_blank">帮助中心</a></li>
<li><a href={`https://git-scm.com`} target="_blank">Git常用命令</a></li>
<li><a href={`https://forum.trustie.net/forums/3080/detail`} target="_blank">DevOps使用文档</a></li>
<li><a href={`https://forgeplus.trustie.net/projects/jasder/forgeplus/tree/master/CHANGELOG.md`} target="_blank">日志更新</a></li>
</ul>
<ul>
<li>合作伙伴</li>
<li><a href={`http://www.sei.pku.edu.cn`} target="_blank">北京大学</a></li>
<li><a href={`http://scse.buaa.edu.cn`} target="_blank">北京航空航天大学</a></li>
<li><a href={`https://www.nju.edu.cn`} target="_blank">南京大学</a></li>
<li><a href={`https://www.xtu.edu.cn`} target="_blank">湘潭大学</a></li>
<li><a href={`http://www.iscas.ac.cn`} target="_blank">ISCAS</a></li>
<li><a href={`https://www.ucloud.cn`} target="_blank">UCloud优刻得</a></li>
<li><a href={`http://www.inforbus.com`} target="_blank">中创软件</a></li>
<li><a href={`https://www.inspur.com`} target="_blank">浪潮集团</a></li>
<li><a href={`http://www.copu.org.cn`} target="_blank">中国开源软件推进联盟</a></li>
<li><a href={`https://www.sjtu.edu.cn`} target="_blank">上海交通大学</a></li>
</ul>
<ul>
<li>合作伙伴</li>
<li><span>热线</span></li>
<li><span>QQ群1071514693</span></li>
</ul>
</div>
<p className="footerCopy">© Copyright 2007~2021 国防科技大学Trustie团队 & IntelliDE <a href="https://beian.miit.gov.cn">湘ICP备 17009477</a></p> */}
</div>
</div> </div>
// {/* <div className="footEdition">
// <div className="footContent">
// <ul className="center">
// <img src={""} alt="Gitlink" height="29px"/>
// <p></p>
// </ul>
// <ul>
// <li className="thehead"></li>
// <li><a href="/"></a></li>
// <li><a href="https://forum.trustie.net/forums/1168/detail"></a></li>
// <li><a href="https://forum.trustie.net/"></a></li>
// <li><a href="https://www.trustie.net/cooperation"></a></li>
// </ul>
// <ul>
// <li className="thehead"></li>
// <li><a href="https://forgeplus.trustie.net/docs/api">API</a></li>
// <li><a href="https://git-scm.com">Git</a></li>
// <li><a href="https://forum.trustie.net/forums/3080/detail">DevOps使</a></li>
// <li><a href='https://www.trustie.net/agreement'></a></li>
// </ul>
// <ul>
// <li className="thehead"></li>
// <li className="theline">
// <div className="mr50">
// <li></li>
// <img src={"Img"} alt=""/>
// </div>
// <div>
// <li>QQ</li>
// <img src={"qqImg"} alt="QQ"/>
// </div>
// </li>
// </ul>
// </div>
// <p className="copyrightDesc">©Copyright 20072021 Gitlink & IntelliDE <br/>ICP 17009477</p>
// </div> */}
) )
} }
export default Footer; export default Footer;

View File

@ -2,8 +2,7 @@ import React, { Component } from 'react';
import AccountProfile from "../../modules/user/AccountProfile"; import AccountProfile from "../../modules/user/AccountProfile";
import { getImageUrl } from 'educoder' import { getImageUrl } from 'educoder'
import axios from 'axios'; import axios from 'axios';
import cookie from 'react-cookies'; import { Input , notification , Dropdown ,Popover, Menu,Badge, Button } from 'antd';
import { notification , Dropdown ,Popover, Menu,Badge } from 'antd';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import LoginDialog from '../../modules/login/LoginDialog'; import LoginDialog from '../../modules/login/LoginDialog';
@ -15,8 +14,9 @@ import CheckProfile from '../Component/ProfileModal/Profile';
import './header.scss'; import './header.scss';
import NoticeContent from './NoticeContent'; import NoticeContent from './NoticeContent';
import MainLogo from './img/logo.png'; const $ = window.$
// TODO 这部分脚本从公共脚本中直接调用 // TODO 这部分脚本从公共脚本中直接调用
const { Search } = Input;
let old_url; let old_url;
window._header_componentHandler = null; window._header_componentHandler = null;
@ -56,26 +56,26 @@ class NewHeader extends Component {
window._header_componentHandler = this; window._header_componentHandler = this;
//下拉框的显示隐藏 //下拉框的显示隐藏
// var hoverTimeout; var hoverTimeout;
// var hoveredPanel; var hoveredPanel;
// $(".edu-menu-panel").hover(function () { $(".edu-menu-panel").hover(function () {
// if (hoverTimeout) { // 一次只显示一个panel if (hoverTimeout) { // 一次只显示一个panel
// if (hoveredPanel && hoveredPanel !== this) { if (hoveredPanel && hoveredPanel !== this) {
// $(hoveredPanel).find(".edu-menu-list").hide() $(hoveredPanel).find(".edu-menu-list").hide()
// } }
// clearTimeout(hoverTimeout); clearTimeout(hoverTimeout);
// hoverTimeout = null; hoverTimeout = null;
// } }
// hoveredPanel = this; hoveredPanel = this;
// $(this).find(".edu-menu-list").show(); $(this).find(".edu-menu-list").show();
// }, function () { }, function () {
// var that = this; var that = this;
// // 延迟hide // 延迟hide
// hoverTimeout = setTimeout(function () { hoverTimeout = setTimeout(function () {
// $(that).find(".edu-menu-list").hide(); $(that).find(".edu-menu-list").hide();
// }, 800) }, 800)
// }); });
//获取游览器地址 //获取游览器地址
try { try {
window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href)) window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href))
@ -98,17 +98,11 @@ class NewHeader extends Component {
educoderlogin = () => { educoderlogin = () => {
//登录账号 //登录账号
if(window.location.pathname === "/"){ this.setState({
window.location.href="/login"; isRender: true
}else{ })
this.setState({
isRender: true
})
}
} }
educoderloginysl = () => { educoderloginysl = () => {
//退出账号时清除登录页面的下次自动登录(用户再次打开登录页面时下次自动登录框不勾选)
cookie.remove("autologin");
//退出账号 //退出账号
var url = `/accounts/logout.json`; var url = `/accounts/logout.json`;
axios.get((url)).then((result) => { axios.get((url)).then((result) => {
@ -285,94 +279,96 @@ class NewHeader extends Component {
}; };
render() { render() {
const { resetUserInfo ,showNotification,publicNav} = this.props; const { match ,resetUserInfo ,showNotification} = this.props;
let current_user = this.props.user; let current_user = this.props.user;
let { let {
AccountProfiletype, AccountProfiletype,
user, user,
isRender, isRender,
headtypesonClickbool,
headtypess,
settings, settings,
visible, visible,
} = this.state; } = this.state;
/*用户名称 用户头像url*/ /*用户名称 用户头像url*/
// let activeIndex = false; let activeIndex = false;
// let activeForums = false; let activeForums = false;
// let activeShixuns = false; let activeShixuns = false;
// let activePaths = false; let activePaths = false;
// let coursestype = false; let coursestype = false;
// let activePackages = false; let activePackages = false;
// let activeMoopCases = false; let activeMoopCases = false;
// let activeCompetitions = false; let activeCompetitions = false;
// if (match.path === '/forums') { if (match.path === '/forums') {
// activeForums = true; activeForums = true;
// } else if (match.path.startsWith('/shixuns')) { } else if (match.path.startsWith('/shixuns')) {
// activeShixuns = true; activeShixuns = true;
// } else if (match.path.startsWith('/paths')) { } else if (match.path.startsWith('/paths')) {
// activePaths = true; activePaths = true;
// } else if (match.path.startsWith('/courses')) { } else if (match.path.startsWith('/courses')) {
// coursestype = true; coursestype = true;
// } else if (match.path.startsWith('/crowdsourcing')) { } else if (match.path.startsWith('/crowdsourcing')) {
// activePackages = true; activePackages = true;
// } else if (match.path.startsWith('/moop_cases')) { } else if (match.path.startsWith('/moop_cases')) {
// activeMoopCases = true; activeMoopCases = true;
// } else if (match.path.startsWith('/competitions')) { } else if (match.path.startsWith('/competitions')) {
// activeCompetitions = true; activeCompetitions = true;
// } else { } else {
// activeIndex = true; activeIndex = true;
// } }
// let headtypes = '/'; let headtypes = '/';
// if (settings) { if (settings) {
// if (settings.navbar) { if (settings.navbar) {
// if (settings.navbar.length > 0) { if (settings.navbar.length > 0) {
// if (match.path === '/') { if (match.path === '/') {
// if (headtypesonClickbool === false) { if (headtypesonClickbool === false) {
// headtypes = undefined; headtypes = undefined;
// } else { } else {
// headtypes = headtypess; headtypes = headtypess;
// } }
// } else { } else {
// for (var i = 0; i < settings.navbar.length; i++) { for (var i = 0; i < settings.navbar.length; i++) {
// if (match.path === settings.navbar[i].link) { if (match.path === settings.navbar[i].link) {
// headtypes = settings.navbar[i].link; headtypes = settings.navbar[i].link;
// break; break;
// } }
// } }
// } }
// } }
// } }
// } }
// let shixuntype = false; let shixuntype = false;
// let pathstype = false; let pathstype = false;
// let coursestypes = false; let coursestypes = false;
// if (this.props && this.props.mygetHelmetapi != null) { if (this.props && this.props.mygetHelmetapi != null) {
// let shixun = "/shixuns"; let shixun = "/shixuns";
// let paths = "/paths"; let paths = "/paths";
// let courses = "/courses"; let courses = "/courses";
// this.props.mygetHelmetapi && this.props.mygetHelmetapi.navbar && this.props.mygetHelmetapi.navbar.map((item, key) => { this.props.mygetHelmetapi && this.props.mygetHelmetapi.navbar && this.props.mygetHelmetapi.navbar.map((item, key) => {
// var reg = RegExp(item.link); var reg = RegExp(item.link);
// if (shixun.match(reg)) { if (shixun.match(reg)) {
// if (item.hidden === true) { if (item.hidden === true) {
// shixuntype = true shixuntype = true
// } }
// } }
// if (paths.match(reg)) { if (paths.match(reg)) {
// if (item.hidden === true) { if (item.hidden === true) {
// pathstype = true pathstype = true
// } }
// } }
// if (courses.match(reg)) { if (courses.match(reg)) {
// if (item.hidden === true) { if (item.hidden === true) {
// coursestypes = true coursestypes = true
// } }
// } }
// }) })
// } }
let search_url = settings && settings.common && settings.common.search; let search_url = settings && settings.common && settings.common.search;
return ( return (
<div className={publicNav ? `newHeaders publicNav`:`newHeaders`} id="nHeader"> <div className="newHeaders" id="nHeader">
<div className="headerContent"> <div className="headerContent">
{isRender === true ? {isRender === true ?
<LoginDialog <LoginDialog
@ -387,16 +383,10 @@ class NewHeader extends Component {
{...this.props} {...this.props}
{...this.state} {...this.state}
/> : ""} /> : ""}
{
publicNav &&
<a href={'https://www.ccf.org.cn/'} className={"fl pr15"}>
<img src={MainLogo} alt="ccf" />
</a>
}
{ {
settings && settings.nav_logo_url ? settings && settings.nav_logo_url ?
<a href={settings && settings.new_course.default_url} className={"fl mr50"}> <a href={settings && settings.new_course.default_url} className={"fl mr50"} style={{minWidth:"45px"}}>
<img alt="可控开源社区" className="logoimg" src={getImageUrl(`/${settings.nav_logo_url}`)}></img> <img alt="可控开源社区" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl(`/${settings.nav_logo_url}`)}></img>
</a> </a>
: :
"" ""
@ -443,8 +433,7 @@ class NewHeader extends Component {
{ {
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)? current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
<Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight"> <Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight">
{/* <i className="iconfont icon-tianjiafangda ml30 mr15"></i> */} <i className="iconfont icon-tianjiafangda color-grey-6 ml30 mr15"></i>
<img src={require(`./img/add.png`)} alt="" width="16px" className="mr15 ml30"/>
</Dropdown>:"" </Dropdown>:""
} }
@ -459,8 +448,7 @@ class NewHeader extends Component {
> >
<Link to={"/settings/notice"} className="message-icon"> <Link to={"/settings/notice"} className="message-icon">
{current_user && <Badge count={current_user.message_unread_total}> {current_user && <Badge count={current_user.message_unread_total}>
{/* <i className="iconfont icon-xiaoxilingdang ml15 mr15"></i> */} <i className="iconfont icon-xiaoxilingdang color-grey-6 ml15 mr15"></i>
<img src={require(`./img/ring.png`)} alt="" width="16px" className="ml15 mr15"/>
</Badge>} </Badge>}
</Link> </Link>
</Popover> </Popover>
@ -469,14 +457,10 @@ class NewHeader extends Component {
</div> </div>
{!user || (user && !user.login) ? {!user || (user && !user.login) ?
<span className="font-15 ml30"> <span className="font-15 ml30">
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a> <a onClick={() => this.educoderlogin()} className="mr5 color-grey-6">登录</a>
{ {
(settings && settings.common && settings.common.register) ? settings && settings.common && settings.common.register &&
publicNav ? <span><em className="vertical-line"></em><a className="ml5 color-grey-6" href={`${settings.common.register}`} target="_blank"></a></span>
<a href='/register' className="regBtn">立即注册</a>
:
<span><em className="vertical-line"></em><a className="ml5 color-white" href='/register'></a></span>
:""
} }
</span> </span>
: :

View File

@ -262,101 +262,4 @@
.text-center{ .text-center{
text-align: center; text-align: center;
}
.footEdition{
background-color: #171B23;
.footContent{
display: flex;
align-items: flex-start;
padding:86px 0px;
justify-content: space-around;
width: 1200px;
margin:0px auto;
ul{
min-width: 120px;
text-align: left;
margin-right: 80px;
&.center{
text-align: center;
}
&>p{
height: 22px;
font-size: 16px;
font-weight: 400;
color: #FFFFFF;
line-height: 22px;
}
&>img{
width: 100px;
height: 100%;
margin-bottom: 30px;
margin-top: 25px;
border-radius: 10px;
}
li{
height: 20px;
font-size: 14px;
font-weight: 400;
line-height: 20px;
color: #BDC2D1;
margin-bottom: 15px!important;
a{
color: #BDC2D1!important;
&:hover{
text-decoration: underline;
}
}
&.thehead{
height: 25px;
font-size: 18px;
font-weight: 600;
color: #FFFFFF;
line-height: 25px;
margin-bottom: 20px!important;
}
}
.theline{
.imgCon{
width: 90px;
height: 90px;
padding:5px;
border-radius: 4px;
background-color: #fff;
img{
width: 100%;
border-radius: 3px;
}
}
}
}
}
}
.copyrightDesc{
font-size: 12px;
font-weight: 400;
color: #BDC2D1;
line-height: 28px;
padding:15px 0px;
text-align: center;
background-color: #1B212C;
a{
color: #BDC2D1!important;
}
}
.regBtn{
height: 40px;
background: #466AFF;
border-radius: 2px;
display: inline-block;
padding:0px 18px;
margin-left: 20px;
font-size: 14px;
font-weight: 400;
color: #FFFFFF!important;
line-height: 40px;
&:hover{
color: #FFFFFF!important;
background-color: #355CFF;
}
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

View File

@ -22,10 +22,11 @@ const ProjectIndex = Loadable({
loading: Loading, loading: Loading,
}); });
const ProjectHome = Loadable({ // 项目详情放在用户和组织下作为二级菜单存在
loader: () => import("./Main/projecthome/Index"), // const ProjectDetail = Loadable({
loading: Loading, // loader: () => import("./Main/Detail"),
}); // loading: Loading,
// });
class Index extends Component { class Index extends Component {
@ -59,17 +60,23 @@ class Index extends Component {
<ProjectNew {...this.props} {...props} /> <ProjectNew {...this.props} {...props} />
)} )}
></Route> ></Route>
{/* <Route
path="/:owner/:projectsId"
render={(props) => (
<ProjectDetail {...this.props} {...props} />
)}
></Route> */}
<Route <Route
path="/explore/all" path="/explore"
render={(props) => ( render={(props) => (
<ProjectIndex {...this.props} {...props} /> <ProjectIndex {...this.props} {...props} />
)} )}
></Route> ></Route>
<Route <Route
path="/explore" path="/"
render={(props) => ( render={(props) => (
<ProjectHome {...this.props} {...props} /> <ProjectIndex {...this.props} {...props} />
)} )}
></Route> ></Route>
</Switch> </Switch>
@ -83,3 +90,10 @@ export default withRouter(
parentSelector: ".newMain", parentSelector: ".newMain",
})(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index)))) })(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index))))
); );
// export default withRouter(
// ImageLayerOfCommentHOC({
// imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget",
// parentSelector: ".newMain",
// })(Index)
// );

View File

@ -138,7 +138,7 @@ function CoderDepot(props){
if(result && result.data){ if(result && result.data){
const release = { const release = {
"list":result.data.releases, "list":result.data.releases,
"total_count":result.data.releases && result.data.releases.length "total_count":result.data.releases.length
} }
setReleaseVersions(release); setReleaseVersions(release);
} }
@ -328,7 +328,7 @@ function CoderDepot(props){
function okUpdate(d,w,l){ function okUpdate(d,w,l){
const url = `/${owner}/${projectsId}.json`; const url = `/${owner}/${projectsId}.json`;
axios.put(url,{ axios.put(url,{
description:d,website:w || "",lesson_url:l||"" description:d,website:w,lesson_url:l
}).then(result=>{ }).then(result=>{
if(result && result.data && result.data.id){ if(result && result.data && result.data.id){
setDesc(result.data.description); setDesc(result.data.description);

View File

@ -41,7 +41,7 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
return( return(
<div className="commonBox readBox" id="readme"> <div className="commonBox readBox" id="readme">
<Anchor offsetTop={58}> <Anchor offsetTop={70} targetOffset={160}>
<div className="commonBox-title boxTitle"> <div className="commonBox-title boxTitle">
<AlignCenter> <AlignCenter>
<Dropdown overlay={menu()} trigger={['hover']} overlayClassName="menuslist"> <Dropdown overlay={menu()} trigger={['hover']} overlayClassName="menuslist">

View File

@ -73,6 +73,7 @@ export default ((props)=>{
<Menu.Item key={'1'}><a href={tar_url}>TAR.GZ</a></Menu.Item> <Menu.Item key={'1'}><a href={tar_url}>TAR.GZ</a></Menu.Item>
</Menu> </Menu>
) )
return( return(
<React.Fragment> <React.Fragment>
<div className="main"> <div className="main">

View File

@ -215,7 +215,7 @@ class CoderRootFileDetail extends Component {
const Option = Select.Option; const Option = Select.Option;
return ( return (
<React.Fragment> <React.Fragment>
<Anchor className="griditemAnchor" offsetTop={58}> <Anchor className="griditemAnchor" offsetTop={70}>
<div className="griditemCate"> <div className="griditemCate">
{ {
md && readOnly && md && readOnly &&

View File

@ -509,6 +509,11 @@ class Detail extends Component {
this.textFunc(projectDetail.forked_from_project_id, projectDetail.fork_info) this.textFunc(projectDetail.forked_from_project_id, projectDetail.fork_info)
: "" : ""
} }
{
projectDetail && projectDetail.type && projectDetail.type !== 0 ?
<span className="color-grey-9">导入于 <a className="color-grey-6" target="_blank" href={projectDetail.mirror_url}>{projectDetail.mirror_url}</a></span>
: ""
}
</div> </div>
</div> </div>
<div> <div>

View File

@ -50,7 +50,7 @@ class Index extends Component {
this.getCategory(); this.getCategory();
// this.getRecommand(); this.getRecommand();
this.getLanguage(); this.getLanguage();
@ -304,9 +304,9 @@ class Index extends Component {
return ( return (
<div> <div>
{/* <p className="t_project_banner"> <p className="t_project_banner">
<img src={banner} width="100%" alt=""/> <img src={banner} width="100%" alt=""/>
</p> */} </p>
{/* { {/* {
recommendOriList && recommendOriList.length>0? recommendOriList && recommendOriList.length>0?
<Slider {...settings} className="recommandOri"> <Slider {...settings} className="recommandOri">
@ -320,7 +320,7 @@ class Index extends Component {
</Slider> </Slider>
:"" :""
} */} } */}
{/* { {
recommendList && recommendList.length>0 && recommendList && recommendList.length>0 &&
<Slider {...setting} className={recommendList.length>5 ? "recommandProjects":"recommandProjects mb20"}> <Slider {...setting} className={recommendList.length>5 ? "recommandProjects":"recommandProjects mb20"}>
{ {
@ -341,7 +341,7 @@ class Index extends Component {
}) })
} }
</Slider> </Slider>
} */} }
<div className="ProjectListIndex"> <div className="ProjectListIndex">
<div className="list-left"> <div className="list-left">
<ul className="list-l-Menu"> <ul className="list-l-Menu">

View File

@ -52,6 +52,12 @@ class IndexItem extends Component {
<i className="iconfont icon-banbenku font-18 color-green" /> <i className="iconfont icon-banbenku font-18 color-green" />
</Tooltip>:"" </Tooltip>:""
} }
{
item.type && item.type === 1 ?
<Tooltip title="该项目是一个导入于其他网站的仓库" className="ml5">
<i className="iconfont icon-jingxiang font-18 color-green" />
</Tooltip>:""
}
</AlignCenter> </AlignCenter>
<span className="p-r-tags"> <span className="p-r-tags">
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,129 +0,0 @@
import React , { useEffect , useState } from 'react';
import './Index.scss';
import SubBanner from './SubBanner';
import SubUnitBanner from './SubUnitBanner';
import Icon from '../img/index/icon.png';
import { Link } from 'react-router-dom';
import { Spin } from 'antd';
import SubList from './SubList';
import more from '../img/index/more.png';
import axios from 'axios';
import { getImageUrl } from 'educoder';
import Nodata from '../../Nodata';
const LIMIT = 20;
function Index() {
const [ cateList , setCateList ] = useState(undefined);
const [ projectsList , setProjectsList ] = useState(undefined);
const [ cateID, setCateID ] = useState(undefined);
const [ isSpin, setIsSpin ] = useState(true);
useEffect(()=>{
getCate();
},[])
useEffect(()=>{
setIsSpin(true);
getProject();
},[cateID])
function getCate() {
const url = `/project_categories/pinned_index.json`;
axios.get(url).then(result=>{
if(result && result.data){
setCateList(result.data.project_categories);
}
}).catch(error=>{})
}
function getProject() {
const url = `/projects.json`;
axios.get(url,{
params:{
pinned:"d",
category_id:cateID,
limit:LIMIT
}
}).then(result=>{
if(result && result.data){
setProjectsList(result.data.projects);
setIsSpin(false);
}
}).catch(error=>{})
}
return(
<div>
<SubBanner />
<SubUnitBanner />
<div className="dataPanel">
<div className="left">
<ul className="leftTypes">
<a className={cateID ? "" : "active"} onClick={()=>setCateID(undefined)}><img src={Icon} alt="" /><span>最近更新</span></a>
{
cateList && cateList.length>0?
cateList.map((i,k)=>{
return(
<a className={cateID === i.id ?"active":""} onClick={()=>setCateID(i.id)}><img src={i.logo_url || Icon} alt="" /><span>{i.name}</span></a>
)
})
:""
}
</ul>
<div className="leftLists">
<div className="leftTitles">
<span>开源项目</span>
<Link to={`/explore/all`} target="_blank">更多<i className="iconfont icon-triangle font-12"></i></Link>
</div>
<Spin spinning={isSpin}>
<div style={{minHeight:"400px"}}>
{
projectsList && projectsList.length > 0 ?
<div className="leftlistItem">
{
projectsList.map((i,k)=>{
return(
<li>
<Link to={`/${i.author && i.author.login}`} target="_blank"><img src={getImageUrl(`/${i.author && i.author.image_url}`)} alt="" /></Link>
<div className="itemTitle">
<div className="item-title-infos">
<Link to={`/${i.author && i.author.login}/${i.identifier}`} target="_blank" className="infotitle task-hide">{i.author && i.author.name}/{i.name}</Link>
{i.praises_count > 0 ? <span><i className="iconfont icon-dianzan11 mr3 font-16"></i>{i.praises_count}</span> :"" }
{i.forked_count > 0 ? <span><i className="iconfont icon-fork2 mr3 font-13"></i>{i.forked_count}</span>:""}
</div>
<div className="item-desc task-hide-2">
{i.description}
</div>
<div className="item-data">
{i.category && i.category.id ? <span className="category">{i.category.name}</span> :"" }
{i.language && i.language.id ? <span className="language mr30">{i.language.name}</span> :""}
<span style={{lineHeight:"15px",display:"flex"}}><i className="iconfont icon-shijian font-15 mr5"></i>更新于{i.time_ago}</span>
</div>
</div>
</li>
)
})
}
</div>
:""
}
{
projectsList && projectsList.length === 0 && <Nodata _html="暂无数据" />
}
</div>
</Spin>
{
projectsList && projectsList.length > 0 &&
<div className="left-bottom-btn">
<Link to={`/explore/all`} target="_blank">查看更多开源项目<img src={more} alt="" /></Link>
</div>
}
</div>
</div>
<SubList />
</div>
</div>
)
}
export default Index;

View File

@ -1,553 +0,0 @@
.banners{
background: url('../img/index/banner.png') no-repeat top;
min-height: 516px;
background-size: cover;
background-color: #0C2A5B;
.bannersCenter{
padding-top: 30px;
max-width: 1200px;
margin: 0px auto;
position: relative;
height: 516px;
}
.bTitle{
height: 30px;
line-height: 30px;
font-size: 30px;
font-weight: 500;
color: #FFFFFF;
margin-bottom: 20px!important;
text-align: center;
span{
background: linear-gradient(to right,#289AF6 0%, #9E84FF 40%, #FFB03B 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.bSubTitle{
text-align: center;
height: 30px;
line-height: 30px;
font-size: 16px;
font-weight: 400;
color: #FFFFFF;
}
.bannerBox{
background: url('../img/index/box.png') no-repeat;
background-size: 100% 100%;
height: 240px;
width: 380px;
margin:0px auto;
padding:25px 30px 34px;
.bannersProject{
position: relative;
.slick-list{
width: 100%;
overflow: hidden;
}
.slick-track{
display: flex;
li{
padding:15px 20px;
.projectinfos{
display: flex;
align-items: center;
width: 100%;
margin-bottom: 13px;
img{
width: 32px;
height: 32px;
margin-right: 7px;
border-radius: 50%;
}
.name{
height: 28px;
line-height: 28px;
font-size: 20px;
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 250px;
color: #25EBFF;
a{
color: #25EBFF!important;
}
}
.company{
height: 20px;
line-height: 20px;
font-size: 14px;
font-weight: 400;
color: #FFFFFF;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 250px;
a{
color: #FFFFFF!important;
}
}
}
.desc{
height: 40px;
font-size: 13px;
font-weight: 400;
color: #FFFFFF;
line-height: 20px;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.infoData{
display: flex;
margin-top: 16px;
justify-content: space-around;
&>span{
display: flex;
align-items: center;
&>span{
color: #FFB729;
font-size: 15px;
font-weight: 400;
}
}
img{
width: 16px;
margin-right: 4px;
}
}
}
}
}
}
.airBubble{
&>div{
position: absolute;
height: 410px;
width: 415px;
bottom: 0px;
&.right{
right: 0px;
}
&.left{
left: 0px;
}
&.right div, &.left div{
position: relative;
width: 100%;
height: 100%;
span{
position: absolute;
border-radius: 50%;
background: linear-gradient(124deg, rgba(255, 255, 255, 0.1) 0%, rgba(5, 200, 220, 0.04) 50%, rgba(5, 200, 220, 0.03) 100%);
box-shadow: 0px 0px 7px 3px rgba(0, 154, 255, 0.19);
border: 1px solid rgba(0, 154, 255, 0.19);
font-size: 14px;
font-weight: 400;
line-height: 17px;
display: flex;
align-items: center;
word-break: break-all;
text-align: center;
padding:5px;
animation: zoomin 1.3s infinite alternate;
&:hover{
animation:none
}
}
}
&.right span:nth-child(4) a,&.left span:nth-child(1) a,&.left span:nth-child(2) a{
color: #25EBFF!important;
}
&.right span:nth-child(1) a,&.left span:nth-child(5) a{
color: #CD8AFF!important;
}
&.right span:nth-child(3) a,&.right span:nth-child(5) a,&.left span:nth-child(6) a{
color: #FF6125!important;
}
&.left span:nth-child(3) a{
color: #FF8425!important;
}
&.right span:nth-child(2) a,&.left span:nth-child(4) a{
color: #8CC2FF!important;
}
&.right span:nth-child(1){
right: 0px;
height: 120px;
width: 120px;
}
&.right span:nth-child(2){
right: 160px;
height: 72px;
width: 72px;
bottom: 220px;
padding:0px;
animation-delay: 0.2s;
}
&.right span:nth-child(3){
right: 300px;
height: 94px;
width: 94px;
bottom: 99px;
padding:8px;
animation-delay: 0.3s;
}
&.right span:nth-child(4){
right: 156px;
height: 100px;
width: 100px;
bottom: 39px;
font-size: 12px;
animation-delay: 0.2s;
}
&.right span:nth-child(5){
right: 10px;
height: 94px;
width: 94px;
bottom: 97px;
animation-delay: 0.4s;
}
&.left span:nth-child(1){
left: 80px;
height: 110px;
width: 110px;
padding:8px;
animation-delay: 0.1s;
}
&.left span:nth-child(2){
right: 60px;
height: 96px;
width: 96px;
top: 85px;
font-size: 13px;
animation-delay: 0.2s;
}
&.left span:nth-child(3){
left: 0px;
height: 86px;
width: 86px;
top: 145px;
font-size: 13px;
animation-delay: 0.3s;
}
&.left span:nth-child(4){
left: 164px;
height: 70px;
width: 70px;
bottom: 158px;
font-size: 12px;
font-size: 12px;
animation-delay: 0.3s;
}
&.left span:nth-child(5){
left: 35px;
height: 102px;
width: 102px;
bottom: 32px;
font-size: 13px;
animation-delay: 0.4s;
}
&.left span:nth-child(6){
right: 10px;
height: 114px;
width: 114px;
bottom: 26px;
padding:8px;
}
}
}
}
@keyframes zoomin{
0%{-webkit-transform:scale(1.05);transform:scale(1.05)}
100%{-webkit-transform:scale(0.8);transform:scale(0.8)}
}
@-webkit-keyframes zoomin{
0%{-webkit-transform:scale(1.05);transform:scale(1.05)}
100%{-webkit-transform:scale(0.8);transform:scale(0.8)}
}
.unitBanner{
padding:29px 0px;
background: #F9F9F9;
.unitContent{
max-width: 1200px;
margin:0px auto;
.unitTitle{
height: 28px;
line-height: 28px;
font-size: 20px;
font-weight: 500;
color: #1E1E1E;
display: flex;
align-items: center;
img{
margin-left: 9px;
}
}
.unitSlider{
padding:30px 0px 10px;
.slick-list{
width: 100%;
height: 56px;
overflow: hidden;
.slickline{
display: flex!important;
align-items: center;
justify-content: space-between;
}
}
}
}
}
.dataPanel{
width: 1200px;
display: flex;
justify-content: space-between;
padding:30px 0px 60px;
margin:0px auto;
.left{
width: 850px;
box-shadow: 0px 0px 4px 5px rgba(0, 0, 0, 0.02);
display: flex;
.leftTypes{
width: 220px;
height: 1576px;
background: url('../img/index/typebg.png');
background-size: 100% 100%;
box-shadow: 0px 0px 4px 5px rgba(0, 0, 0, 0.02);
a{
padding:0px 20px;
height: 44px;
margin-top: 10px;
font-size: 16px;
font-weight: 500;
color: #333333;
display: flex;
align-items: center;
cursor: pointer;
&:hover{
background-color: #F5F5F5;
}
&.active{
background: linear-gradient(to right,#07228F , #466AFF);
color: #fff!important;
}
img{
margin-right: 12px;
width: 28px;
}
}
}
.leftLists{
flex:1;
.leftTitles{
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid rgba(153, 153, 153, 0.16);
padding:0px 20px;
span{
font-size: 18px;
font-weight: 500;
color: #000000;
}
a{
color: #466AFF!important;
}
}
.leftlistItem{
padding:0px 20px;
li{
border-bottom: 1px solid rgba(153, 153, 153, 0.16);
display: flex;
align-items: flex-start;
padding:20px 0px ;
&>a img{
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 10px;
}
.itemTitle{
flex:1;
.item-title-infos{
height: 22px;
display: flex;
align-items: center;
.infotitle{
flex:1;
height: 21px;
font-size: 15px;
font-weight: 600;
line-height: 21px;
color: #333!important;
max-width: 458px;
&:hover{
color: #466AFF!important;
}
}
span{
margin-left:20px ;
color: #333;
i{
color: #666;
}
}
}
.item-desc{
font-size: 14px;
font-weight: 400;
color: #414141;
line-height: 24px;
max-width: 548px;
margin: 5px 0px;
}
.item-data{
font-size: 13px;
font-weight: 400;
color: #7D7D7D;
height: 20px;
line-height: 20px;
display: flex;
align-items: center;
.category{
position: relative;
padding-left: 11px;
margin-right: 10px;
&::before{
position: absolute;
content: "";
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #466AFF;
top: 7px;
left: 0px;
}
}
.language{
position: relative;
padding-left: 11px;
&::before{
position: absolute;
content: "";
width: 1px;
height: 10px;
border-radius: 50%;
border-left: 1px solid #9e9e9e;
bottom: 5px;
left: 0px;
}
}
}
}
}
}
}
.left-bottom-btn{
display: flex;
justify-content: center;
padding:18px 0px;
a{
height: 38px;
line-height: 36px;
border-radius: 8px;
border: 1px solid #466AFF;
color: #466AFF;
font-size: 16px;
padding:0px 20px;
img{
height: 16px;
margin-top: -1px;
margin-left: 8px;
}
}
}
}
.right{
width: 330px;
&>div{
box-shadow: 0px 0px 4px 5px rgba(0, 0, 0, 0.02);
margin-bottom: 20px;
}
.partTitle{
padding:15px;
background: #F6F9FF;
font-size: 18px;
color: #000000;
font-weight: 500;
margin-bottom: 10px;
img{
width: 33px;
margin-right: 6px;
}
}
.righthotAuthor{
padding-bottom: 15px;
li{
padding-left: 15px;
&>div{
display: flex;
align-items: flex-start;
padding:10px 15px 10px 0px;
border-bottom: 1px solid rgba(153, 153, 153, 0.1);
img{
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 8px;
margin-top: 3px;
}
}
&:hover{
background-color: #F3F3F3;
}
&:last-child > div{
border-bottom: none;
}
}
}
.hotProjects{
li{
padding:10px 15px;
margin-bottom: 10px;
&:hover{
background-color: #F3F3F3;
}
.mInfos{
display: flex;
align-items: center;
height: 20px;
.num{
width: 18px;
height: 18px;
background: #466AFF;
border-radius: 2px;
color: #fff;
text-align: center;
line-height: 18px;
margin-right: 8px;
}
.name{
flex:1;
font-size: 15px;
}
}
.sInfos{
background: #F7F8F9;
padding:0px 5px;
font-size: 13px;
font-weight: 400;
color: #666666;
line-height: 24px;
word-break: break-all;
margin-top: 10px;
}
}
}
}
}

View File

@ -1,114 +0,0 @@
import React , { useEffect , useState } from 'react';
import Slider from 'react-slick';
import { Link } from 'react-router-dom';
import { getImageUrl } from 'educoder';
import Eye from '../img/index/eye.png';
import Data from '../img/index/data.png';
import Earth from '../img/index/earth.png';
import axios from 'axios';
// const list =[
// {img:Imgs,name:"XiUOS",company:"",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"openGauss-operator",company:"",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"PaddleDetection 2.0",company:"TrustieMirrors",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"skyline",company:"",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"BitXHub",company:"",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"Device Model",company:"openDACS",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"Gitlink",company:"Gitlink",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"openEuler-datenlord",company:"",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"OpenAtom XuperChain",company:"",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"xuos-web",company:"",desc:"",look:432,cloud:"",type:"C++"},
// {img:Imgs,name:"CrowdOS",company:"西",desc:"",look:432,cloud:"",type:"C++"},
// ]
const settings={
dots: false,
infinite: true,
speed: 1000,
slidesToShow: 1,
slidesToScroll: 1,
autoplay:true,
arrows:false,
adaptiveHeight:true
}
function SubBanner() {
const [ list , setList ] = useState(undefined);
useEffect(()=>{
getList();
},[])
function getList() {
const url = `/projects/banner_recommend.json`;
axios.get(url).then(result=>{
if(result && result.data){
setList(result.data.projects);
}
}).catch(error=>{})
}
return(
<div className="banners">
<div className="bannersCenter">
<p className="bTitle"><span>GitLink 确实开源</span></p>
<p className="bSubTitle">新一代开发创新服务平台 让你的创意在这里释放</p>
<div className="bannerBox">
{
list && list.length > 0 ?
<Slider {...settings} className="bannersProject">
{
list.map((i,k)=>{
return(
<li>
<div className="projectinfos">
<Link to={`/${i.author && i.author.login}`}><img src={getImageUrl(`/${i.author && i.author.image_url}`)} alt="" /></Link>
<div>
<p className="name"><Link to={`/${i.author && i.author.login}/${i.identifier}`}>{i.name}</Link></p>
<p className="company"><Link to={`/${i.author && i.author.login}`}>{i.author && i.author.name}</Link></p>
</div>
</div>
<p className="desc">{i.description}</p>
<div className="infoData">
<span><img src={Eye} alt="" /><span>{i.visits}</span></span>
{i.category && i.category.id && <span><img src={Data} alt="" /><span>{i.category.name}</span></span>}
{i.language && i.language.id && <span><img src={Earth} alt="" /><span>{i.language.name}</span></span>}
</div>
</li>
)
})
}
</Slider>
:""
}
</div>
<div className="airBubble">
<div className="left">
<div>
{
list && list.length > 0 && list.map((i,k)=>{
return(
k%2 === 0? <span><Link to={`/${i.author && i.author.login}/${i.identifier}`}>{i.author && i.author.name}/{i.name}</Link></span> : ""
)
})
}
</div>
</div>
<div className="right">
<div>
{
list && list.length > 0 && list.map((i,k)=>{
return(
k%2 > 0 ? <span><Link to={`/${i.author && i.author.login}/${i.identifier}`}>{i.author && i.author.name}/{i.name}</Link></span> : ""
)
})
}
</div>
</div>
</div>
</div>
</div>
)
}
export default SubBanner

View File

@ -1,138 +0,0 @@
import React , { useEffect , useState } from 'react';
import hotAuthor from '../img/index/hotAuthor.png';
import week from '../img/index/week.png';
import month from '../img/index/month.png';
import { Link } from 'react-router-dom';
import axios from 'axios';
import { getImageUrl } from 'educoder';
function SubList() {
const [ weekList ,setWeekList ] = useState(undefined);
const [ monthList ,setMonthList ] = useState(undefined);
const [ authorList ,setAuthorList ] = useState(undefined);
useEffect(()=>{
getList(7);
getList(30);
getAuthorList(7);
},[])
function getList(time){
const url = `/project_rank.json`;
axios.get(url,{
params:{
time
}
}).then(result=>{
if(result && result.data){
time === 7 ? setWeekList(result.data.projects) : setMonthList(result.data.projects);
}
}).catch(error=>{})
}
function getAuthorList(time){
const url = `/user_rank.json`;
axios.get(url,{
params:{
time
}
}).then(result=>{
if(result && result.data){
setAuthorList(result.data.users);
}
}).catch(error=>{})
}
return(
<div className="right">
{
authorList && authorList.length > 0?
<div>
<div className="partTitle"><img src={hotAuthor} alt="" /><span>本周热门开发者</span></div>
<div className="righthotAuthor">
{
authorList.map((i,k)=>{
return(
<li>
<div>
<Link target="_blank" to={`/${i.login}`}><img src={getImageUrl(`/${i.avatar_url}`)} alt=""/></Link>
<div>
<Link target="_blank" to={`/${i.login}`} className="font-15">{i.name}</Link>
<p className="task-hide" style={{maxWidth:"260px"}}>
<Link target="_blank" to={`/${i.login}/${i.project && i.project.identifier}`}><i className="iconfont icon-daimakuicon1 font-14 mr8"></i>{i.project && i.project.name}</Link>
</p>
</div>
</div>
</li>
)
})
}
</div>
</div>
:""
}
{
weekList && weekList.length > 0 ?
<div>
<div className="partTitle"><img src={week} alt="" /><span>本周热门项目</span></div>
<div className="hotProjects">
{
weekList.map((i,k)=>{
return(
<li>
<div className="mInfos">
<span className="num">{k+1}</span>
<Link target="_blank" to={`/${i.owner && i.owner.login}/${i.identifier}`} className="name task-hide">{i.owner && i.owner.name}/{i.name}</Link>
<span>
<i className="iconfont icon-dianzan11 font-16 mr4"></i>{i.praises}
</span>
</div>
{i.description &&
<div className="sInfos task-hide-2">
{i.description}
</div>
}
</li>
)
})
}
</div>
</div>
:""
}
{
monthList && monthList.length > 0?
<div>
<div className="partTitle"><img src={month} alt="" /><span>本月热门项目</span></div>
<div className="hotProjects">
{
monthList.map((i,k)=>{
return(
<li>
<div className="mInfos">
<span className="num">{k+1}</span>
<Link target="_blank" to={`/${i.owner && i.owner.login}/${i.identifier}`} className="name task-hide">{i.owner && i.owner.name}/{i.name}</Link>
<span>
<i className="iconfont icon-dianzan11 font-16 mr4"></i>{i.praises}
</span>
</div>
{i.description &&
<div className="sInfos task-hide-2">
{i.description}
</div>
}
</li>
)
})
}
</div>
</div>
:""
}
</div>
)
}
export default SubList;

View File

@ -1,84 +0,0 @@
import React , { useEffect , useState } from 'react';
import Hot from '../img/index/hot.png';
import Slider from "react-slick";
import huawei from '../img/index/unit/huawei.png';
import langchao from '../img/index/unit/langchao.png';
import jijinhui from '../img/index/unit/jijinhui.png';
import mulan from '../img/index/unit/mulan.png';
import xigongye from '../img/index/unit/xigongye.png';
import feiteng from '../img/index/unit/feiteng.png';
import xiuos from '../img/index/unit/xiuos.png';
import huake from '../img/index/unit/huake.png';
import axios from 'axios';
import { Link } from 'react-router-dom';
import { getImageUrl } from 'educoder';
const settings = {
dots: false,
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
vertical: true,
verticalSwiping: true,
autoplay:true,
arrows:false
};
const group_size = 6;
function SubUnitBanner() {
const [ list , setlist ] = useState(undefined);
useEffect(()=>{
getRecommandOrz();
},[])
function getRecommandOrz(params) {
const url = `/organizations/recommend.json`;
axios.get(url,{
params:{
group_size
}
}).then(result=>{
if(result){
setlist(result.data.organizations)
}
}).catch(error=>{})
}
return(
list && list.length > 0 ?
<div className="unitBanner">
<div className="unitContent">
<div className="unitTitle">
<span>精选开源组织</span>
<img src={Hot} alt="" width="47px"/>
</div>
<Slider {...settings} className="unitSlider">
{
list.map((i,k)=>{
return(
<div className="slickline">
{
i.map((j,k1)=>{
return(
<Link to={j.name}><img src={getImageUrl(`/${j.avatar_url}`)} alt="" height="56px" style={{maxWidth:"180px"}}/></Link>
)
})
}
</div>
)
})
}
{/* <div className="slickline">
<a href="https://www.nwpu.edu.cn/" target="_blank"><img src={xigongye} alt="" height="56px"/></a>
<a href="https://www.phytium.com.cn/" target="_blank"><img src={feiteng} alt="" height="56px"/></a>
<a href="http://xuos.io" target="_blank"><img src={xiuos} alt="" height="56px"/></a>
<a href="https://www.hust.edu.cn/" target="_blank"><img src={huake} alt="" height="56px"/></a>
</div> */}
</Slider>
</div>
</div>
:""
)
}
export default SubUnitBanner;

View File

@ -36,7 +36,7 @@ function ReadmeCatelogue({ menuList , hash }) {
{ {
menu && menu.length>0? menu && menu.length>0?
<div className="anchorBox"> <div className="anchorBox">
<Anchor affix={false} onChange={onChange} offsetTop={140}> <Anchor affix={false} onChange={onChange}>
{ {
menu.map((item,key)=>{ menu.map((item,key)=>{
return( return(

View File

@ -113,8 +113,8 @@ class MergeItem extends Component {
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}} className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
> >
{item.is_original {item.is_original
? item.fork_project_user_name ? item.fork_project_user
: item.author_name} : project_author_name}
:{item.pull_request_head} :{item.pull_request_head}
</Link> </Link>
</Tag> </Tag>
@ -136,6 +136,7 @@ class MergeItem extends Component {
to={`/${owner}/${projectsId}/tree/${turnbar(item.pull_request_base)}`} to={`/${owner}/${projectsId}/tree/${turnbar(item.pull_request_base)}`}
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}} className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
> >
{/* {item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`} */}
{project_author_name}:{item.pull_request_base} {project_author_name}:{item.pull_request_base}
</Link> </Link>
</Tag> </Tag>

View File

@ -365,10 +365,10 @@ class MessageCount extends Component {
<div className="mt15"> <div className="mt15">
<Tag className="pr-branch-tag"> <Tag className="pr-branch-tag">
<Link <Link
to={`/${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`} to={`/${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`}
className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.pull_request.is_original ? data.pull_request.fork_project_user_name : data.issue.author_name}: ${data.pull_request && data.pull_request.head}`} className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: ${data.pull_request && data.pull_request.head}`}
> >
{data.pull_request.is_original ? data.pull_request.fork_project_user_name : data.issue.author_name}: {data.pull_request && data.pull_request.head} {data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {data.pull_request && data.pull_request.head}
</Link> </Link>
</Tag> </Tag>
<span className="mr8 ver-middle"> <span className="mr8 ver-middle">

View File

@ -289,8 +289,7 @@ class Index extends Component {
let second = first.split('.')[0]; let second = first.split('.')[0];
if(!second)return; if(!second)return;
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
repository_name:second, repository_name:second
name:second
}) })
}else{ }else{
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({

View File

@ -211,7 +211,7 @@ class MilepostDetail extends Component {
const { issue_chosen, issues, limit, page, search_count, data, isSpin , status_type } = this.state; const { issue_chosen, issues, limit, page, search_count, data, isSpin , status_type } = this.state;
const { projectsId, meilid ,owner} = this.props.match.params; const { projectsId, meilid ,owner} = this.props.match.params;
const { current_user , showLoginDialog , projectDetail } = this.props;
const menu = ( const menu = (
<Menu onClick={(e) => this.getOption(e)}> <Menu onClick={(e) => this.getOption(e)}>
<Menu.Item key={'created_on'} value="desc">最新创建</Menu.Item> <Menu.Item key={'created_on'} value="desc">最新创建</Menu.Item>
@ -239,17 +239,8 @@ class MilepostDetail extends Component {
<span className="font-weight-bold">{data && data.percent && data.percent.toFixed(2)}%完成 </span> <span className="font-weight-bold">{data && data.percent && data.percent.toFixed(2)}%完成 </span>
</span> </span>
<div className="milepostdiv"> <div className="milepostdiv">
{ <Link to={`/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
(current_user && current_user.login) && ( projectDetail && projectDetail.permission && projectDetail.permission !== "Reporter") ? <CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建易修</CheckProfile>
<Link to={`/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
:""
}
{
current_user && current_user.login ?
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建易修</CheckProfile>
:
<a className="topWrapper_btn" onClick={showLoginDialog}>创建易修</a>
}
</div> </div>
</FlexAJ> </FlexAJ>
</div> </div>

View File

@ -52,7 +52,7 @@ class OrderItem extends Component {
{current_user && current_user.login && checkbox} {current_user && current_user.login && checkbox}
<div className="flex-1"> <div className="flex-1">
<p className="mb10 df" style={{alignItems:"center"}}> <p className="mb10 df" style={{alignItems:"center"}}>
<Link to={`/${owner}/${projectsId}/issues/${item.id}`} title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"370px"}}>{item.name}</Link> <Link to={`/${owner}/${projectsId}/issues/${item.id}`} target="_blank" title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"370px"}}>{item.name}</Link>
{TagInfo(item.priority,"mr10")} {TagInfo(item.priority,"mr10")}
</p> </p>
<p className="color-grey-6 font-12"> <p className="color-grey-6 font-12">

View File

@ -13,7 +13,6 @@ import { getImageUrl } from 'educoder';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import './Index.scss'; import './Index.scss';
import { useEffect } from "react";
const MyNoticeIndex = Loadable({ const MyNoticeIndex = Loadable({
loader: () => import("./notice/myNotice/Index"), loader: () => import("./notice/myNotice/Index"),
@ -44,15 +43,10 @@ const PrivateLetter = Loadable({
}); });
function Index(props){ function Index(props){
const { current_user,mygetHelmetapi , checkIfLogin } = props; const { current_user,mygetHelmetapi } = props;
const { pathname } = props.location; const { pathname } = props.location;
const notice_url = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice; const notice_url = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice;
useEffect(()=>{
if(checkIfLogin() === false){
props.history.push('/login');
}
},[])
return( return(
<div className="newMain clearfix whiteBack"> <div className="newMain clearfix whiteBack">
<div className="boies"> <div className="boies">

View File

@ -267,11 +267,6 @@ class Setting extends Component {
}, },
], ],
})(<Input placeholder="请输入项目名称" />)} })(<Input placeholder="请输入项目名称" />)}
{
projectDetail && projectDetail.type && projectDetail.type !== 0 ?
<span className="color-grey-9">该项目导入于 <a className="color-grey-6" target="_blank" href={projectDetail.mirror_url}>{projectDetail.mirror_url}</a></span>
: ""
}
</Form.Item> </Form.Item>
<div className="df" style={{ alignItems: "center" }}> <div className="df" style={{ alignItems: "center" }}>
<span className="mr20 mb15 font-16">可见性</span> <span className="mr20 mb15 font-16">可见性</span>

View File

@ -191,12 +191,6 @@
.shortStyle{ .shortStyle{
.setStyleRule{ .setStyleRule{
min-height: 35px; min-height: 35px;
#merge_whitelist_usernames{
li.ant-select-selection__choice{
margin-top: 0px!important;
margin-bottom: 3px!important;
}
}
} }
.columsRadio{ .columsRadio{
display: block; display: block;

View File

@ -157,17 +157,6 @@ export default Form.create()(
setAuth(params.target.value) setAuth(params.target.value)
} }
function checkname(rule, value, callback){
if(!value){
callback();
}
if(value && !value.match(/^[a-zA-Z][a-zA-Z\d]{3,14}$/)){
callback("只能使用英文字母和数字以字母开头长度为4到15个字符");
}
callback();
}
function checkname(rule, value, callback){ function checkname(rule, value, callback){
if(!value){ if(!value){
callback(); callback();

View File

@ -10,10 +10,14 @@ function ListItem({item,key,OIdentifier}) {
<Link to={`/${OIdentifier}/${item.identifier}`} className="name">{item.name}</Link> <Link to={`/${OIdentifier}/${item.identifier}`} className="name">{item.name}</Link>
{ item.forked_from_project_id && <i className="iconfont icon-fork font-18 color-orange ml8" /> } { item.forked_from_project_id && <i className="iconfont icon-fork font-18 color-orange ml8" /> }
{ {
item.type && item.type === 2 ? item.type && item.type !== 0 ?
item.type === 2 ?
<Tooltip title="该项目是一个镜像" className="ml8"> <Tooltip title="该项目是一个镜像" className="ml8">
<i className="iconfont icon-banbenku font-18 color-green" /> <i className="iconfont icon-banbenku font-18 color-green" />
</Tooltip>:"" </Tooltip>:
<span className="ml8">
<i className="iconfont icon-jingxiang font-18 color-green" />
</span>:""
} }
</span> </span>
<ListCount fork={item.forked_count} parise={item.praises_count}/> <ListCount fork={item.forked_count} parise={item.praises_count}/>

View File

@ -181,7 +181,7 @@ export default Form.create()(
)} )}
<p>选择头像:</p> <p>选择头像:</p>
<UploadImage url={getImageUrl(`/${image}`)} getImage={getImage}/> <UploadImage url={getImageUrl(`/${image}`)} getImage={getImage}/>
<Button type={"primary"} onClick={updateDetail}>更新组织设置</Button> <Button type={"primary"} onClick={updateDetail}>更新仓库设置</Button>
</Form> </Form>
</Div> </Div>
</WhiteBack> </WhiteBack>

View File

@ -1,122 +0,0 @@
import React, { Component } from "react";
import { Link } from 'react-router-dom';
import { Spin } from 'antd';
import NoneData from '../Nodata';
import './version.css';
import axios from 'axios';
import RenderHtml from '../../components/render-html';
/**
* issue_chosen:下拉的筛选列表,
* data:列表接口返回的所有数据,
* issues:列表数组,
* isSpin:加载中,
*/
class version extends Component {
constructor(props) {
super(props);
this.state = {
issue_chosen: undefined,
data: undefined,
releases:undefined,
issues: undefined,
isSpin: true,
search: undefined,
search_count: undefined,
}
}
componentDidMount = () => {
this.getIssueList();
}
// 获取列表数据
getIssueList = () => {
const { projectsId, owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/releases.json`;
axios.get(url).then((result) => {
if (result) {
this.setState({
data: result.data,
releases:result.data.releases,
issues: result.data.issues,
isSpin: false
})
}
}).catch((error) => {
console.log(error);
})
}
// 显示版本描述
showBody=(key,flag)=>{
let { releases } = this.state;
releases[key].bodyshow = !flag;
this.setState({
releases
})
}
renderList = (releases) => {
const { projectsId , owner } = this.props.match.params;
if (releases && releases.length > 0) {
return (
releases.map((item, key) => {
return (
<div className="versionInfo" key={key}>
<span className="versionInfo_left">
<span className={`${item.draft === "稳定" ?"versionTag green":"versionTag yellow"}`}>{item.draft}</span>
<span className="mt10">{item.created_at}</span>
<span className="color-grey-8">
<i className="iconfont icon-biaoqian3 mr3 font-14"></i>
{item.tag_name}
</span>
</span>
<div className="versionInfo_right">
<span className="versionName">
<span className="task-hide">{item.name}</span>
<Link to={`/projects/${owner}/${projectsId}/releases/${item.version_id}/update`} className="color-blue ml3 font-12">编辑</Link>
</span>
<span className="color-grey-3">
<i className={`${item.bodyshow ? "iconfont icon-sanjiaoxing-down color-grey-8 mr3 font-14":"iconfont icon-triangle color-grey-8 mr3 font-14"}`} onClick={()=>this.showBody(key,item.bodyshow)}></i>
{item.user_name}:<span className="color-grey-8">发布了这个版本并在发布后提交给{item.target_commitish}</span>
</span>
{
item.bodyshow && <RenderHtml className="break_word_comments imageLayerParent" value={item.body} url={this.props.history.location}/>
}
<RenderHtml />
<p className="mt10 pl3">
<a href={item.tarball_url} style={{color:"#4CC1DA"}} className="mr30"><i className="iconfont icon-TAR font-18 mr5"></i>TAR</a>
<a href={item.zipball_url} style={{color:"#28BD6C"}}><i className="iconfont icon-ZIP font-18 mr5"></i>ZIP</a>
</p>
</div>
</div>
)
})
)
} else if (releases && releases.length === 0) {
return ( <NoneData _html="暂时还没有相关数据!" /> )
}
}
render() {
const { projectsId ,owner } = this.props.match.params;
const { data , releases , isSpin } = this.state
return (
<div className="main" style={{padding:"0px"}}>
<div className="topWrapper" style={{padding:"15px 20px"}}>
<span className="font-18 color-grey-3">版本发布</span>
{
data && data.user_permission ?
<Link to={`/projects/${owner}/${projectsId}/releases/new`} className="topWrapper_btn_new">+ 发布新版</Link>
: ''
}
</div>
<div className="releasesVersion">
<Spin spinning={isSpin}><div>{this.renderList(releases)}</div></Spin>
</div>
</div>
)
}
}
export default version;

View File

@ -123,8 +123,6 @@ class Infos extends Component {
}); });
const { current_user } = this.props; const { current_user } = this.props;
const { username } = this.props.match.params; const { username } = this.props.match.params;
const { pathname } = this.props.location;
const { notice } = this.state;
let url = `/users/${username || (current_user && current_user.login)}.json`; let url = `/users/${username || (current_user && current_user.login)}.json`;
axios.get(url).then((result) => { axios.get(url).then((result) => {

View File

@ -48,6 +48,7 @@ function Team(props){
</Menu> </Menu>
) )
return( return(
<div> <div>
<div className="headerbox"> <div className="headerbox">

View File

@ -1,161 +0,0 @@
import React , { useEffect } from 'react';
import Slider from 'react-slick';
import Beijing from './Img/unit/beijing.png';
import SHJT from './Img/unit/SHJT.png';
import DD from './Img/unit/DD.png';
import HW from './Img/unit/HW.png';
import ML from './Img/unit/ML.png';
import QH from './Img/unit/QH.png';
import QZ from './Img/unit/QZ.png';
import TX from './Img/unit/TX.png';
import XH from './Img/unit/XH.png';
import XJY from './Img/unit/XJY.png';
import ZC from './Img/unit/ZC.png';
import GFKJ from './Img/unit/GFKJ.png';
import BJHKHT from './Img/unit/BJHKHT.png';
import ISCAS from './Img/unit/ISCAS.png';
import NJDX from './Img/unit/NJDX.png';
import CEC from './Img/unit/CEC.png';
import KYRJLM from './Img/unit/KYRJLM.png';
import WXYJY from './Img/unit/WXYJY.png';
import HSKY from './Img/unit/HSKY.png';
import LSLM from './Img/unit/LSLM.png';
import TG from './Img/unit/TG.png';
import LC from './Img/unit/LC.png';
import YKD from './Img/unit/YKD.png';
import Axios from 'axios';
import { useState } from 'react';
import { getImageUrl } from 'educoder';
const list = [
{image_url:GFKJ, name:"国防科技大学",src:"https://www.nudt.edu.cn/"},
{image_url:TG, name:"头歌",src:"https://www.educoder.net/"},
{image_url:XJY, name:"长沙先进技术研究院",src:"https://www.hnjmrh.gov.cn/newweb/service/detail/305/"},
{image_url:Beijing, name:"北京大学",src:"https://www.pku.edu.cn/"},
{image_url:BJHKHT, name:"北京航空航天",src:"https://www.buaa.edu.cn/"},
{image_url:ISCAS, name:"ISCAS",src:"http://www.iscas.ac.cn/"},
{image_url:NJDX, name:"南京大学",src:"https://www.nju.edu.cn/"},
{image_url:DD, name:"滴滴",src:"https://www.didiglobal.com/"},
{image_url:CEC, name:"CEC",src:"https://www.cec.com.cn/"},
{image_url:HW, name:"华为",src:"https://www.huawei.com/"},
{image_url:ML, name:"木兰开源社区",src:"https://www.mulanos.cn/"},
{image_url:TX, name:"腾讯",src:"https://www.tencent.com/zh-cn"},
{image_url:KYRJLM, name:"中国开源软件推进联盟",src:"http://www.copu.org.cn/"},
{image_url:XH, name:"中国计算机学会",src:"https://www.ccf.org.cn/"},
{image_url:QZ, name:"openi启智",src:"https://www.openi.org.cn/"},
{image_url:HSKY, name:"红山开源",src:"https://osredm.com/"},
{image_url:LSLM, name:"绿色产业联盟",src:"https://www.opengcc.org/"},
{image_url:ZC, name:"中创软件",src:"http://www.cvicse.com/"},
{image_url:LC, name:"浪潮",src:"https://cloud.inspur.com/"},
{image_url:YKD, name:"ucloud",src:"https://www.ucloud.cn/"}
]
const settings = {
dots: false,
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
vertical: true,
verticalSwiping: true,
autoplay:true,
arrows:false
};
function FifthEdition() {
const [ topics ,setTopics ] = useState(undefined);
useEffect(()=>{
// if(list.length>10){
// Init();
// }
getUnit();
},[])
function getUnit(){
const url =`/topics.json`;
Axios.get(url,{params:{
topic_type:"cooperator",
limit:20,
group_size:5
}}).then(result=>{
if(result){
setTopics(result.data.topics);
}
}).catch(error=>{})
}
function Init() {
let box = document.getElementById('scrollBox1');
scrollUp();
var myTimer = setInterval(scrollUp, 10);
// container
box.onmouseover = () => {
clearInterval(myTimer);
}
// container
// 6060
box.onmouseout = () => {
myTimer = setInterval(scrollUp, 10);
}
}
function scrollUp() {
let box = document.getElementById('scrollBox1');
if(box){
let con1 = document.getElementById('box1');
if (box.scrollLeft >= con1.clientWidth) {
box.scrollLeft = 0;
} else {
box.scrollLeft++;
}
}
}
return(
<div id={"scrollBox1"}>
{/* <div style={{width:370*list.length+"px"}}>
<ul className="fifthList" id="box1" style={{width:(370*list.length)/2+"px"}}>
{
list && list.map((i,k)=>{
return(
<li><a href={i.src} target="_blank"><img src={i.image_url} alt={i.name}/></a></li>
)
})
}
</ul>
{list.length > 10 &&
<ul className="fifthList" id="box2" style={{width:(370*list.length)/2+"px"}}>
{
list && list.map((i,k)=>{
return(
<li><a href={i.src} target="_blank"><img src={i.image_url} alt={i.name}/></a></li>
)
})
}
</ul>
}
</div> */}
{
topics && topics.length>0 ?
<Slider {...settings} className="unitMainSlider">
{
topics.map((i,k)=>{
return(
<div className="slickMainline">
{
i.map((j,k1)=>{
return(
<a href={j.url} target="_blank"><img src={getImageUrl(j.image)} alt=""/></a>
)
})
}
</div>
)
})
}
</Slider>
:""
}
</div>
)
}
export default FifthEdition;

View File

@ -1,47 +0,0 @@
import React from 'react';
import Img from './Img/gitlink.png';
import qqImg from './Img/qq.png';
function Footnav() {
return(
<div className="footEdition">
<div className="footContent">
<ul className="center">
<img src={Img} alt="Gitlink确实开源" height="29px"/>
<p>确实开源</p>
</ul>
<ul>
<li className="thehead">社区</li>
<li><a href="/">网站首页</a></li>
{/* 关于我们 */}
<li><a href="https://forum.trustie.net/forums/1168/detail">帮助中心</a></li>
<li><a href="https://forum.trustie.net/">论坛交流</a></li>
<li><a href="https://www.trustie.net/cooperation">合作伙伴</a></li>
</ul>
<ul>
<li className="thehead">支持与服务</li>
<li><a href="https://forgeplus.trustie.net/docs/api">API文档</a></li>
<li><a href="https://git-scm.com">Git常用命令</a></li>
<li><a href="https://forum.trustie.net/forums/3080/detail">DevOps使用文档</a></li>
<li><a href='https://www.trustie.net/agreement'>服务协议</a></li>
</ul>
<ul>
<li className="thehead">加入我们</li>
<li className="theline">
{/* <div className="mr50">
<li>公众号</li>
<img src={qqImg} alt="公众号"/>
</div> */}
<div>
<li>QQ群</li>
<div className="imgCon">
<img src={qqImg} alt="QQ群"/>
</div>
</div>
</li>
</ul>
</div>
<p className="copyrightDesc">©Copyright 20072021 国防科技大学GitLink团队 & IntelliDE <br/>湘ICP备 17009477</p>
</div>
)
}
export default Footnav;

View File

@ -1,31 +0,0 @@
import React from 'react';
import './Index.scss';
// import gitlink from './Img/gitlink.png';
import { getImageUrl } from 'educoder';
function HeadNav({showLoginDialog,mygetHelmetapi}) {
const register = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.register;
const navbar = mygetHelmetapi && mygetHelmetapi.navbar;
return(
<div className="headNav">
<div className="headNavDiv">
<ul className="headlist">
<li><img src={getImageUrl(`/${mygetHelmetapi && mygetHelmetapi.nav_logo_url}`)} alt="gitlink" height="37px" style={{marginRight:"15px"}}/></li>
{
navbar && navbar.length>0&&
navbar.map((i,k)=>{
return(
<li style={{display:i.hidden?"none":"block"}}><a href={i.link}>{i.name}</a></li>
)
})
}
</ul>
<div>
<a className="color-white" onClick={showLoginDialog}>登录</a>
<a className="regBtn" href={register}>注册</a>
</div>
</div>
</div>
)
}
export default HeadNav;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Some files were not shown because too many files have changed in this diff Show More