mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
v2.0.16-20230425
This commit is contained in:
@@ -48,7 +48,7 @@ layui.use(['layer','miniTab'], function(){
|
||||
//如果失败
|
||||
if(up_info.code != 1){
|
||||
layer.closeAll();
|
||||
layer.alert(up_info.msg ?? "错误代码:404",{icon:2,title:'更新失败',anim: 2,shadeClose: false,closeBtn: 0,btn: ['知道了']});
|
||||
layer.alert(up_info.msg || "错误代码:404",{icon:2,title:'更新失败',anim: 2,shadeClose: false,closeBtn: 0,btn: ['知道了']});
|
||||
return;
|
||||
}
|
||||
//设为异步模式
|
||||
@@ -70,7 +70,7 @@ layui.use(['layer','miniTab'], function(){
|
||||
request_update();
|
||||
}else{
|
||||
layer.closeAll();
|
||||
layer.alert(data.msg ?? "未知错误,请联系开发者!",{icon:5,title:up_info.info[i-1],anim: 2,shadeClose: false,closeBtn: 0,btn: ['知道了']});
|
||||
layer.alert(data.msg || "未知错误,请联系开发者!",{icon:5,title:up_info.info[i-1],anim: 2,shadeClose: false,closeBtn: 0,btn: ['知道了']});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ layui.define(['table', 'jquery', 'form'], function (exports) {
|
||||
//判断是否多搜索条件
|
||||
if(opt.searchType == 'more'){
|
||||
$.each(opt.searchList, function (index, item) {
|
||||
tableBox += '<input style="display:inline-block;width:'+(item.width ?? '190px') +';height:30px;vertical-align:middle;margin-right:-1px;border: 1px solid #C9C9C9;" type="text" name="'+item.searchKey+'" placeholder="'+item.searchPlaceholder+'" autocomplete="off" class="layui-input">';
|
||||
tableBox += '<input style="display:inline-block;width:'+(item.width || '190px') +';height:30px;vertical-align:middle;margin-right:-1px;border: 1px solid #C9C9C9;" type="text" name="'+item.searchKey+'" placeholder="'+item.searchPlaceholder+'" autocomplete="off" class="layui-input">';
|
||||
});
|
||||
}else{
|
||||
tableBox += '<input style="display:inline-block;width:190px;height:30px;vertical-align:middle;margin-right:-1px;border: 1px solid #C9C9C9;" type="text" name="'+opt.searchKey+'" placeholder="'+opt.searchPlaceholder+'" autocomplete="off" class="layui-input">';
|
||||
|
||||
@@ -79,7 +79,7 @@ layui.use(['form','upload','miniTab'], function () {
|
||||
form_data.icon = res.icon;
|
||||
$("#icon").val(res.icon);
|
||||
}else{
|
||||
layer.msg(res.msg ?? '上传失败', {icon: 5});
|
||||
layer.msg(res.msg || '上传失败', {icon: 5});
|
||||
}
|
||||
|
||||
},error: function(){
|
||||
|
||||
@@ -7,7 +7,7 @@ layui.use(['form','table','dropdown','miniTab'], function () {
|
||||
var categorys = [];
|
||||
var IDs = [];
|
||||
var api = get_api('read_link_list'); //列表接口
|
||||
var limit = localStorage.getItem(u + "_limit")??50; //尝试读取本地记忆数据,没有就默认50
|
||||
var limit = localStorage.getItem(u + "_limit") || 50; //尝试读取本地记忆数据,没有就默认50
|
||||
var pwds = [];
|
||||
miniTab.listen();
|
||||
//渲染表格
|
||||
|
||||
@@ -3,7 +3,7 @@ layui.use(['form','table'], function () {
|
||||
var table = layui.table;
|
||||
var data_tr,table_page;
|
||||
var api = get_api('read_link_list'); //列表接口
|
||||
var limit = localStorage.getItem(u + "_limit")??50; //尝试读取本地记忆数据,没有就默认50
|
||||
var limit = localStorage.getItem(u + "_limit") || 50; //尝试读取本地记忆数据,没有就默认50
|
||||
|
||||
var cols=[[ //表头
|
||||
{type:'radio'} //开启单选框
|
||||
|
||||
@@ -18,7 +18,7 @@ layui.use(['form','table'], function () {
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var api = get_api('read_login_info'); //列表接口
|
||||
var limit = localStorage.getItem(u + "_limit")??50; //尝试读取本地记忆数据,没有就默认50
|
||||
var limit = localStorage.getItem(u + "_limit") || 50; //尝试读取本地记忆数据,没有就默认50
|
||||
|
||||
var cols=[[ //表头
|
||||
{field: 'id', title: 'ID', width:60, sort: true,hide:true}
|
||||
|
||||
@@ -134,9 +134,9 @@
|
||||
|
||||
<?php } ?>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn layui-btn-primary layui-border-black" id="help" sort_id="7968924">帮助</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-border-black" id="help" sort_id="7968924">帮助</button>
|
||||
<?php if($global_config['Default_User'] != U ){ ?>
|
||||
<button class="layui-btn layui-btn-primary layui-border-black" id="sdhp" data=>设为默认主页</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-border-black" id="sdhp" data=>设为默认主页</button>
|
||||
<?php } ?>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</button>
|
||||
</div>
|
||||
@@ -184,7 +184,7 @@ layui.use(['jquery','form','upload'], function () {
|
||||
$.removeCookie("Default_User");
|
||||
$("#sdhp").text('设为默认主页')
|
||||
}else{
|
||||
$.cookie("Default_User",u);
|
||||
$.cookie("Default_User",u,{expires: 360});
|
||||
$("#sdhp").text('取消默认主页')
|
||||
}
|
||||
layer.msg("设置成功", {icon: 1});
|
||||
|
||||
@@ -303,7 +303,7 @@ layui.use(['layer','element','upload','form','table'], function(){
|
||||
if(res.code == 1){
|
||||
$("#imp_link button").removeClass("layui-btn-disabled");
|
||||
}else{
|
||||
layer.alert(res.msg ?? "上传异常,请刷新重试<br />若无法解决请联系技术支持",{icon:5,title:'上传失败',anim: 2,closeBtn: 0,btn: ['刷新页面']},function () {location.reload();});
|
||||
layer.alert(res.msg || "上传异常,请刷新重试<br />若无法解决请联系技术支持",{icon:5,title:'上传失败',anim: 2,closeBtn: 0,btn: ['刷新页面']},function () {location.reload();});
|
||||
}
|
||||
},error: function(){
|
||||
layer.alert("上传异常,请刷新重试<br />若无法解决请联系技术支持",{icon:5,title:'错误',anim: 2,closeBtn: 0,btn: ['刷新页面']},function () {location.reload();});
|
||||
|
||||
@@ -179,7 +179,7 @@ layui.use(['element','table','layer','form','util','dropdown'], function(){
|
||||
var form = layui.form;
|
||||
var dropdown = layui.dropdown;
|
||||
var layer = layui.layer;
|
||||
var limit = localStorage.getItem(u + "_limit")??50;
|
||||
var limit = localStorage.getItem(u + "_limit") || 50;
|
||||
|
||||
form.val('conf', <?php echo json_encode($data);?>);
|
||||
//表头
|
||||
|
||||
@@ -171,12 +171,14 @@ require 'header.php';
|
||||
<cite>站点设置</cite>
|
||||
</a>
|
||||
</div>
|
||||
<?php if(check_purview('theme_in',1)){ ?>
|
||||
<div class="layui-col-xs3 layuimini-qiuck-module">
|
||||
<a href="javascript:;" layuimini-content-href="theme_home" data-title="主题设置" data-icon="fa fa-magic">
|
||||
<i class="fa fa-magic"></i>
|
||||
<cite>主题设置</cite>
|
||||
</a>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="layui-col-xs3 layuimini-qiuck-module">
|
||||
<a href="javascript:;" layuimini-content-href="category_list" data-title="分类管理" data-icon="fa fa-list-ul">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
|
||||
@@ -29,7 +29,7 @@ layui.use(['form','table'], function () {
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var api = get_api('read_pwd_group_list'); //列表接口
|
||||
var limit = localStorage.getItem(u + "_limit")??50;
|
||||
var limit = localStorage.getItem(u + "_limit") || 50;
|
||||
|
||||
var load_list = function () {
|
||||
table.render({
|
||||
|
||||
@@ -94,7 +94,7 @@ layui.use(['layer','form','miniTab'], function () {
|
||||
layer.msg('导入完毕', {icon: 1});
|
||||
}else{
|
||||
layer.closeAll();
|
||||
layer.alert(data.msg ?? "未知错误,请联系开发者!",{icon:5,title:'导入失败',anim: 2,shadeClose: false,closeBtn: 0,btn: ['知道了']});
|
||||
layer.alert(data.msg || "未知错误,请联系开发者!",{icon:5,title:'导入失败',anim: 2,shadeClose: false,closeBtn: 0,btn: ['知道了']});
|
||||
}
|
||||
});
|
||||
return;
|
||||
@@ -110,7 +110,7 @@ layui.use(['layer','form','miniTab'], function () {
|
||||
request_import();
|
||||
}else{
|
||||
layer.closeAll();
|
||||
layer.alert(data.msg ?? "未知错误,请联系开发者!",{icon:5,title:'导入失败',anim: 2,shadeClose: false,closeBtn: 0,btn: ['知道了']});
|
||||
layer.alert(data.msg || "未知错误,请联系开发者!",{icon:5,title:'导入失败',anim: 2,shadeClose: false,closeBtn: 0,btn: ['知道了']});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ layui.use(['table','layer','form'], function(){
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var limit = localStorage.getItem(u + "_limit")??50;
|
||||
var limit = localStorage.getItem(u + "_limit") || 50;
|
||||
|
||||
|
||||
var cols=[[ //表头
|
||||
|
||||
@@ -49,7 +49,7 @@ layui.use(['table','layer','form'], function () {
|
||||
var form = layui.form;
|
||||
var table = layui.table;
|
||||
var layer = layui.layer;
|
||||
var limit = localStorage.getItem(u + "_limit")??50;
|
||||
var limit = localStorage.getItem(u + "_limit") || 50;
|
||||
var api = get_api('read_log');
|
||||
var IDs = [];
|
||||
|
||||
|
||||
@@ -16,7 +16,19 @@ $title='系统设置';require(dirname(__DIR__).'/header.php');
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">默认主页的账号,优先级:Get>Cookie/Host>默认用户>admin</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">默认页面</label>
|
||||
<div class="layui-input-inline" >
|
||||
<select name="default_page">
|
||||
<option value="0" selected="">默认用户主页</option>
|
||||
<option value="1" >登录用户主页</option>
|
||||
<option value="2" >引导页面</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">直接访问域名不带任何参数时显示的页面</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">默认分组</label>
|
||||
<div class="layui-input-inline">
|
||||
|
||||
@@ -54,7 +54,7 @@ layui.use(['table','layer','form'], function () {
|
||||
var form = layui.form;
|
||||
var table = layui.table;
|
||||
var layer = layui.layer;
|
||||
var limit = localStorage.getItem(u + "_limit")??50;
|
||||
var limit = localStorage.getItem(u + "_limit") || 50;
|
||||
var api = get_api('read_user_list','list');
|
||||
var IDs = [];
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
layui.use(['form','table','laydate','tableSelect'], function () {
|
||||
var $ = layui.jquery,table = layui.table,form = layui.form,laydate = layui.laydate,tableSelect = layui.tableSelect;
|
||||
var api = get_api('read_share','share_list');
|
||||
var limit = localStorage.getItem(u + "_limit")??50;
|
||||
var limit = localStorage.getItem(u + "_limit") || 50;
|
||||
var index,temp_date,type='category';
|
||||
var isSupported = ClipboardJS.isSupported();
|
||||
var baseUrl = Get_baseUrl();
|
||||
|
||||
84
templates/admin/page/theme_guide.php
Normal file
84
templates/admin/page/theme_guide.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php $title='引导页模板';$awesome=true; require 'header.php'; if($USER_DB['UserGroup'] != 'root'){$content='您没有权限访问此页面'; require(DIR.'/templates/admin/page/404.php');exit;}?>
|
||||
<style type="text/css">
|
||||
.screenshot{
|
||||
width: 99%;
|
||||
height: 99%;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
aspect-ratio:16/9;
|
||||
}
|
||||
#default #del {display: none;}
|
||||
</style>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<blockquote class="layui-elem-quote layuimini-form" style="margin-top: 0px;border-left: 5px solid <?php echo $cache?"#1e9fff":($global_config['offline']?"":"#639d11") ?>;padding: 6px;">
|
||||
<span class="layui-breadcrumb" lay-separator="|">
|
||||
<a href="./index.php?c=admin&page=theme_guide&cache=no&u=<?php echo U;?>" >刷新数据</a>
|
||||
</span>
|
||||
</blockquote>
|
||||
<div class="layui-bg-gray" style="padding: 1px;" >
|
||||
<div class="layui-row layui-col-space15">
|
||||
<?php
|
||||
$Space = ' ';//占位符,强迫症想让输出的源码好看点而已...
|
||||
foreach ($themes as $key => $theme) {
|
||||
$online = !empty($theme['info']['md5']); //在线主题!
|
||||
if($global_templates['guide'] == $key){
|
||||
$icon ='<i class="fa fa-magic" style="color: #03a9f4;" title = "正在使用"></i> ';
|
||||
}else{
|
||||
$icon ='';
|
||||
}
|
||||
$color = ($global_templates['guide'] == $key ?"color: #03a9f4;":"");
|
||||
?>
|
||||
<!--主题卡片-->
|
||||
<div class="layui-col-xs layui-col-sm4 layui-col-md3 ">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<div style="float:left; cursor:pointer;<?php echo $color; ?>" title="<?php echo $key; ?>"><?php echo $icon.$theme['info']['name']; ?></div>
|
||||
<div style="float:right;cursor:pointer;" title="<?php echo $theme['info']['update']; ?>"><?php echo $theme['info']['version']; ?></div>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="img-list"><img class="screenshot" layer-src="<?php echo $theme['info']['screenshot']; ?>" data-original="<?php echo $theme['info']['screenshot']; ?>"></div>
|
||||
</div>
|
||||
<div class="layui-card-header" style="height: 1px;"></div>
|
||||
<div class="layui-card-header" style="height: auto;" id="guide">
|
||||
<div class="layui-btn-group" id="<?php echo $key;?>">
|
||||
<?php
|
||||
if($online){ //如果是在线主题则显示下载
|
||||
echo $Space.'<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" id="dw">下载</button>'."\n";
|
||||
}elseif($theme['info']['up'] == 1){ //如果有更新则同时显示下载和使用
|
||||
echo $Space.'<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" id="up">更新</button>'."\n";
|
||||
echo $Space.'<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" id="set">使用</button>'."\n";
|
||||
}else{ //其他情况仅显示使用
|
||||
echo $Space.'<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" id="set">使用</button>'."\n";
|
||||
}
|
||||
echo $Space.'<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" id="detail">详情</button>'."\n";
|
||||
if(!$online){ //本地主题显示预览
|
||||
//echo $Space.'<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" id="preview">预览</button>'."\n";
|
||||
}
|
||||
if($theme['info']['config'] == '1'){ //支持配置的主题显示配置
|
||||
echo $Space.'<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" id="config">配置</button>'."\n";
|
||||
}
|
||||
if($USER_DB['UserGroup'] === 'root' && !$online){ //管理员&本地主题>显示删除
|
||||
echo $Space.'<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" id="del">删除</button>'."\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--主题卡片End-->
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src = "<?php echo $libs;?>/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src = "<?php echo $libs;?>/jquery/jquery.lazyload.min.js"></script>
|
||||
<script src = "./templates/admin/js/public.js?v=<?php echo $Ver;?>"></script>
|
||||
<?php load_static('js');?>
|
||||
<script>var datas = <?php echo json_encode($themes)?>;</script>
|
||||
<script src = "./templates/admin/js/theme.js?v=<?php echo $Ver;?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,7 +18,7 @@
|
||||
<a href="javascript:;" layuimini-content-href="theme_login" data-title="登录模板">登录模板</a>
|
||||
<a href="javascript:;" layuimini-content-href="theme_transit" data-title="过渡模板">过渡模板</a>
|
||||
<?php if($USER_DB['UserGroup'] === 'root'){echo '<a href="javascript:;" layuimini-content-href="theme_register" data-title="注册模板">注册模板</a>';} ?>
|
||||
|
||||
<?php if($USER_DB['UserGroup'] === 'root'){echo '<a href="javascript:;" layuimini-content-href="theme_guide" data-title="引导页模板">引导页模板</a>';} ?>
|
||||
</span>
|
||||
</blockquote>
|
||||
<div class="layui-bg-gray" style="padding: 1px;" >
|
||||
|
||||
@@ -2,6 +2,24 @@
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main" style=" margin-left: 20px;">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h4 class="layui-timeline-title">v2.0.16-20230425</h4>
|
||||
<ul>
|
||||
<li>[优化] 调整部分代码,使其能够兼容一些老旧的浏览器(如2345加速浏览器,都2023年了居然还在用2018年的内核)</li>
|
||||
<li>[优化] 调整书签导出临时数据的存放路径为自身的temp,避免部分环境无法在/tmp写入数据造成导出异常</li>
|
||||
<li>[优化] 默认过渡页</li>
|
||||
<li>[优化] 默认登录模板(注册码注册时显示注册入口)</li>
|
||||
<li>[新增] 主题商城新增引导页模板</li>
|
||||
<li>[新增] 网站管理>系统设置>默认页面 (公开使用可以选择引导页面)</li>
|
||||
<li>[修复] 站点设置>设为默认主页关闭浏览器后失效的问题</li>
|
||||
<li>[修复] 站点设置在表单输入按回车弹出帮助页面的问题</li>
|
||||
<li>[修复] 用户组主题设置权限问题</li>
|
||||
<li>[修复] 其他已知问题</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
|
||||
Reference in New Issue
Block a user