页面显示当前版本号与更新时间

This commit is contained in:
ngfchl
2022-10-15 22:28:52 +08:00
parent 578e0a9c8b
commit ade20b75ad
2 changed files with 10 additions and 4 deletions

View File

@@ -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'))
})

View File

@@ -44,12 +44,15 @@
width="300"
trigger="hover"
content="如果遇到无法更新的情况,您可以选择重建容器或者进入容器命令行到项目根目录执行`git pull`命令!">
<el-link slot="reference"
type="success">{{ update_tips }}
<span v-if="{{ restart }}"> + 容器已运行:{{ delta }}</span>
<el-link slot="reference" type="success">
<span v-if="{{ restart }}">容器已运行:{{ delta }}</span>
<span v-text="time"></span>
</el-link>
</el-popover>
<el-tag type="success" style="float: right;"
effect="plain">
<span v-text="branch"></span>
</el-tag>
</div>
<div class="text item">
<el-card class="box-card" shadow="hover" v-if="show">
@@ -153,6 +156,7 @@
cid: "{{ cid }}",
time: '',
show: false,
branch: "{{ branch }}"
},
created() {
if (this.update) {