From ade20b75ada33dc95e23480a09b9f793135c4fec Mon Sep 17 00:00:00 2001 From: ngfchl Date: Sat, 15 Oct 2022 22:28:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=89=88=E6=9C=AC=E5=8F=B7=E4=B8=8E=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_pt/views.py | 4 +++- templates/auto_pt/update.html | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/auto_pt/views.py b/auto_pt/views.py index 3e8a0e2..0487cc8 100644 --- a/auto_pt/views.py +++ b/auto_pt/views.py @@ -350,7 +350,9 @@ def update_page(request): 'local_logs': local_logs, 'update_notes': update_notes, 'update': update, - 'update_tips': update_tips + 'update_tips': update_tips, + 'branch': ('开发版:{},更新于{}' if branch == 'dev' else '稳定版:{},更新于{}').format( + local_logs[0].get('hexsha'), local_logs[0].get('date')) }) diff --git a/templates/auto_pt/update.html b/templates/auto_pt/update.html index f4863e2..8b2fc1e 100644 --- a/templates/auto_pt/update.html +++ b/templates/auto_pt/update.html @@ -44,12 +44,15 @@ width="300" trigger="hover" content="如果遇到无法更新的情况,您可以选择重建容器或者进入容器命令行到项目根目录执行`git pull`命令!"> - {{ update_tips }} - + 容器已运行:{{ delta }} + + 容器已运行:{{ delta }} + + +
@@ -153,6 +156,7 @@ cid: "{{ cid }}", time: '', show: false, + branch: "{{ branch }}" }, created() { if (this.update) {