老板要求:检查更新左侧加入当前版本的版本号。
· index.html:在 UTF-8 和「检查更新」之间加 <span id="st-ver">,
静态值只是兜底(无 JS / Electron 版时的显示)
· main.rs:新增 app_version 命令,直接读 AppHandle 的 package_info,
不联网、不读配置文件 —— 保证显示的版本和程序本体一致
· tauri-bridge.js:启动时 invoke('app_version') 覆盖静态值
状态栏现在是:
0 字 | 0 字符 | 第 1 行, 第 1 列 | UTF-8 | v2.6.5 | 检查更新
官网截图同步重出(旧图的状态栏没有版本号),四张合计 548KB。
已构建发布 2.6.5:xymd_2.6.5.exe + .sig,签名实验通过。
84 lines
1.9 KiB
JSON
84 lines
1.9 KiB
JSON
{
|
|
"$schema": "https://schema.tauri.app/config/2",
|
|
"productName": "XiaoyinMarkdown",
|
|
"version": "2.6.5",
|
|
"identifier": "com.xiaoyin.markdown",
|
|
"build": {
|
|
"frontendDist": "../src/renderer"
|
|
},
|
|
"app": {
|
|
"withGlobalTauri": true,
|
|
"windows": [
|
|
{
|
|
"label": "main",
|
|
"title": "未命名 — 小银 Markdown",
|
|
"width": 1380,
|
|
"height": 880,
|
|
"minWidth": 860,
|
|
"minHeight": 520,
|
|
"dragDropEnabled": true
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": null
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": [
|
|
"nsis"
|
|
],
|
|
"icon": [
|
|
"icons/icon.ico"
|
|
],
|
|
"fileAssociations": [
|
|
{
|
|
"ext": [
|
|
"md",
|
|
"markdown",
|
|
"mdown",
|
|
"mkd",
|
|
"mdwn"
|
|
],
|
|
"name": "XiaoyinMarkdown.Document",
|
|
"description": "Markdown 文档 — 小银 Markdown",
|
|
"role": "Editor"
|
|
},
|
|
{
|
|
"ext": [
|
|
"txt"
|
|
],
|
|
"name": "XiaoyinMarkdown.Text",
|
|
"description": "文本文档 — 小银 Markdown",
|
|
"role": "Editor"
|
|
}
|
|
],
|
|
"windows": {
|
|
"webviewInstallMode": {
|
|
"type": "downloadBootstrapper"
|
|
},
|
|
"nsis": {
|
|
"installMode": "currentUser",
|
|
"languages": [
|
|
"SimpChinese"
|
|
],
|
|
"displayLanguageSelector": false,
|
|
"installerIcon": "icons/icon.ico",
|
|
"uninstallerIcon": "icons/icon.ico",
|
|
"installerHooks": "installer-hooks.nsh"
|
|
}
|
|
},
|
|
"createUpdaterArtifacts": true
|
|
},
|
|
"plugins": {
|
|
"updater": {
|
|
"endpoints": [
|
|
"https://md.wangjinding.com/update/latest.json"
|
|
],
|
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEVFMjMxQjcwNzlFMDhCNTgKUldSWWkrQjVjQnNqN3Ewazg0U1VTN2VHSmE5amRROEIzN2UrK2w4dlJ5R05rcGhTY0FuNUk3NUwK",
|
|
"windows": {
|
|
"installMode": "passive"
|
|
}
|
|
}
|
|
}
|
|
} |