Merge branch 'dev' into Refactor/Fetch

Anankke-dev
Sukka 8 years ago committed by GitHub
commit 60e4c5736c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,6 +21,8 @@ use App\Utils\TelegramProcess;
use App\Utils\Spay_tool;
use App\Utils\Geetest;
use voku\helper\AntiXSS;
class VueController extends BaseController {
private $user;
@ -74,6 +76,7 @@ class VueController extends BaseController {
"dateY" => date("Y"),
"isLogin" => $user->isLogin,
"enable_telegram" => Config::get('enable_telegram'),
"enable_crisp" => Config::get('enable_crisp'),
);
$res['ret'] = 1;

@ -115,7 +115,7 @@ $System_Config['account_expire_delete_days']='-1'; //账户到期几天之后
$System_Config['enable_kill']='true'; //是否允许用户注销账户
$System_Config['notify_limit_mode'] = 'false'; //false为关闭,per为按照百分比提醒,mb为按照固定剩余流量提醒
$System_Config['notify_limit_value'] = '20'; //当上一项为per时,此处填写百分比;当上一项为mb时,此处填写流量
$System_Config['mergeSub'] = false; //合并订阅设置 可选项 false / true
$System_Config['mergeSub'] = 'false'; //合并订阅设置 可选项 false / true
//Telegram bot设置------------------------------------------------------------------------------------

@ -31,6 +31,10 @@ a {
flex-wrap: wrap;
}
.text-left {
text-align: left;
}
[v-cloak] {
display: none;
}
@ -43,6 +47,7 @@ a {
.loading {
position: fixed;
top: 0;
text-align: center;
width: 100%;
height: 100%;
@ -229,6 +234,10 @@ input.checkbox {
position: relative;
}
.page-auth {
min-height: 450px;
}
.input-control {
justify-content: center;
flex-wrap: wrap;
@ -360,7 +369,9 @@ select {
#register {
margin-top: 2rem;
}
#embed-captcha-reg {
min-height: 44px;
}
#embed-captcha-reg .geetest_btn {
margin-left: auto;
margin-right: auto;
@ -430,6 +441,14 @@ select {
.auth>div:first-of-type {
padding: 0 0 0 5%;
}
.usrcenter {
padding: 0 5rem;
}
.enableCrisp {
padding-right: 3rem;
}
}
@media screen and (min-width:48em) {
@ -597,4 +616,55 @@ input[type=checkbox].uim-checkbox {
transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
-webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
}
}
}
.spinnercube {
margin: 100px auto;
width: 32px;
height: 32px;
position: relative;
transition: all .3s;
}
.cube1, .cube2 {
background-color: white;
width: 30px;
height: 30px;
position: absolute;
top: 0;
left: 0;
-webkit-animation: cubemove 1.8s infinite ease-in-out;
animation: cubemove 1.8s infinite ease-in-out;
}
.cube2 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
@-webkit-keyframes cubemove {
25% { -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5) }
50% { -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg) }
75% { -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5) }
100% { -webkit-transform: rotate(-360deg) }
}
@keyframes cubemove {
25% {
transform: translateX(42px) rotate(-90deg) scale(0.5);
-webkit-transform: translateX(42px) rotate(-90deg) scale(0.5);
} 50% {
transform: translateX(42px) translateY(42px) rotate(-179deg);
-webkit-transform: translateX(42px) translateY(42px) rotate(-179deg);
} 50.1% {
transform: translateX(42px) translateY(42px) rotate(-180deg);
-webkit-transform: translateX(42px) translateY(42px) rotate(-180deg);
} 75% {
transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
-webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
} 100% {
transform: rotate(-360deg);
-webkit-transform: rotate(-360deg);
}
}

@ -12,19 +12,32 @@
<title>Document</title>
<link rel="stylesheet" href="/theme/material/css/index_base.css">
<link rel="stylesheet" href="/theme/material/css/index.css">
{if $config["enable_crisp"] == 'true'}
<literal><script type="text/javascript">
window.$crisp=[];
window.CRISP_WEBSITE_ID="{$config["crisp_id"]}";
$crisp.push(["set", "user:email", "{$user->email}"]);
$crisp.push(["config", "color:theme", "grey"]);
(function(){ d=document;s=d.createElement("script"); s.src="https://client.crisp.chat/l.js"; s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();
</script></literal>
{/if}
</head>
<style>
.slide-fade-enter-active,.fade-enter-active,.loading-fade-enter-active,.rotate-fade-enter-active {
.slide-fade-enter-active,.fade-enter-active,.loading-fade-enter-active,.rotate-fade-enter-active,.loading-fadex-enter-active {
transition: all .3s ease;
}
.slide-fade-leave-active,.fade-leave-active,.loading-fade-leave-active,.rotate-fade-leave-active {
.slide-fade-leave-active,.fade-leave-active,.loading-fade-leave-active,.rotate-fade-leave-active,.loading-fadex-leave-active {
transition: all .3s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
.loading-fade-enter {
transform: scaleY(.75);
opacity: 0;
}
.loading-fadex-enter {
transform: scaleX(.75);
opacity: 0;
}
.slide-fade-enter {
transform: translateY(-20px);
opacity: 0;
@ -43,7 +56,7 @@
-webkit-transform: rotateY(90deg);
opacity: 0;
}
.fade-enter,.fade-leave-to {
.fade-enter,.fade-leave-to,.loading-fade-leave-to,.loading-fadex-leave-to {
opacity: 0;
}
</style>
@ -85,7 +98,7 @@
</div>
<div class="footer pure-g">
<div class="pure-u-1 pure-u-sm-1-2 staff">POWERED BY <a href="./staff">SSPANEL-UIM</a></div>
<div class="pure-u-1 pure-u-sm-1-2 time">&copy;$[globalConfig.indexMsg.date]$ $[globalConfig.indexMsg.appname]$</div>
<div class="pure-u-1 pure-u-sm-1-2 time" :class="{ enableCrisp:globalConfig.crisp === 'true' }">&copy;$[globalConfig.indexMsg.date]$ $[globalConfig.indexMsg.appname]$</div>
</div>
<transition name="slide-fade" mode="out-in">
@ -204,6 +217,7 @@ const tmp = new Vuex.Store({
jumpDelay: '',
isGetestSuccess: '',
registMode: '',
crisp: '',
base_url: '',
isEmailVeryify: '',
login_token: '',
@ -248,6 +262,7 @@ const tmp = new Vuex.Store({
state.globalConfig.login_token = config.login_token;
state.globalConfig.login_number = config.login_number;
state.globalConfig.telegram_bot = config.telegram_bot;
state.globalConfig.crisp = config.enable_crisp;
state.globalConfig.enable_telegram = config.enable_telegram;
state.globalConfig.indexMsg.appname = config.appName;
state.globalConfig.indexMsg.date = config.dateY;
@ -723,6 +738,10 @@ const Register = {
icon: '',
};
if (this.globalConfig.isEmailVeryify === 'true') {
ajaxCon.emailcode = this.email_code;
}
if (this.globalConfig.registMode !== 'invite') {
ajaxCon.code = 0;
if ((this.getCookie('code')) !== '') {
@ -887,7 +906,7 @@ const Reset = {
<div class="input-control flex wrap">
<label for="Email" class="flex space-between align-center">
<span>邮箱</span>
<span class="button-index"><router-link to="/auth/login"><i class="fa fa-mail-forward"></i> 返回登录页</router-link></span>
<span><router-link class="button-index" to="/auth/login"><i class="fa fa-mail-forward"></i> 返回登录页</router-link></span>
</label>
<input v-model="email" type="text" name="Email">
</div>
@ -947,18 +966,45 @@ const Panel = {
delimiters: ['$[',']$'],
template: /*html*/ `
<div class="page-user pure-u-1">
<h1>用户页面demo</h1>
<a href="/user" class="button-index">进入用户中心</a>
<div class="title-back flex align-center">USERCENTER</div>
<transition name="loading-fadex" mode="out-in">
<div class="loading flex align-center" v-if="userLoadState === 'beforeload'">USERCENTER</div>
<div class="loading flex align-center" v-else-if="userLoadState === 'loading'" key="loading">
<div class="spinnercube">
<div class="cube1"></div>
<div class="cube2"></div>
</div>
</div>
<div class="usrcenter text-left" v-else-if="userLoadState === 'loaded'">
<h1>用户中心</h1>
<a href="/user" class="button-index">进入管理面板</a>
</div>
</transition>
</div>
`,
props: ['routermsg'],
data: function() {
return {
userLoadState: 'beforeload',
userCon: '',
}
},
mounted() {
_get('/user/getuserinfo')
.then((r)=>{
if (r.data.ret === 1) {
console.log(r.data.info);
}
});
let self = this;
this.userLoadState = 'loading';
_get('/user/getuserinfo').then((r) => {
if (r.data.ret === 1) {
console.log(r.data.info);
this.userCon = r.data.info.user;
console.log(this.userCon);
}
}).then(r=>{
setTimeout(()=>{
self.userLoadState = 'loaded';
},1000)
});
},
beforeRouteLeave (to, from, next) {
if (to.matched.some(function(record) {
@ -1153,7 +1199,7 @@ const indexPage = new Vue({
this.routeJudge();
setTimeout(()=>{
tmp.commit('SET_LOADSTATE');
},1000)
},1000);
},
});

@ -229,7 +229,7 @@
<p><span class="icon icon-lg text-white">filter_4</span> 备用导入节点方法:点击复制<a class="copy-text btn-dl" data-clipboard-text="{$ssr_url_all}"><i class="material-icons icon-sm">how_to_vote</i>普通端口链接</a>或者<a class="copy-text btn-dl" data-clipboard-text="{$ssr_url_all_mu}"><i class="material-icons icon-sm">how_to_vote</i>单端口多用户链接</a>,然后右键小飞机->从剪贴板复制地址</p>
<div><span class="icon icon-lg text-white">flash_auto</span> {if !$mergeSub}普通节点{/if}订阅地址:</div>
<div class="float-clear"><input type="text" class="input form-control form-control-monospace cust-link col-xx-12 col-sm-8 col-lg-7" name="input1" readonly value="{$subUrl}{$ssr_sub_token}{if !$mergeSub}?mu=0{/if}" readonly="true"><button class="copy-text btn btn-subscription col-xx-12 col-sm-3 col-lg-2" type="button" data-clipboard-text="{$subUrl}{$ssr_sub_token}?mu=0">点击复制</button><br></div>
<div class="float-clear"><input type="text" class="input form-control form-control-monospace cust-link col-xx-12 col-sm-8 col-lg-7" name="input1" readonly value="{$subUrl}{$ssr_sub_token}?mu=0" readonly="true"><button class="copy-text btn btn-subscription col-xx-12 col-sm-3 col-lg-2" type="button" data-clipboard-text="{$subUrl}{$ssr_sub_token}?mu=0">点击复制</button><br></div>
{if !$mergeSub}
<div><span class="icon icon-lg text-white">flash_auto</span> 单端口节点订阅地址:</div>
<div class="float-clear"><input type="text" class="input form-control form-control-monospace cust-link col-xx-12 col-sm-8 col-lg-7" name="input1" readonly value="{$subUrl}{$ssr_sub_token}?mu=1" readonly="true"><button class="copy-text btn btn-subscription col-xx-12 col-sm-3 col-lg-2" type="button" data-clipboard-text="{$subUrl}{$ssr_sub_token}?mu=1">点击复制</button><br></div>

Loading…
Cancel
Save