mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
1. 更新启动脚本
2. 优化更新界面 3. 优化项目结构 4. 添加站点图标
This commit is contained in:
@@ -3,7 +3,6 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import markdown
|
|
||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
@@ -127,10 +126,10 @@ def do_update(request):
|
|||||||
|
|
||||||
|
|
||||||
def restart_container(request):
|
def restart_container(request):
|
||||||
scraper = pt_spider.get_scraper()
|
# scraper = pt_spider.get_scraper()
|
||||||
res = scraper.get('https://gitee.com/ngfchl/ptools/raw/master/update.md')
|
# res = scraper.get('https://gitee.com/ngfchl/ptools/raw/master/update.md')
|
||||||
update_notes = markdown.markdown(res.text, extensions=['tables'])
|
# update_notes = markdown.markdown(res.text, extensions=['tables'])
|
||||||
# print(update_notes)
|
# print(update_notes)
|
||||||
return render(request, 'auto_pt/restart.html', context={
|
return render(request, 'auto_pt/restart.html',
|
||||||
'update_notes': update_notes
|
# context={'update_notes': update_notes}
|
||||||
})
|
)
|
||||||
|
|||||||
BIN
static/abav6-1e67y-001.ico
Normal file
BIN
static/abav6-1e67y-001.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
BIN
static/favicon.ico
Normal file
BIN
static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -5,6 +5,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>{% block title %}PT一下,你就知道{% endblock %}</title>
|
<title>{% block title %}PT一下,你就知道{% endblock %}</title>
|
||||||
{% include 'admin/includes/css-part.html' %}
|
{% include 'admin/includes/css-part.html' %}
|
||||||
|
<link rel="stylesheet" href="{% static 'favicon.ico' %}">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/base.css' %}?_=2.7">
|
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/base.css' %}?_=2.7">
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/simpleui-x/css/base.css' %}?_=2.7">
|
<link rel="stylesheet" type="text/css" href="{% static 'admin/simpleui-x/css/base.css' %}?_=2.7">
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
|
<link rel="stylesheet" href="{% static 'favicon.ico' %}">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
|
||||||
{% block title %}
|
{% block title %}
|
||||||
@@ -116,14 +117,14 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<!-- menu -->
|
<!-- menu -->
|
||||||
<transition name="el-zoom-in-center">
|
<transition name="el-zoom-in-center">
|
||||||
<multiple-menu
|
<multiple-menu
|
||||||
:menus="menus"
|
:menus="menus"
|
||||||
:menu-active="menuActive"
|
:menu-active="menuActive"
|
||||||
:fold="fold"
|
:fold="fold"
|
||||||
></multiple-menu>
|
></multiple-menu>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
</el-aside>
|
</el-aside>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>更新日志</span>
|
<span>更新日志</span>
|
||||||
<span style="float: right;margin-top: -10px">
|
<span style="float: right;margin-top: -10px">
|
||||||
<el-button type="success" @click="do_update">拉取更新</el-button>
|
<el-button type="success" @click="do_update">更新</el-button>
|
||||||
<el-button type="danger" @click="do_restart">重启</el-button>
|
<el-button type="danger" @click="do_restart">重启</el-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,9 +21,6 @@
|
|||||||
{# {{ update_notes|safe }}#}
|
{# {{ update_notes|safe }}#}
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
{# href='javascript:(confirm("确定重启?"))?location="/tasks/restart":location="/"'#}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="{% static 'admin/simpleui-x/js/vue.min.js' %}"></script>
|
<script src="{% static 'admin/simpleui-x/js/vue.min.js' %}"></script>
|
||||||
@@ -39,9 +36,6 @@
|
|||||||
data: {
|
data: {
|
||||||
update_note: ['请先拉取更新哦']
|
update_note: ['请先拉取更新哦']
|
||||||
},
|
},
|
||||||
created: function () {
|
|
||||||
{#this.data.update_note = converter.makeHtml({{ update_notes }});#}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
do_restart() {
|
do_restart() {
|
||||||
this.$confirm('此操作将重启容器,并更新软件, 是否继续?', '提示', {
|
this.$confirm('此操作将重启容器,并更新软件, 是否继续?', '提示', {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
# M-Team 规则修改
|
# M-Team 规则修改
|
||||||
1. 由于页面链接填写错误,导致做种体积统计未0,修改站点信息->主要页面->当前下载信息:/发布种子信息:/当前做种信息:/完成种子信息:四项页面的链接地址
|
|
||||||
将四个条目中页面地址中的`getusertorrentlistajax`替换为`getusertorrentlist`
|
1. 由于页面链接填写错误,导致做种体积统计未0,修改站点信息->主要页面->当前下载信息:/发布种子信息:/当前做种信息:/完成种子信息:四项页面的链接地址 将四个条目中页面地址中的`getusertorrentlistajax`
|
||||||
|
替换为`getusertorrentlist`
|
||||||
Reference in New Issue
Block a user