Compare commits
154 Commits
master
...
gitlink_se
| Author | SHA1 | Date |
|---|---|---|
|
|
631f8ceeea | |
|
|
d70ddfb2f7 | |
|
|
54741a6d8a | |
|
|
116c3e531f | |
|
|
990cfe2781 | |
|
|
66e1235c3b | |
|
|
76fdff6737 | |
|
|
4bc79b5153 | |
|
|
ea979b78ee | |
|
|
b1775e5158 | |
|
|
3678b8eb72 | |
|
|
12d8f5bf5d | |
|
|
e04fb11194 | |
|
|
010edf3cb2 | |
|
|
ab26a528b6 | |
|
|
6d39e25667 | |
|
|
a2ea832208 | |
|
|
d1bc3680b9 | |
|
|
08416390e5 | |
|
|
190200d1e6 | |
|
|
b124364203 | |
|
|
35c2f63c55 | |
|
|
30c61f0a7d | |
|
|
743dabd553 | |
|
|
015296e065 | |
|
|
48c21ac245 | |
|
|
a93b8a08c9 | |
|
|
1c48ffb130 | |
|
|
0ee9280bb1 | |
|
|
e785e9a358 | |
|
|
b3b95e9856 | |
|
|
5be8ead356 | |
|
|
7d78919c4a | |
|
|
d5b4c5425f | |
|
|
f259f05cdc | |
|
|
95cd289373 | |
|
|
e739f5b786 | |
|
|
c79be9a597 | |
|
|
fb03565a25 | |
|
|
7ec53a246c | |
|
|
56946f94e8 | |
|
|
61ee3fe36f | |
|
|
d5f989bbe2 | |
|
|
f5817e5150 | |
|
|
1c24baf3b9 | |
|
|
3d3ef19d4a | |
|
|
7b77c46915 | |
|
|
746f552a21 | |
|
|
7872d5ecab | |
|
|
60da6bd110 | |
|
|
a3bbf6b1c1 | |
|
|
d37709b1a5 | |
|
|
aeff357660 | |
|
|
0e6cb3954a | |
|
|
ae12618c0c | |
|
|
914966bd39 | |
|
|
f89f4b6628 | |
|
|
7407545d1f | |
|
|
f0ffc9a29c | |
|
|
987eb39681 | |
|
|
848109afe8 | |
|
|
d7bdb35bb7 | |
|
|
254b3173d1 | |
|
|
44f06b7305 | |
|
|
b16e95923a | |
|
|
98a7f73c04 | |
|
|
b6a450a482 | |
|
|
66c495d6b5 | |
|
|
42139ef998 | |
|
|
925d5ea356 | |
|
|
ad1f0e29e7 | |
|
|
3da9306ed6 | |
|
|
568a632d65 | |
|
|
5982c0df96 | |
|
|
21046bbcb7 | |
|
|
0c816805fb | |
|
|
28f8b6b54c | |
|
|
7d087ec1f2 | |
|
|
beba8975ca | |
|
|
d4690cc8b5 | |
|
|
38021c2e4b | |
|
|
4233811ae3 | |
|
|
8273acd195 | |
|
|
cacb8c84ae | |
|
|
fb8ae3fcdf | |
|
|
a257d832cb | |
|
|
ff7d191011 | |
|
|
9a2c3f1754 | |
|
|
bcdf506e6c | |
|
|
ccc6cb5d26 | |
|
|
0661c6b932 | |
|
|
99947c0c87 | |
|
|
03cff6ec2e | |
|
|
f86acfebdf | |
|
|
9a62d7806e | |
|
|
a7df6da5f0 | |
|
|
eab68ac270 | |
|
|
a9e3513706 | |
|
|
6b20391c72 | |
|
|
3135300fe6 | |
|
|
ecc6387113 | |
|
|
990c4e22b0 | |
|
|
7eea9316dd | |
|
|
6a546c79e4 | |
|
|
4c48b6c77a | |
|
|
4d5430c3ed | |
|
|
d49af735f1 | |
|
|
03370e8a07 | |
|
|
0b43fa8952 | |
|
|
465c4cc8c7 | |
|
|
37668ddcd4 | |
|
|
7102594444 | |
|
|
b2f2df65bb | |
|
|
8a577fb263 | |
|
|
5c491071b6 | |
|
|
c554237076 | |
|
|
d22a741bf7 | |
|
|
383b3f5d74 | |
|
|
63da7adcf9 | |
|
|
3243aeebc6 | |
|
|
1a86a75345 | |
|
|
3b6cc99d49 | |
|
|
d872ffc606 | |
|
|
3b69c01ead | |
|
|
1e0608aa14 | |
|
|
9b6816e346 | |
|
|
6ee257231d | |
|
|
70edb73f6c | |
|
|
5c7553d4aa | |
|
|
278701f24b | |
|
|
97ab819bf9 | |
|
|
d870f17b85 | |
|
|
91ac6c2357 | |
|
|
3702d1c1a5 | |
|
|
93d48c359e | |
|
|
80dace18e9 | |
|
|
375cbb37df | |
|
|
10d933e037 | |
|
|
4fdd3f6f80 | |
|
|
458b56e33b | |
|
|
c256887132 | |
|
|
6a588db7f6 | |
|
|
6c4e1c6665 | |
|
|
c554d2c00d | |
|
|
b69bf5974a | |
|
|
ecb1691b4d | |
|
|
6a9f2b31a6 | |
|
|
4947cd8456 | |
|
|
8429effe16 | |
|
|
49ebe450be | |
|
|
e3c926da77 | |
|
|
af48da2eb3 | |
|
|
6630309466 | |
|
|
a7c3dee7e3 |
|
|
@ -1268,11 +1268,17 @@ 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: "Microsoft YaHei", "SimSun";
|
font-family: "iconfont";
|
||||||
color: #05101a;
|
color: #05101a;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -3941,7 +3947,7 @@ html>body #ajax-indicator {
|
||||||
}
|
}
|
||||||
.head-nav {
|
.head-nav {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 70px;
|
height: 58px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
@ -3953,14 +3959,14 @@ html>body #ajax-indicator {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
height: 70px;
|
height: 58px;
|
||||||
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: 70px;
|
height: 58px;
|
||||||
line-height: 70px;
|
line-height: 58px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
@ -3971,7 +3977,7 @@ html>body #ajax-indicator {
|
||||||
display: block;
|
display: block;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: #333;
|
color: #fff;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3983,10 +3989,6 @@ 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;
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 27 KiB |
846
src/App.js
|
|
@ -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,470 +46,490 @@ 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"];
|
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"];
|
||||||
|
|
||||||
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) {
|
||||||
// (!keyWord.includes(this.props.location.pathname.split('/')[1])) &&
|
// (!keyWord.includes(this.props.location.pathname.split('/')[1])) &&
|
||||||
if (nextProps.location.pathname.split('/')[1] !== this.props.location.pathname.split('/')[1] && nextState.pathType === this.state.pathType) {
|
if (nextProps.location.pathname.split('/')[1] !== this.props.location.pathname.split('/')[1] && nextState.pathType === this.state.pathType) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
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={
|
render={(props) =><LoginRegisterPage {...this.props} {...props}/>}
|
||||||
(props) => {
|
></Route>
|
||||||
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={"/projects"}
|
path="/resetPassword"
|
||||||
render={
|
render={(props) =><LoginRegisterPage {...this.props} {...props}/>}
|
||||||
(props) => {
|
></Route>
|
||||||
return (<Projects {...this.props} {...props} {...this.state} />)
|
|
||||||
}
|
|
||||||
}>
|
|
||||||
</Route>
|
|
||||||
|
|
||||||
{/* 判断为用户/组织,并进入对应页面 */}
|
{/* 组织 */}
|
||||||
{
|
<Route path={"/organize"}
|
||||||
pathType === 'User' ?
|
render={
|
||||||
<Route exact path="/:username"
|
(props) => {
|
||||||
render={
|
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
||||||
(props) => {
|
}
|
||||||
return (<InfosIndex {...this.props} {...this.state} />)
|
}>
|
||||||
}
|
</Route>
|
||||||
}
|
|
||||||
/> : pathType === 'Organization' ? <Route path={"/:OIdentifier"}
|
{/*新建项目等*/}
|
||||||
render={
|
<Route
|
||||||
(props) => {
|
path={"/projects"}
|
||||||
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
render={
|
||||||
}
|
(props) => {
|
||||||
}>
|
return (<Projects {...this.props} {...props} {...this.state} />)
|
||||||
</Route> : pathType === '404' ? <Route component={Shixunnopage} />:
|
}
|
||||||
<Route exact path="/"
|
}>
|
||||||
render={
|
</Route>
|
||||||
(props) => (
|
|
||||||
personal && personal.length > 0 ?
|
{/* 判断为用户/组织,并进入对应页面 */}
|
||||||
<InfosIndex {...this.props} {...props} />
|
{
|
||||||
:
|
pathType === 'User' ?
|
||||||
<ProjectIndex {...this.props} {...props} />
|
<Route exact path="/:username"
|
||||||
)
|
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>
|
||||||
<Route path="/:username"
|
{/* </Router> */}
|
||||||
render={
|
</MuiThemeProvider>
|
||||||
(props) => {
|
</ConfigProvider>
|
||||||
return (<InfosIndex {...this.props} {...this.state} />)
|
</Provider>
|
||||||
}
|
);
|
||||||
}></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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@ 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: "提示",
|
||||||
|
|
|
||||||
|
|
@ -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;
|
margin-bottom: 10px!important;
|
||||||
a{
|
a{
|
||||||
display: block;
|
display: block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ export default ({history}) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<i className="iconfont icon-sousuo font-18 color-grey-6 ml30" onClick={() => {
|
<i className="iconfont icon-sousuo font-18 ml30" style={{color:"#a5a5a5"}} onClick={() => {
|
||||||
setOpenSearch(true)
|
setOpenSearch(true)
|
||||||
}} />
|
}} />
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,40 @@ 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({system_notification,history}){
|
function SystemNotice({showNotice,system_notification,history,login,hideSystemNotice}){
|
||||||
const [ visible , setVisible ] = useState(false);
|
const [ visible , setVisible ] = useState(false);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(system_notification && !cookie.load('notice_stage')){
|
if(system_notification && !system_notification.is_read && showNotice && login){
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
},[system_notification,history.location])
|
},[system_notification])
|
||||||
|
|
||||||
function sureContinue() {
|
function sureContinue() {
|
||||||
cookie.remove('notice_stage');
|
if(login && ( system_notification && system_notification.id )){
|
||||||
|
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 (
|
||||||
|
|
|
||||||
|
|
@ -19,48 +19,44 @@ function Footer(){
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<div style={{height:"543px"}}></div>
|
{value && showhtml(value)}
|
||||||
<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 2007~2021 国防科技大学Gitlink团队 & IntelliDE <br/>湘ICP备 17009477号</p>
|
||||||
|
// </div> */}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default Footer;
|
export default Footer;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +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 { Input , notification , Dropdown ,Popover, Menu,Badge, Button } from 'antd';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
|
|
@ -98,11 +99,17 @@ class NewHeader extends Component {
|
||||||
|
|
||||||
educoderlogin = () => {
|
educoderlogin = () => {
|
||||||
//登录账号
|
//登录账号
|
||||||
this.setState({
|
if(window.location.pathname === "/"){
|
||||||
isRender: true
|
window.location.href="/login";
|
||||||
})
|
}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) => {
|
||||||
|
|
@ -279,7 +286,7 @@ class NewHeader extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { match ,resetUserInfo ,showNotification} = this.props;
|
const { match ,resetUserInfo ,showNotification,publicNav} = this.props;
|
||||||
let current_user = this.props.user;
|
let current_user = this.props.user;
|
||||||
let {
|
let {
|
||||||
AccountProfiletype,
|
AccountProfiletype,
|
||||||
|
|
@ -368,7 +375,7 @@ class NewHeader extends Component {
|
||||||
|
|
||||||
let search_url = settings && settings.common && settings.common.search;
|
let search_url = settings && settings.common && settings.common.search;
|
||||||
return (
|
return (
|
||||||
<div className="newHeaders" id="nHeader">
|
<div className={publicNav ? `newHeaders publicNav`:`newHeaders`} id="nHeader">
|
||||||
<div className="headerContent">
|
<div className="headerContent">
|
||||||
{isRender === true ?
|
{isRender === true ?
|
||||||
<LoginDialog
|
<LoginDialog
|
||||||
|
|
@ -433,7 +440,8 @@ 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 color-grey-6 ml30 mr15"></i>
|
{/* <i className="iconfont icon-tianjiafangda ml30 mr15"></i> */}
|
||||||
|
<img src={require(`./img/add.png`)} alt="" width="16px" className="mr15 ml30"/>
|
||||||
</Dropdown>:""
|
</Dropdown>:""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -448,7 +456,8 @@ 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 color-grey-6 ml15 mr15"></i>
|
{/* <i className="iconfont icon-xiaoxilingdang ml15 mr15"></i> */}
|
||||||
|
<img src={require(`./img/ring.png`)} alt="" width="16px" className="ml15 mr15"/>
|
||||||
</Badge>}
|
</Badge>}
|
||||||
</Link>
|
</Link>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
@ -457,10 +466,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-grey-6">登录</a>
|
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
|
||||||
{
|
{
|
||||||
settings && settings.common && settings.common.register &&
|
settings && settings.common && settings.common.register &&
|
||||||
<span><em className="vertical-line"></em><a className="ml5 color-grey-6" href={`${settings.common.register}`} target="_blank">注册</a></span>
|
<span><em className="vertical-line"></em><Link className="ml5 color-grey-6" to={`/register`}>注册</Link></span>
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
:
|
:
|
||||||
|
|
|
||||||
|
|
@ -263,3 +263,84 @@
|
||||||
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 749 B |
|
After Width: | Height: | Size: 615 B |
|
|
@ -22,11 +22,10 @@ const ProjectIndex = Loadable({
|
||||||
loading: Loading,
|
loading: Loading,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 项目详情放在用户和组织下作为二级菜单存在
|
const ProjectHome = Loadable({
|
||||||
// const ProjectDetail = Loadable({
|
loader: () => import("./Main/projecthome/Index"),
|
||||||
// loader: () => import("./Main/Detail"),
|
loading: Loading,
|
||||||
// loading: Loading,
|
});
|
||||||
// });
|
|
||||||
|
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
|
|
||||||
|
|
@ -60,23 +59,17 @@ 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"
|
path="/explore/all"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<ProjectIndex {...this.props} {...props} />
|
<ProjectIndex {...this.props} {...props} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path="/"
|
path="/explore"
|
||||||
render={(props) => (
|
render={(props) => (
|
||||||
<ProjectIndex {...this.props} {...props} />
|
<ProjectHome {...this.props} {...props} />
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|
@ -90,10 +83,3 @@ 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)
|
|
||||||
// );
|
|
||||||
|
|
|
||||||
|
|
@ -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.length
|
"total_count":result.data.releases && 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);
|
||||||
|
|
|
||||||
|
|
@ -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={70} targetOffset={160}>
|
<Anchor offsetTop={70}>
|
||||||
<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">
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,6 @@ 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">
|
||||||
|
|
|
||||||
|
|
@ -509,11 +509,6 @@ 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>
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
|
|
|
||||||
|
|
@ -52,12 +52,6 @@ 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">
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 460 B |
|
After Width: | Height: | Size: 463 B |
|
After Width: | Height: | Size: 435 B |
|
After Width: | Height: | Size: 969 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 367 B |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
|
@ -0,0 +1,129 @@
|
||||||
|
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;
|
||||||
|
|
@ -0,0 +1,553 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,114 @@
|
||||||
|
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
|
||||||
|
|
@ -0,0 +1,138 @@
|
||||||
|
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;
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
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;
|
||||||
|
|
@ -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}>
|
<Anchor affix={false} onChange={onChange} offsetTop={140}>
|
||||||
{
|
{
|
||||||
menu.map((item,key)=>{
|
menu.map((item,key)=>{
|
||||||
return(
|
return(
|
||||||
|
|
|
||||||
|
|
@ -112,9 +112,9 @@ class MergeItem extends Component {
|
||||||
to={`/${item.is_original ? item.fork_project_user : owner}/${ item.is_original ? item.fork_project_identifier : projectsId }/tree/${turnbar(item.pull_request_head)}`}
|
to={`/${item.is_original ? item.fork_project_user : owner}/${ item.is_original ? item.fork_project_identifier : projectsId }/tree/${turnbar(item.pull_request_head)}`}
|
||||||
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
|
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
|
||||||
>
|
>
|
||||||
{item.is_original
|
{item.is_fork
|
||||||
? item.fork_project_user
|
? item.pull_request_base
|
||||||
: project_author_name}
|
: item.author_name}
|
||||||
:{item.pull_request_head}
|
:{item.pull_request_head}
|
||||||
</Link>
|
</Link>
|
||||||
</Tag>
|
</Tag>
|
||||||
|
|
@ -136,8 +136,8 @@ 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}`} */}
|
{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>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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_name}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`}
|
to={`/${data.pull_request.is_fork ? data.pull_request_base.fork_project_user : data.issue.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 : data.issue.project_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 : data.issue.project_author_name}: {data.pull_request && data.pull_request.head}
|
{data.pull_request.is_fork ? data.pull_request_base.fork_project_user : data.issue.author_name}: {data.pull_request && data.pull_request.head}
|
||||||
</Link>
|
</Link>
|
||||||
</Tag>
|
</Tag>
|
||||||
<span className="mr8 ver-middle">
|
<span className="mr8 ver-middle">
|
||||||
|
|
@ -383,7 +383,7 @@ class MessageCount extends Component {
|
||||||
to={`/${owner}/${projectsId}/tree/${data.pull_request.base}`}
|
to={`/${owner}/${projectsId}/tree/${data.pull_request.base}`}
|
||||||
className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.issue.project_author_name}:${data.pull_request.base}`}
|
className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.issue.project_author_name}:${data.pull_request.base}`}
|
||||||
>
|
>
|
||||||
{data.issue.project_author_name}:{data.pull_request.base}
|
{data.issue.author_name}:{data.pull_request.base}
|
||||||
</Link>
|
</Link>
|
||||||
</Tag>
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,8 @@ 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({
|
||||||
|
|
|
||||||
|
|
@ -267,6 +267,11 @@ 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>
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,17 @@ 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();
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,10 @@ 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 !== 0 ?
|
item.type && item.type === 2 ?
|
||||||
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}/>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
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;
|
||||||
|
|
@ -123,6 +123,8 @@ 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) => {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ function Team(props){
|
||||||
</Menu>
|
</Menu>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<div className="headerbox">
|
<div className="headerbox">
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,161 @@
|
||||||
|
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 元素上 继续滚动
|
||||||
|
// 60表示每隔60毫秒向上滚动一次
|
||||||
|
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;
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
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 2007~2021 国防科技大学GitLink团队 & IntelliDE <br/>湘ICP备 17009477号</p>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default Footnav;
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
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;
|
||||||
|
After Width: | Height: | Size: 535 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 470 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 345 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 5.3 MiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 34 KiB |