1 Star 0 Fork 0

Mr Biiiiiiig / yapi-plugin-gitlab

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
client.js 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
sk0122 提交于 2019-01-29 16:22 . async project members
import React, { Component } from 'react'
import Group from './group/Group.js'
import ProjectMember from './group/ProjectMember'
/**
*
* @param options
*/
module.exports = function (options) {
const gitLablogin = () => {
const {host, redirectUri, authPath, appId} = options;
location.href = host + authPath + '?client_id=' + appId +
'&redirect_uri=' + encodeURIComponent(redirectUri) +
'&response_type=code&scope=api';
}
const GitLabComponent = () => (
<button onClick={gitLablogin} className="btn-home btn-home-normal" >GitLab登录</button>
)
this.bindHook('third_login', GitLabComponent);
this.bindHook('app_route', function (router) {
router.group = {
path: '/group',
component: Group
}
});
this.bindHook('sub_nav', function (router) {
router.members = {
name: '成员管理',
path: '/project/:id/members',
component: ProjectMember
}
});
};
1
https://gitee.com/mrbiiiiiiig/yapi-plugin-gitlab.git
git@gitee.com:mrbiiiiiiig/yapi-plugin-gitlab.git
mrbiiiiiiig
yapi-plugin-gitlab
yapi-plugin-gitlab
master

搜索帮助