提交 dae1f23f 编写于 作者: 智布道's avatar 智布道 👁

👽 第三方登陆(未实现)

上级 786f0e28
......@@ -49,7 +49,7 @@ public class ShiroService {
/*
配置访问权限
- anon:所有url都都可以匿名访问
- authc: 需要认证才能进行访问(此处指所有非匿名的路径都需要登才能访问)
- authc: 需要认证才能进行访问(此处指所有非匿名的路径都需要登才能访问)
- user:配置记住我或认证通过可以访问
*/
Map<String, String> filterChainDefinitionMap = new LinkedHashMap<String, String>();
......
......@@ -5057,4 +5057,50 @@ ul, menu, dir {
background: rgba(84,92,99,.1);
border-radius: 12px;
cursor: pointer;
}
.mask {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(255, 255, 255, 0.9);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
color: #555;
border-radius: 3px;
z-index: 9999;
}
.mask .masker {
position: relative;
width: 30px;
}
.mask .masker i {
font-size: 30px;
font-weight: 400;
}
.mask .text {
font-size: 24px;
margin-top: 10px;
}
.mask.lock {
cursor: not-allowed;
background-color: #eee;
opacity: 1;
}
.mask.load {
}
\ No newline at end of file
......@@ -59,8 +59,8 @@ var zhyd = window.zhyd || {
$('select[target="tagsinput"], input[target="tagsinput"]').each(function () {
var $this = $(this);
var $bindBox = $this.data("bind-box");
if(!$bindBox || $bindBox.length <= 0) {
return ;
if (!$bindBox || $bindBox.length <= 0) {
return;
}
$this.tagsinput({
......@@ -72,18 +72,19 @@ var zhyd = window.zhyd || {
focusClass: 'focus'
});
function add(){
function add() {
var thisId = $(this).data("value");
var thisText = $(this).text().trim();
$this.tagsinput('add', {"id": thisId, "name": thisText}, {add: false});
}
$($bindBox).find("li").each(function () {
var $li = $(this);
$li.bind('click', add);
});
$(".bootstrap-tagsinput input").bind('keydown',function(event){
$(".bootstrap-tagsinput input").bind('keydown', function (event) {
var thisVal = $(this).val();
if(event.key == 'Enter' || event.keyCode == '13') {
if (event.key == 'Enter' || event.keyCode == '13') {
$.post('/tag/add', {name: thisVal, description: thisVal}, function (response) {
if (response.status !== 200) {
$.alert.error(response.message);
......@@ -400,6 +401,37 @@ var zhyd = window.zhyd || {
}
}
}
},
mask: {
_box: '<div class="mask {{maskType}}"><div class="masker"><i class="{{icon}}"></i></div><h3 class="text">{{text}}</h3></div>',
_icon: {
load: "fa fa-spinner fa-spin",
lock: "fa fa-lock"
},
_open: function (container, msg, type) {
var html = Mustache.render(this._box, {icon: this._icon[type], text: msg, maskType: type});
$(container).append(html);
},
init: function () {
console.log("init mask...");
$(".loading").each(function () {
var $this = $(this);
if (!$this.hasClass("locking")) {
zhyd.mask.loading($this, $this.data("mask"));
}
});
$(".locking").each(function () {
var $this = $(this);
zhyd.mask.locking($this, $this.data("mask"));
});
},
loading: function (container, msg) {
this._open(container, msg || "Loading", "load");
},
locking: function (container, msg) {
this._open(container, msg || "Locking", "lock");
}
}
};
......@@ -448,6 +480,7 @@ $(document).ready(function () {
});
zhyd.combox.init();
zhyd.tagsInput.init();
zhyd.mask.init();
/**
* 针对shiro框架中, ajax请求时session过期后的页面跳转
......
......@@ -26,6 +26,9 @@
<li role="presentation">
<a href="#tab_qiniu" id="qiniu-tab" role="tab" data-toggle="tab" aria-expanded="true">云存储</a>
</li>
<li role="presentation">
<a href="#tab_auth" id="auth-tab" role="tab" data-toggle="tab" aria-expanded="true">第三方登录</a>
</li>
<li role="presentation">
<a href="#tab_comment" id="comment-tab" role="tab" data-toggle="tab" aria-expanded="true">评论</a>
</li>
......@@ -170,11 +173,125 @@
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane fade" id="tab_auth" aria-labelledby="auth-tab">
<form class="form-horizontal form-label-left" novalidate>
<div class="col-md-6">
<div class="x_panel">
<div class="x_title">
<h2><i class="fa fa-github"></i> GitHub <small><a href="https://github.com/settings/developers" target="_blank">OAuth Apps</a></small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content locking" data-mask="暂不支持,敬请期待!">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="githubClientId">Client ID
<i class="fa fa-question-circle" title="GitHub OAuth Apps的Client ID"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="githubClientId" id="githubClientId" placeholder="请输入 client id"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="githubClientSecret">Client Secret
<i class="fa fa-question-circle" title="GitHub OAuth Apps的Client Secret"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="githubClientSecret" id="githubClientSecret" placeholder="请输入 client secret"/>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="x_panel">
<div class="x_title">
<h2><i class="fa fa-git"></i> Gitee <small><a href="https://gitee.com/api/v5/oauth_doc#list_1" target="_blank">第三方应用</a></small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content locking" data-mask="暂不支持,敬请期待!">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="giteeClientId">Client ID
<i class="fa fa-question-circle" title="Gitee 应用的Client Id"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="giteeClientId" id="giteeClientId" placeholder="请输入 client id"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="giteeClientSecret">Client Secret
<i class="fa fa-question-circle" title="Gitee 应用的Client Secret"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="giteeClientSecret" id="giteeClientSecret" placeholder="请输入 client secret"/>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="x_panel">
<div class="x_title">
<h2><i class="fa fa-weibo"></i> Weibo <small><a href="https://open.weibo.com/apps" target="_blank">微博·开放平台</a></small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content locking" data-mask="暂不支持,敬请期待!">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="weiboClientId">App Key
<i class="fa fa-question-circle" title="weibo应用的App Key,可在“应用信息”-“基本信息”页面查看"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="weiboClientId" id="weiboClientId" placeholder="请输入 App Key"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="weiboClientSecret">App Secret
<i class="fa fa-question-circle" title="weibo应用的App Secret,可在“应用信息”-“基本信息”页面查看"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="weiboClientSecret" id="weiboClientSecret" placeholder="请输入 App Secret"/>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="x_panel">
<div class="x_title">
<h2><i class="fa fa-qq"></i> QQ <small><a href="https://connect.qq.com/" target="_blank">QQ互联</a></small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content locking" data-mask="暂不支持,敬请期待!">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="qqClientId">App Id
<i class="fa fa-question-circle" title="qq 开发者账号的App ID"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="qqClientId" id="qqClientId" placeholder="请输入 App Id"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="qqClientSecret">App Secret
<i class="fa fa-question-circle" title="qq 开发者账号的App Secret"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="qqClientSecret" id="qqClientSecret" placeholder="请输入 App Secret"/>
</div>
</div>
</div>
</div>
</div>
<div class="item form-group">
<div class="col-md-11 col-sm-11 col-xs-11">
<button type="button" class="btn btn-primary saveBtn"><i class="fa fa-save"> 保存</i></button>
</div>
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane fade" id="tab_comment" aria-labelledby="comment-tab">
<form class="form-horizontal form-label-left" novalidate>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12 aero" for="anonymous">允许匿名评论?
<i class="fa fa-question-circle" title="【暂不可用】是否允许匿名评论,如果为否则必须需要登。"></i>
<i class="fa fa-question-circle" title="【暂不可用】是否允许匿名评论,如果为否则必须需要登。"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<ul class="list-unstyled list-inline">
......
spring:
profiles:
include: [center]
####### database Config #######
####### database Config #######
datasource:
druid:
connection-init-sqls: set names utf8mb4
......@@ -9,8 +9,8 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
username: root
password:
####### Redis Config #######
password: root
####### Redis Config #######
redis:
database: 5
# Redis服务器地址
......@@ -18,12 +18,12 @@ spring:
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码(默认为空)
password:
password: qwe!@#123
####### redis缓存服务配置 #######
####### redis缓存服务配置 #######
session:
store-type: redis
####### 自定义配置 #######
####### 自定义配置 #######
####### 自定义配置 #######
####### 自定义配置 #######
spring:
profiles:
include: [center]
####### database Config #######
####### database Config #######
datasource:
druid:
connection-init-sqls: set names utf8mb4
......@@ -24,6 +24,6 @@ spring:
session:
store-type: redis
####### 自定义配置 #######
####### 自定义配置 #######
####### 自定义配置 #######
####### 自定义配置 #######
......@@ -51,6 +51,7 @@ spring:
# logging settings
logging:
path: /var/tmp/website-blog-web
# braum过滤器,用于过滤恶意请求
braum:
limit:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册