添加当前软件版本所对应的代码提交版本、提交时间的显示
This commit is contained in:
@@ -560,6 +560,8 @@
|
||||
"setting__sync_tip": "For how to use it, please see the \"Sync function\" section of the FAQ",
|
||||
"setting__update": "Update",
|
||||
"setting__update_checking": "Checking for updates...",
|
||||
"setting__update_commit_date": "Submission date:",
|
||||
"setting__update_commit_id": "Code version:",
|
||||
"setting__update_current_label": "Current version: ",
|
||||
"setting__update_downloading": "Update is found and being downloaded...⏳",
|
||||
"setting__update_init": "Processing update...",
|
||||
|
||||
@@ -560,6 +560,8 @@
|
||||
"setting__sync_tip": "使用方式请看常见问题“同步功能”部分",
|
||||
"setting__update": "软件更新",
|
||||
"setting__update_checking": "检查更新中...",
|
||||
"setting__update_commit_date": "提交日期:",
|
||||
"setting__update_commit_id": "代码版本:",
|
||||
"setting__update_current_label": "当前版本:",
|
||||
"setting__update_downloading": "发现新版本并在努力下载中,请稍后...⏳",
|
||||
"setting__update_init": "处理更新中...",
|
||||
|
||||
@@ -560,6 +560,8 @@
|
||||
"setting__sync_tip": "使用方式請看常見問題「同步功能」部分",
|
||||
"setting__update": "軟體更新",
|
||||
"setting__update_checking": "檢查更新中...",
|
||||
"setting__update_commit_date": "提交日期:",
|
||||
"setting__update_commit_id": "程式碼版本:",
|
||||
"setting__update_current_label": "目前版本:",
|
||||
"setting__update_downloading": "發現新版本並在努力下載中,請稍後...⏳",
|
||||
"setting__update_init": "處理更新中...",
|
||||
|
||||
Vendored
+4
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-var */
|
||||
import { type AppEventTypes, type KeyEventTypes } from '@renderer/event'
|
||||
import { type MainTypes, type DownloadTypes } from '@renderer/worker/utils'
|
||||
import { type I18n } from '@renderer/plugins/i18n'
|
||||
@@ -93,6 +94,9 @@ declare global {
|
||||
lx_handled?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
var COMMIT_ID: string
|
||||
var COMMIT_DATE: string
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,9 +6,15 @@ dd
|
||||
.gap-top
|
||||
base-checkbox(id="setting__update_showChangeLog" :model-value="appSetting['common.showChangeLog']" :label="$t('setting__update_show_change_log')" @update:model-value="updateSetting({'common.showChangeLog': $event})")
|
||||
.gap-top
|
||||
.p.small
|
||||
.gap-top
|
||||
.p.small(@click="handleOpenDevTools") {{ $t('setting__update_current_label') }}{{ versionInfo.version }}
|
||||
.p.small(v-if="commit_id")
|
||||
| {{ $t('setting__update_commit_id') }}
|
||||
span.select {{ commit_id }}
|
||||
.p.small(v-if="commit_date") {{ $t('setting__update_commit_date') }}{{ commit_date }}
|
||||
|
||||
.p.small.gap-top
|
||||
| {{ $t('setting__update_latest_label') }}{{ versionInfo.newVersion && versionInfo.newVersion.version != '0.0.0' ? versionInfo.newVersion.version : $t('setting__update_unknown') }}
|
||||
.p.small(@click="handleOpenDevTools") {{ $t('setting__update_current_label') }}{{ versionInfo.version }}
|
||||
.p.small(v-if="downloadProgress" style="line-height: 1.5;")
|
||||
| {{ $t('setting__update_downloading') }}
|
||||
br
|
||||
@@ -28,7 +34,7 @@ dd
|
||||
<script>
|
||||
import { computed } from '@common/utils/vueTools'
|
||||
import { versionInfo } from '@renderer/store'
|
||||
import { sizeFormate } from '@common/utils/common'
|
||||
import { dateFormat, sizeFormate } from '@common/utils/common'
|
||||
// import { openDirInExplorer, selectDir } from '@renderer/utils'
|
||||
import { openDevTools } from '@renderer/utils/ipc'
|
||||
import { useI18n } from '@renderer/plugins/i18n'
|
||||
@@ -39,6 +45,8 @@ export default {
|
||||
setup() {
|
||||
let lastClickTime = 0
|
||||
let clickNum = 0
|
||||
const commit_id = COMMIT_ID
|
||||
const commit_date = dateFormat(COMMIT_DATE)
|
||||
|
||||
const t = useI18n()
|
||||
|
||||
@@ -75,6 +83,8 @@ export default {
|
||||
showUpdateModal,
|
||||
appSetting,
|
||||
updateSetting,
|
||||
commit_id,
|
||||
commit_date,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user