+ 修改变更日志查询地址
This commit is contained in:
79
index.html
79
index.html
@@ -1,68 +1,59 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="zh-cmn-Hans">
|
<html lang="zh-cmn-Hans">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||||
<link rel="stylesheet" href="./statics/github.css">
|
<link rel="stylesheet" href="./statics/github.css" />
|
||||||
<link rel="stylesheet" href="./statics/theme.css">
|
<link rel="stylesheet" href="./statics/theme.css" />
|
||||||
<script src="./statics/modules/jquery.min.js"></script>
|
<script src="./statics/modules/jquery.min.js"></script>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { IO } from "./statics/modules/tools.js"
|
import { IO } from './statics/modules/tools.js'
|
||||||
let page = 10
|
let page = 10
|
||||||
let url = `https://solidaim.cn:3000/api/v1/repos/hbk01/qctool/commits?page=1&limit=${page}`
|
let url = `https://git.solidaim.cn/api/v1/repos/hbk01/qctool/commits?page=1&limit=${page}`
|
||||||
|
|
||||||
let functions = [
|
let functions = [
|
||||||
{
|
{
|
||||||
"name": "干燥失重",
|
name: '干燥失重',
|
||||||
"location": "./views/lod.html"
|
location: './views/lod.html',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "炽灼残渣",
|
name: '炽灼残渣',
|
||||||
"location": "./views/roi.html"
|
location: './views/roi.html',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "进样时间",
|
name: '进样时间',
|
||||||
"location": "./views/injection-sequence.html"
|
location: './views/injection-sequence.html',
|
||||||
},
|
|
||||||
// {
|
|
||||||
// "name": "效期查询",
|
|
||||||
// "location": "./views/expir-info.html"
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
"name": "日期计算",
|
|
||||||
"location": "./views/calc-date.html"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "操作规程",
|
name: '日期计算',
|
||||||
"location": "./views/sop.html"
|
location: './views/calc-date.html',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "过期检查",
|
name: '操作规程',
|
||||||
"location": "./views/clock.html"
|
location: './views/sop.html',
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
$(() => {
|
$(() => {
|
||||||
// 加载功能列表
|
// 加载功能列表
|
||||||
functions.forEach(value => {
|
functions.forEach((value) => {
|
||||||
let onclick = `window.location.href='${value.location}'`
|
let onclick = `window.location.href='${value.location}'`
|
||||||
let div = `<div class="item" onclick="${onclick}">${value.name}</div>`
|
let div = `<div class="item" onclick="${onclick}">${value.name}</div>`
|
||||||
$(".list").append(div)
|
$('.list').append(div)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 加载最近的 commit 记录
|
// 加载最近的 commit 记录
|
||||||
$.getJSON(url, data => {
|
$.getJSON(url, (data) => {
|
||||||
let color1 = '#f9f9f9'
|
let color1 = '#f9f9f9'
|
||||||
let color2 = '#f3f3f3'
|
let color2 = '#f3f3f3'
|
||||||
let changeColor = false
|
let changeColor = false
|
||||||
data.forEach(element => {
|
data.forEach((element) => {
|
||||||
// 处理换行和+号
|
// 处理换行和+号
|
||||||
let message = element.commit.message.replaceAll("\n", "<br>")
|
let message = element.commit.message.replaceAll('\n', '<br>')
|
||||||
if (message.startsWith("+")) {
|
if (message.startsWith('+')) {
|
||||||
message = message.replace("+", "<br> <strong>•</strong>")
|
message = message.replace('+', '<br> <strong>•</strong>')
|
||||||
}
|
}
|
||||||
message = message.replaceAll("+", " <strong>•</strong>")
|
message = message.replaceAll('+', ' <strong>•</strong>')
|
||||||
|
|
||||||
// 处理提交的日期
|
// 处理提交的日期
|
||||||
let date = new Date(element.commit.committer.date) // "2022-10-08T10:54:36Z"
|
let date = new Date(element.commit.committer.date) // "2022-10-08T10:54:36Z"
|
||||||
@@ -72,7 +63,7 @@
|
|||||||
// 组装标题信息
|
// 组装标题信息
|
||||||
let verifiedString = "<span style='color: green;'><strong>Verified</strong></span>"
|
let verifiedString = "<span style='color: green;'><strong>Verified</strong></span>"
|
||||||
let hash = `<a href='${element.html_url}'>${element.sha.slice(0, 7)}</a>`
|
let hash = `<a href='${element.html_url}'>${element.sha.slice(0, 7)}</a>`
|
||||||
let verified = `${element.commit.verification.verified ? verifiedString : ""}`
|
let verified = `${element.commit.verification.verified ? verifiedString : ''}`
|
||||||
let header = `${hash} ${date} ${verified}`
|
let header = `${hash} ${date} ${verified}`
|
||||||
|
|
||||||
changeColor = !changeColor
|
changeColor = !changeColor
|
||||||
@@ -82,7 +73,7 @@
|
|||||||
${header}
|
${header}
|
||||||
${message}
|
${message}
|
||||||
</div>`
|
</div>`
|
||||||
$(".changelog").append(msg)
|
$('.changelog').append(msg)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -96,18 +87,22 @@
|
|||||||
<h4>关于</h4>
|
<h4>关于</h4>
|
||||||
<div class="about">
|
<div class="about">
|
||||||
<p>建议使用系统自带浏览器,以完善使用体验!</p>
|
<p>建议使用系统自带浏览器,以完善使用体验!</p>
|
||||||
<p>本项目已开源,点击<a href="https://solidaim.cn:3000/hbk01/qctool" target="_blank"> 此处 </a>查看源代码。</p>
|
<p>
|
||||||
|
本项目已开源,点击<a href="https://git.solidaim.cn/hbk01/qctool" target="_blank"> 此处 </a>查看源代码。
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<h4 id="changelog_title">变更日志</h4>
|
<h4 id="changelog_title">变更日志</h4>
|
||||||
<div class="changelog" style="width: 100%;"></div>
|
<div class="changelog" style="width: 100%"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
<a href="https://beian.miit.gov.cn" target="_blank">赣ICP备2025067425号</a>
|
<a href="https://beian.miit.gov.cn" target="_blank">赣ICP备2025067425号</a>
|
||||||
<br>
|
<br />
|
||||||
<a href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=36012402000282">赣公网安备36012402000282号</a>
|
<a href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=36012402000282"
|
||||||
|
>赣公网安备36012402000282号</a
|
||||||
|
>
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user