refactor(templates): 移除 jinja2 includes 使用
This commit is contained in:
@@ -14,7 +14,7 @@ def user_identity_lookup(user):
|
||||
@jwt.user_lookup_loader
|
||||
def user_lookup_callback(_jwt_header, jwt_data):
|
||||
identity = jwt_data["sub"]
|
||||
return UserORM.query.filter_by(id=identity).one_or_none()
|
||||
return UserORM.query.filter(UserORM.id == identity).one_or_none()
|
||||
|
||||
|
||||
@jwt.expired_token_loader
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
function getCookie(name) {
|
||||
let matches = document.cookie.match(
|
||||
new RegExp(
|
||||
"(?:^|; )" +
|
||||
name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") +
|
||||
"=([^;]*)",
|
||||
),
|
||||
);
|
||||
return matches ? decodeURIComponent(matches[1]) : undefined;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
|
||||
<link rel="stylesheet" href="/static/admin/css/admin.css" />
|
||||
<link rel="stylesheet" href="/static/admin/css/admin.dark.css" />
|
||||
<link rel="stylesheet" href="/static/admin/css/variables.css" />
|
||||
<link rel="stylesheet" href="/static/admin/css/reset.css" />
|
||||
<!-- 依 赖 脚 本 -->
|
||||
<script src="/static/component/layui/layui.js"></script>
|
||||
<script src="/static/component/pear/pear.js"></script>
|
||||
<script>
|
||||
function getCookie(name) {
|
||||
let matches = document.cookie.match(
|
||||
new RegExp(
|
||||
"(?:^|; )" +
|
||||
name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") +
|
||||
"=([^;]*)",
|
||||
),
|
||||
);
|
||||
return matches ? decodeURIComponent(matches[1]) : undefined;
|
||||
}
|
||||
</script>
|
||||
@@ -7,7 +7,15 @@
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1"
|
||||
/>
|
||||
<title>Pear Admin Flask</title>
|
||||
{% include 'includes/script.html' %}
|
||||
<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
|
||||
<link rel="stylesheet" href="/static/admin/css/admin.css" />
|
||||
<link rel="stylesheet" href="/static/admin/css/admin.dark.css" />
|
||||
<link rel="stylesheet" href="/static/admin/css/variables.css" />
|
||||
<link rel="stylesheet" href="/static/admin/css/reset.css" />
|
||||
<!-- 依 赖 脚 本 -->
|
||||
<script src="/static/component/layui/layui.js"></script>
|
||||
<script src="/static/component/pear/pear.js"></script>
|
||||
<script src="/static/js/pear_admin_flask.js"></script>
|
||||
</head>
|
||||
<!-- 结 构 代 码 -->
|
||||
<body class="layui-layout-body pear-admin">
|
||||
|
||||
@@ -70,20 +70,6 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="tab-log-verification">
|
||||
<div class="verification-text">
|
||||
<div class="layui-input-wrap">
|
||||
<div class="layui-input-prefix">
|
||||
<i class="layui-icon layui-icon-auz"></i>
|
||||
</div>
|
||||
<input lay-verify="required" placeholder="验证码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<img src="/static/admin/images/captcha.gif" alt=""
|
||||
class="verification-img"/>
|
||||
</div>
|
||||
-->
|
||||
<div class="layui-form-item">
|
||||
<div class="remember-passsword">
|
||||
<div class="remember-cehcked">
|
||||
|
||||
Reference in New Issue
Block a user