mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-12 15:20:44 +08:00
固定底栏,显示版本号
This commit is contained in:
parent
ba09ae2f76
commit
619f10766f
@ -19,6 +19,7 @@ import os
|
|||||||
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.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
|
||||||
@ -94,7 +95,7 @@ def logout():
|
|||||||
def index():
|
def index():
|
||||||
if not is_login():
|
if not is_login():
|
||||||
return redirect(url_for("login"))
|
return redirect(url_for("login"))
|
||||||
return render_template("index.html")
|
return render_template("index.html", version=app.config["APP_VERSION"])
|
||||||
|
|
||||||
|
|
||||||
# 获取配置数据
|
# 获取配置数据
|
||||||
|
|||||||
@ -7,6 +7,21 @@
|
|||||||
<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">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
padding-bottom: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-buttons {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
padding: 10px 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -125,12 +140,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-primary" @click="addTask()">增加任务</button>
|
<button type="button" class="btn btn-primary" @click="addTask()">增加任务</button>
|
||||||
<br><br>
|
<div class="bottom-buttons">
|
||||||
<input type="submit" class="btn btn-success" value="保存">
|
<input type="submit" class="btn btn-success" value="保存">
|
||||||
<a class="btn btn-danger" href="/logout">退出</a>
|
<a class="btn btn-danger" href="/logout">退出</a>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<a href="https://github.com/Cp0204/quark_auto_save">@Cp0204/quark_auto_save</a>
|
<p>
|
||||||
|
<a target="_blank" href="https://github.com/Cp0204/quark-auto-save">@Cp0204/quark_auto_save</a> v{{ version }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -192,7 +210,7 @@
|
|||||||
},
|
},
|
||||||
removeCookie(index) {
|
removeCookie(index) {
|
||||||
if (confirm("确认删除吗?"))
|
if (confirm("确认删除吗?"))
|
||||||
this.formData.cookie.splice(index, 1);
|
this.formData.cookie.splice(index, 1);
|
||||||
},
|
},
|
||||||
addPush() {
|
addPush() {
|
||||||
key = prompt("增加的键名", "");
|
key = prompt("增加的键名", "");
|
||||||
@ -201,7 +219,7 @@
|
|||||||
},
|
},
|
||||||
removePush(key) {
|
removePush(key) {
|
||||||
if (confirm("确认删除吗?"))
|
if (confirm("确认删除吗?"))
|
||||||
this.$delete(this.formData.push_config, key);
|
this.$delete(this.formData.push_config, key);
|
||||||
},
|
},
|
||||||
addTask() {
|
addTask() {
|
||||||
this.formData.tasklist.push({
|
this.formData.tasklist.push({
|
||||||
@ -216,7 +234,7 @@
|
|||||||
},
|
},
|
||||||
removeTask(index) {
|
removeTask(index) {
|
||||||
if (confirm("确认删除吗?"))
|
if (confirm("确认删除吗?"))
|
||||||
this.formData.tasklist.splice(index, 1);
|
this.formData.tasklist.splice(index, 1);
|
||||||
},
|
},
|
||||||
clearShareurlBan(task) {
|
clearShareurlBan(task) {
|
||||||
delete task.shareurl_ban;
|
delete task.shareurl_ban;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user