mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-30 13:20:24 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
3493201132
@ -9,7 +9,7 @@ import { changeMenuItem } from '../../reducer/modules/menu'
|
|||||||
import { withRouter } from 'react-router';
|
import { withRouter } from 'react-router';
|
||||||
import Srch from './Search/Search'
|
import Srch from './Search/Search'
|
||||||
const { Header } = Layout;
|
const { Header } = Layout;
|
||||||
import { logoSVG } from '../../common.js';
|
import { logoSVG, betaSVG } from '../../common.js';
|
||||||
|
|
||||||
const MenuUser = (props) => (
|
const MenuUser = (props) => (
|
||||||
<Menu className="user-menu" >
|
<Menu className="user-menu" >
|
||||||
@ -167,7 +167,7 @@ export default class HeaderCom extends Component {
|
|||||||
<div className="content g-row">
|
<div className="content g-row">
|
||||||
<div className="logo">
|
<div className="logo">
|
||||||
<Link to="/group" onClick={this.relieveLink} className="href">
|
<Link to="/group" onClick={this.relieveLink} className="href">
|
||||||
<span className="img">{logoSVG('32px')}</span><span className="logo-name">YAPI<span className="ui-badge"></span></span>
|
<span className="img">{logoSVG('32px')}</span><span className="logo-name">YAPI<span className="ui-badge">{betaSVG}</span></span>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="user-toolbar">
|
<div className="user-toolbar">
|
||||||
|
@ -32,12 +32,13 @@
|
|||||||
}
|
}
|
||||||
.ui-badge {
|
.ui-badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -20px;
|
right: -18px;
|
||||||
top: 10px;
|
top: 6px;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 21px;
|
height: 21px;
|
||||||
background-size: 240px 21px;
|
background-size: 236px 21px;
|
||||||
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IuWbvuWxgl8xIiB4bWxucz0iaHR0cDovL3d3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ZSgyIDEpIj48dHNwYW4geD0iNjAiIHk9IjEwIj5CZXRhPC90c3Bhbj48L3RleHQ+PHRleHQgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMiAxKSI+PHRzcGFuIHg9IjkwIiB5PSIxMCI+QmV0YTwvdHNwYW4+PC90ZXh0Pjx0ZXh0IHRyYW5zZm9ybT0idHJhbnNsYXRlKDIgMSkiPjx0c3BhbiB4PSIxMjAiIHk9IjEwIj5CZXRhPC90c3Bhbj48L3RleHQ+PHRleHQgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMiAxKSI+PHRzcGFuIHg9IjE1MCIgeT0iMTAiPkJldGE8L3RzcGFuPjwvdGV4dD48dGV4dCB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyIDEpIj48dHNwYW4geD0iMTgwIiB5PSIxMCI+QmV0YTwvdHNwYW4+PC90ZXh0Pjx0ZXh0IHRyYW5zZm9ybT0idHJhbnNsYXRlKDIgMSkiPjx0c3BhbiB4PSIyMTAiIHk9IjEwIj5CZXRhPC90c3Bhbj48L3RleHQ+PC9nPjwvZz48L3N2Zz4=);
|
||||||
animation: flag .8s steps(8) infinite;
|
animation: flag .8s steps(8) infinite;
|
||||||
}
|
}
|
||||||
@keyframes flag {
|
@keyframes flag {
|
||||||
|
@ -67,9 +67,10 @@ class ProjectCard extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { projectData, inFollowPage } = this.props;
|
const { projectData, inFollowPage } = this.props;
|
||||||
|
console.log(projectData);
|
||||||
return (
|
return (
|
||||||
<div className="card-container">
|
<div className="card-container">
|
||||||
<Card bordered={false} className="m-card" onClick={() => this.props.history.push('/project/' + projectData._id)}>
|
<Card bordered={false} className="m-card" onClick={() => this.props.history.push('/project/' + (projectData.projectid || projectData._id))}>
|
||||||
<Icon type={projectData.icon || 'star-o'} className="ui-logo" style={{ backgroundColor: constants.PROJECT_COLOR[projectData.color] || constants.PROJECT_COLOR.blue }} />
|
<Icon type={projectData.icon || 'star-o'} className="ui-logo" style={{ backgroundColor: constants.PROJECT_COLOR[projectData.color] || constants.PROJECT_COLOR.blue }} />
|
||||||
<h4 className="ui-title">{projectData.name || projectData.projectname}</h4>
|
<h4 className="ui-title">{projectData.name || projectData.projectname}</h4>
|
||||||
</Card>
|
</Card>
|
||||||
|
@ -33,7 +33,6 @@ class Follows extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
receiveRes = () => {
|
receiveRes = () => {
|
||||||
console.log('receive res!');
|
|
||||||
this.props.getFollowList(this.props.uid).then((res) => {
|
this.props.getFollowList(this.props.uid).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.payload.data.errcode === 0) {
|
if (res.payload.data.errcode === 0) {
|
||||||
|
@ -388,7 +388,7 @@ class InterfaceEditForm extends Component {
|
|||||||
<span>
|
<span>
|
||||||
接口路径
|
接口路径
|
||||||
<Tooltip title="接口路径,支持动态路由,例如:'/api/user/:id'">
|
<Tooltip title="接口路径,支持动态路由,例如:'/api/user/:id'">
|
||||||
<Icon type="question" style={{ width: "10px" }} />
|
<Icon type="question-circle-o" style={{ width: "10px" }} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
@ -218,8 +218,7 @@ class ProjectMember extends Component {
|
|||||||
{this.state.groupMemberList.length ? this.state.groupMemberList.map((item, index) => {
|
{this.state.groupMemberList.length ? this.state.groupMemberList.map((item, index) => {
|
||||||
return (<div key={index} className="card-item">
|
return (<div key={index} className="card-item">
|
||||||
<img src={location.protocol + '//' + location.host + '/api/user/avatar?uid=' + item.uid} className="item-img" />
|
<img src={location.protocol + '//' + location.host + '/api/user/avatar?uid=' + item.uid} className="item-img" />
|
||||||
<p className="item-name">{item.username}</p>
|
<p className="item-name">{item.username}{item.uid === this.props.uid ? <Badge count={'我'} style={{ backgroundColor: '#689bd0', fontSize: '12px', marginLeft: '8px', borderRadius: '4px' }} /> : null}</p>
|
||||||
{item.uid === this.props.uid ? <Badge count={'我'} style={{ backgroundColor: '#689bd0', marginLeft: '8px', borderRadius: '4px' }} /> : null}
|
|
||||||
{item.role === 'owner' ? <p className="item-role">组长</p> : null}
|
{item.role === 'owner' ? <p className="item-role">组长</p> : null}
|
||||||
{item.role === 'dev' ? <p className="item-role">开发者</p> : null}
|
{item.role === 'dev' ? <p className="item-role">开发者</p> : null}
|
||||||
</div>);
|
</div>);
|
||||||
|
55
index.html
Normal file
55
index.html
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title></title>
|
||||||
|
<style media="screen">
|
||||||
|
.test {
|
||||||
|
width: 400px;
|
||||||
|
position: relative;
|
||||||
|
min-height: 240px;
|
||||||
|
background-color: #2395f1;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.test:before, .test:after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
min-width: 800px;
|
||||||
|
min-height: 800px;
|
||||||
|
background-color: #fff;
|
||||||
|
animation-name: rotate;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
}
|
||||||
|
.test:before {
|
||||||
|
bottom: 180px;
|
||||||
|
border-radius: 45%;
|
||||||
|
animation-duration: 10s;
|
||||||
|
}
|
||||||
|
.test:after {
|
||||||
|
top: 180px;
|
||||||
|
opacity: .5;
|
||||||
|
border-radius: 47%;
|
||||||
|
animation-duration: 10s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rotate {
|
||||||
|
0% {
|
||||||
|
transform: translate(-50%, 0) rotateZ(0deg);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: translate(-50%, -2%) rotateZ(180deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translate(-50%, 0%) rotateZ(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="test">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user