feat: 版本号链接到github的release页面,方便查看版本更新日志

This commit is contained in:
涵曦 2024-06-30 10:16:58 +00:00
parent 23d321a722
commit ab447a4633
4 changed files with 12 additions and 4 deletions

View File

@ -23,7 +23,7 @@ $(function(){
// 拉取版本 // 拉取版本
$.get("/getversion", function(data, status) { $.get("/getversion", function(data, status) {
console.log(data, status, data["version"]); console.log(data, status, data["version"]);
$("#version").text(`(${data.version})`); $("#version").text(`${data.version}`);
}); });
// 拉取播放列表 // 拉取播放列表

View File

@ -8,7 +8,11 @@
<link rel="stylesheet" type="text/css" href="/static/style.css"> <link rel="stylesheet" type="text/css" href="/static/style.css">
</head> </head>
<body> <body>
<h2>小爱音箱操控面板<span id="version">(版本未知)</span></h2> <h2>小爱音箱操控面板
(<a id="version" href="https://github.com/hanxi/xiaomusic/releases">
版本未知
</a>)
</h2>
<hr> <hr>
<div id="cmds"> <div id="cmds">
</div> </div>

View File

@ -8,7 +8,11 @@
<link rel="stylesheet" type="text/css" href="/static/style.css"> <link rel="stylesheet" type="text/css" href="/static/style.css">
</head> </head>
<body> <body>
<h2>小爱音箱设置面板<span id="version">(版本未知)</span></h2> <h2>小爱音箱设置面板
(<a id="version" href="https://github.com/hanxi/xiaomusic/releases">
版本未知
</a>)
</h2>
<hr> <hr>
<div class="rows"> <div class="rows">
<label for="mi_did">MI_DID:</label> <label for="mi_did">MI_DID:</label>

View File

@ -2,7 +2,7 @@ $(function(){
// 拉取版本 // 拉取版本
$.get("/getversion", function(data, status) { $.get("/getversion", function(data, status) {
console.log(data, status, data["version"]); console.log(data, status, data["version"]);
$("#version").text(`(${data.version})`); $("#version").text(`${data.version}`);
}); });
const updateSelectOptions = (selectId, optionsList, selectedOption) => { const updateSelectOptions = (selectId, optionsList, selectedOption) => {