From 619f10766f8282dd2567c1b61d0653ef5b6ebafb Mon Sep 17 00:00:00 2001 From: Cp0204 Date: Wed, 28 Feb 2024 17:16:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E5=BA=95=E6=A0=8F=EF=BC=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/run.py | 3 ++- app/templates/index.html | 32 +++++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/app/run.py b/app/run.py index 9391da8..56db54e 100644 --- a/app/run.py +++ b/app/run.py @@ -19,6 +19,7 @@ config_path = os.environ.get("CONFIG_PATH", "./config/quark_config.json") app = Flask(__name__) +app.config["APP_VERSION"] = "0.2.1" app.secret_key = "ca943f6db6dd34823d36ab08d8d6f65d" app.json.ensure_ascii = False app.json.sort_keys = False @@ -94,7 +95,7 @@ def logout(): def index(): if not is_login(): return redirect(url_for("login")) - return render_template("index.html") + return render_template("index.html", version=app.config["APP_VERSION"]) # 获取配置数据 diff --git a/app/templates/index.html b/app/templates/index.html index e24e31d..28d8ba5 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -7,6 +7,21 @@ 夸克自动转存 + @@ -125,12 +140,15 @@

任务#

-

- - 退出 +
+ + 退出 +
- @Cp0204/quark_auto_save +

+ @Cp0204/quark_auto_save v{{ version }} +

@@ -192,7 +210,7 @@

任务#

}, removeCookie(index) { if (confirm("确认删除吗?")) - this.formData.cookie.splice(index, 1); + this.formData.cookie.splice(index, 1); }, addPush() { key = prompt("增加的键名", ""); @@ -201,7 +219,7 @@

任务#

}, removePush(key) { if (confirm("确认删除吗?")) - this.$delete(this.formData.push_config, key); + this.$delete(this.formData.push_config, key); }, addTask() { this.formData.tasklist.push({ @@ -216,7 +234,7 @@

任务#

}, removeTask(index) { if (confirm("确认删除吗?")) - this.formData.tasklist.splice(index, 1); + this.formData.tasklist.splice(index, 1); }, clearShareurlBan(task) { delete task.shareurl_ban;