mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-16 01:10:44 +08:00
细节修复优化
This commit is contained in:
parent
91a5a57752
commit
fbd1d5c1e6
@ -25,12 +25,12 @@ script_path = os.environ.get("SCRIPT_PATH", "./quark_auto_save.py")
|
|||||||
config_path = os.environ.get("CONFIG_PATH", "./config/quark_config.json")
|
config_path = os.environ.get("CONFIG_PATH", "./config/quark_config.json")
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config["APP_VERSION"] = "0.2.5"
|
app.config["APP_VERSION"] = "0.2.5.1"
|
||||||
app.secret_key = "ca943f6db6dd34823d36ab08d8d6f65d"
|
app.secret_key = "ca943f6db6dd34823d36ab08d8d6f65d"
|
||||||
app.json.ensure_ascii = False
|
app.json.ensure_ascii = False
|
||||||
app.json.sort_keys = False
|
app.json.sort_keys = False
|
||||||
app.jinja_env.variable_start_string = '[['
|
app.jinja_env.variable_start_string = "[["
|
||||||
app.jinja_env.variable_end_string = ']]'
|
app.jinja_env.variable_end_string = "]]"
|
||||||
|
|
||||||
|
|
||||||
def gen_md5(string):
|
def gen_md5(string):
|
||||||
@ -177,6 +177,7 @@ def reload_tasks():
|
|||||||
else:
|
else:
|
||||||
print(">>> no crontab")
|
print(">>> no crontab")
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
# 检查配置文件是否存在
|
# 检查配置文件是否存在
|
||||||
if not os.path.exists(config_path):
|
if not os.path.exists(config_path):
|
||||||
|
|||||||
2018
app/static/css/bootstrap-icons.css
vendored
Normal file
2018
app/static/css/bootstrap-icons.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/static/css/fonts/bootstrap-icons.woff2
Normal file
BIN
app/static/css/fonts/bootstrap-icons.woff2
Normal file
Binary file not shown.
@ -7,6 +7,7 @@
|
|||||||
<title>夸克自动转存</title>
|
<title>夸克自动转存</title>
|
||||||
<!-- 引入 Bootstrap CSS -->
|
<!-- 引入 Bootstrap CSS -->
|
||||||
<link rel="stylesheet" href="./static/css/bootstrap.min.css">
|
<link rel="stylesheet" href="./static/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/bootstrap-icons.css">
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
padding-bottom: 60px;
|
padding-bottom: 60px;
|
||||||
@ -21,6 +22,10 @@
|
|||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@ -29,7 +34,7 @@
|
|||||||
<h1 class="mb-4">夸克自动转存配置</h1>
|
<h1 class="mb-4">夸克自动转存配置</h1>
|
||||||
<form @submit.prevent="saveConfig">
|
<form @submit.prevent="saveConfig">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row title">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h2>Cookie</h2>
|
<h2>Cookie</h2>
|
||||||
</div>
|
</div>
|
||||||
@ -45,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row title">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h2>通知</h2>
|
<h2>通知</h2>
|
||||||
</div>
|
</div>
|
||||||
@ -63,7 +68,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Emby</h2>
|
<div class="row title">
|
||||||
|
<div class="col">
|
||||||
|
<h2>Emby</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">Emby URL</label>
|
<label class="col-sm-2 col-form-label">Emby URL</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
@ -77,7 +86,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>定时规则</h2>
|
<div class="row title">
|
||||||
|
<div class="col">
|
||||||
|
<h2>定时规则</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">Crontab<span class="badge badge-pill badge-light"><a target="_blank" href="https://tool.lu/crontab/">?</a></span></label>
|
<label class="col-sm-2 col-form-label">Crontab<span class="badge badge-pill badge-light"><a target="_blank" href="https://tool.lu/crontab/">?</a></span></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
@ -85,8 +98,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>任务列表</h2>
|
<div class="row title">
|
||||||
|
<div class="col">
|
||||||
|
<h2>任务列表</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div v-for="(task, index) in formData.tasklist" :key="index" class="task mb-3">
|
<div v-for="(task, index) in formData.tasklist" :key="index" class="task mb-3">
|
||||||
|
<hr>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h3>任务#<span v-html="index+1"></span></h3>
|
<h3>任务#<span v-html="index+1"></span></h3>
|
||||||
@ -148,18 +166,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-primary" @click="addTask()">增加任务</button>
|
<div class="row">
|
||||||
|
<div class="col-sm-12 text-center">
|
||||||
|
<button type="button" class="btn btn-primary" @click="addTask()"><i class="bi bi-plus"></i> 增加任务</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 text-center">
|
||||||
|
<p>
|
||||||
|
<a target="_blank" href="https://github.com/Cp0204/quark-auto-save">@Cp0204/quark_auto_save</a> v[[ version ]]
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="bottom-buttons">
|
<div class="bottom-buttons">
|
||||||
<input type="submit" class="btn btn-success" value="保存">
|
<button class="btn btn-success"><i class="bi bi-save"></i> 保存</button>
|
||||||
<a class="btn btn-primary" @click="runScriptNow">运行</a>
|
<a class="btn btn-primary" @click="runScriptNow"><i class="bi bi-play-fill"></i> 运行</a>
|
||||||
<a class="btn btn-danger" href="/logout">退出</a>
|
<a class="btn btn-danger" href="/logout"><i class="bi bi-box-arrow-right"></i> 退出</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="text-center">
|
|
||||||
<p>
|
|
||||||
<a target="_blank" href="https://github.com/Cp0204/quark-auto-save">@Cp0204/quark_auto_save</a> v[[ version ]]
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 模态框 -->
|
<!-- 模态框 -->
|
||||||
<div class="modal" tabindex="-1" id="logModal">
|
<div class="modal" tabindex="-1" id="logModal">
|
||||||
@ -291,7 +316,7 @@
|
|||||||
},
|
},
|
||||||
runScriptNow() {
|
runScriptNow() {
|
||||||
$('#logModal').modal('toggle')
|
$('#logModal').modal('toggle')
|
||||||
this.run_log = "请耐心等待脚本全部执行完毕..."
|
this.run_log = '<div class="spinner-border" role="status"></div> 请耐心等待脚本全部执行完毕...'
|
||||||
axios.post('/run_script_now')
|
axios.post('/run_script_now')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.run_log = response.data;
|
this.run_log = response.data;
|
||||||
|
|||||||
@ -1,19 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>登录</title>
|
<title>登录</title>
|
||||||
<!-- 引入 Bootstrap CSS -->
|
<!-- 引入 Bootstrap CSS -->
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
<link rel="stylesheet" href="./static/css/bootstrap.min.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container mt-5">
|
<div class="container mt-5">
|
||||||
<h1 class="mb-4">登录</h1>
|
<h1 class="mb-4">登录</h1>
|
||||||
{% if message %}
|
{% if message %}
|
||||||
<div class="alert alert-danger" role="alert">
|
<div class="alert alert-danger" role="alert">
|
||||||
{{ message }}
|
[[ message ]]
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form action="/login" method="POST">
|
<form action="/login" method="POST">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -28,4 +30,5 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue
Block a user