Browse Source

0.9.34

pull/180/head
xiaoz 11 months ago
parent
commit
7c95405e86
  1. 1
      templates/admin/add_link.php
  2. 43
      templates/admin/index.php
  3. 13
      templates/admin/link_list.php
  4. 4
      templates/admin/setting/subscribe.php
  5. 29
      templates/admin/setting/theme.php
  6. 14
      templates/admin/static/style.css

1
templates/admin/add_link.php

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
<div class="setting-msg">
<p>1. 权重越大,排序越靠前</p>
<p>2. 识别功能可以自动获取链接标题和描述信息,但不确保一定成功</p>
<p>3. 仅 5iux/heimdall/tushan2/webstack 支持自定义图标,其余主题均自动获取链接图标。</p>
</div>
</div>
<!-- 说明提示框END -->

43
templates/admin/index.php

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
<span id = "update_msg" style = "display:none;"><a style = "color: #FF5722;" href = "https://github.com/helloxz/onenav/releases" title = "下载最新版OneNav" target = "_blank" id="current_version">有可用更新</a></span>
</p>
</div>
</div>
</div>
<div class="layui-col-lg3">
<div class = "admin-msg">
@ -28,6 +28,33 @@ @@ -28,6 +28,33 @@
</div>
</div>
<div class="layui-col-lg3">
<div class = "admin-msg">
<h2>分类数量</h2>
<p class="text">
<a href="/index.php?c=admin&page=category_list"><span id="cat_num"></span></a>
</p>
</div>
</div>
<div class="layui-col-lg3">
<div class = "admin-msg">
<h2>链接数量</h2>
<p class="text">
<a href="/index.php?c=admin&page=link_list"><span id="link_num"></span></a>
</p>
</div>
</div>
<div class="layui-col-lg3">
<div class = "admin-msg">
<h2>PHP版本</h2>
<p class="text">
<span id="php_version"></span>
</p>
</div>
</div>
<div class="layui-col-lg3">
<div class = "admin-msg">
<h2>交流群</h2>
@ -108,4 +135,18 @@ @@ -108,4 +135,18 @@
check_weak_password();
get_sql_update_list();
get_latest_version();
app_info();
// 获取app_info
function app_info(){
//alert("dsdfd");
let api_url = "/index.php?c=api&method=app_info";
console.log(api_url);
$.get(api_url,function(data,status){
data = data.data;
$("#php_version").html(data.php_version);
$("#cat_num").html(data.cat_num);
$("#link_num").html(data.link_num);
});
}
</script>

13
templates/admin/link_list.php

@ -4,6 +4,19 @@ @@ -4,6 +4,19 @@
<div class="layui-body">
<!-- 内容主体区域 -->
<div class="layui-row content-body place-holder">
<!-- 说明提示框 -->
<div class="layui-col-lg12">
<div class="page-msg">
<ol>
<li>仅 5iux/heimdall/tushan2/webstack 支持自定义图标,其余主题均自动获取链接图标。</li>
<li>分类的私有属性优先级高于链接的私有属性</li>
<li>权重数字越大,排序越靠前</li>
</ol>
</div>
</div>
<!-- 说明提示框END -->
<!-- 表单上面的按钮 -->
<div class="lay-col-lg12">
<form class="layui-form layui-form-pane" action="">

4
templates/admin/setting/subscribe.php

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
<li>您可以前往:<a href="https://dwz.ovh/69h9q" rel = "nofollow" target = "_blank" title = "购买订阅服务">https://dwz.ovh/69h9q</a> 购买订阅服务,订阅后可以:</li>
<li>1. 享受一键更新OneNav</li>
<li>2. 可在线下载和更新主题</li>
<li>3. 可享受一对一售后服务(仅限高级版和商业版)</li>
<li>3. 可享受一对一售后服务</li>
<li>4. 可帮助OneNav持续发展,让OneNav变得更加美好</li>
<li>5. 更多高级功能(自定义版权、广告管理等)</li>
<li>6. 数据库备份</li>
@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
</div>
<div class="setting-msg">
<p>1. 系统检测到您的域名为<strong style="color:#31BDEC;"><code><?php echo get_host(); ?></code></strong>,购买订阅时请填写此域名!</p>
<p>2. 若域名填写错误或更换域名,请前往<a title = "修改OneNav订阅域名" href="https://www.onenav.top/msub.html" target="_blank">https://www.onenav.top/msub.html</a>修改订阅!</p>
<p>2. 若域名填写错误或更换域名,请前往 <a title = "修改OneNav订阅域名" href="https://dwz.ovh/p6u2w" target="_blank">https://dwz.ovh/p6u2w</a> 修改订阅!</p>
<!-- <p>3. Docker用户或IP访问的用户,请参考<a href="https://dwz.ovh/cve3d" target="_blank">没有域名购买订阅</a></p> -->
</div>
</div>

29
templates/admin/setting/theme.php

@ -24,11 +24,20 @@ @@ -24,11 +24,20 @@
?>
<div class="layui-col-md3">
<div class="layui-card custom-card">
<div class="layui-card-header">
<?php echo $key; ?> - <?php echo $theme['info']->version ?>
<?php if( $current_them == $key ) { ?>
<span style = "color:#ff5722;">(使用中)</span>
<?php } ?>
<div class="layui-card-header" id="<?php echo $key; ?>">
<div class="them-header">
<div class="left">
<span class = "name"><?php echo $key; ?> - <?php echo $theme['info']->version ?></span>
<?php if( $current_them == $key ) { ?>
<span style = "color:#ff5722;">(使用中)</span>
<?php } ?>
</div>
<div class="right">
<span class="renewable" style="color:#FF5722;font-size:14px;"></span>
</div>
</div>
</div>
<div class="layui-card-body">
<!-- 主题图片 -->
@ -214,25 +223,29 @@ function update_theme(name,version){ @@ -214,25 +223,29 @@ function update_theme(name,version){
//遍历所有主题,检查是否有更新
function check_update(){
console.log('fdsfsdf');
//请求远程主题列表
$.get("https://onenav.xiaoz.top/v1/theme_list.php",function(data,status){
let result = data.data;
console.log(result);
//console.log(result.5iux);
for (const obj in result) {
//获取主题名称
let value = $("#" + obj).text();
let select = `#${obj} .name`;
let value = $(select).text();
//如果获取到的数据为空
if( value == '' ) {
continue;
}
//console.log(obj);
//获取最新版本
let latest_version = result[obj].version;
//获取当前版本
let current_version = value.split(' - ')[1];
//如果存在最新版本
if( latest_version > current_version ) {
console.log("#" + obj + ".renewable");
console.log("#" + obj + " .renewable");
$("#" + obj + " .renewable").append(`(可更新至${latest_version})`);
}
}

14
templates/admin/static/style.css

@ -207,4 +207,18 @@ @@ -207,4 +207,18 @@
.upload-backup{
margin-top: 16px;
}
.them-header{
}
.them-header .left{
width: 50%;
float:left;
text-align: left;
}
.them-header .right{
width: 50%;
text-align: right;
float:right;
}
Loading…
Cancel
Save