mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
更新 changelogs.html 文件,优化加载逻辑并添加错误处理
This commit is contained in:
parent
f1cc7c20a1
commit
d681b16946
@ -1,67 +1,76 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-Hans-CN" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"
|
<html lang="zh-Hans-CN" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"
|
||||||
data-a11y-animated-images="system">
|
data-a11y-animated-images="system">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="dns-prefetch" href="https://github.githubassets.com" />
|
<link rel="dns-prefetch" href="https://github.githubassets.com" />
|
||||||
<link rel="dns-prefetch" href="https://avatars.githubusercontent.com" />
|
<link rel="dns-prefetch" href="https://avatars.githubusercontent.com" />
|
||||||
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com" />
|
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com" />
|
||||||
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/" />
|
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/" />
|
||||||
<link rel="preconnect" href="https://github.githubassets.com" crossorigin />
|
<link rel="preconnect" href="https://github.githubassets.com" crossorigin />
|
||||||
<link rel="preconnect" href="https://avatars.githubusercontent.com" />
|
<link rel="preconnect" href="https://avatars.githubusercontent.com" />
|
||||||
|
|
||||||
<link crossorigin="anonymous" media="all" rel="stylesheet"
|
<link crossorigin="anonymous" media="all" rel="stylesheet"
|
||||||
href="https://github.githubassets.com/assets/light-0eace2597ca3.css" />
|
href="https://github.githubassets.com/assets/light-0eace2597ca3.css" />
|
||||||
<link crossorigin="anonymous" media="all" rel="stylesheet"
|
<link crossorigin="anonymous" media="all" rel="stylesheet"
|
||||||
href="https://github.githubassets.com/assets/dark-a167e256da9c.css" />
|
href="https://github.githubassets.com/assets/dark-a167e256da9c.css" />
|
||||||
|
|
||||||
<link crossorigin="anonymous" media="all" rel="stylesheet"
|
<link crossorigin="anonymous" media="all" rel="stylesheet"
|
||||||
href="https://github.githubassets.com/assets/primer-711f412bb361.css" />
|
href="https://github.githubassets.com/assets/primer-711f412bb361.css" />
|
||||||
<link crossorigin="anonymous" media="all" rel="stylesheet"
|
<link crossorigin="anonymous" media="all" rel="stylesheet"
|
||||||
href="https://github.githubassets.com/assets/global-78704364aaba.css" />
|
href="https://github.githubassets.com/assets/global-78704364aaba.css" />
|
||||||
<style>
|
<style>
|
||||||
select,
|
select,
|
||||||
.input-style {
|
.input-style {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textarea-style {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-message {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||||
|
<script>
|
||||||
|
async function fetchChangelog() {
|
||||||
|
let page = 1;
|
||||||
|
const changelogContainer = document.getElementById('changelog');
|
||||||
|
const loadingMessage = document.createElement('p');
|
||||||
|
loadingMessage.textContent = 'Loading...';
|
||||||
|
loadingMessage.className = 'loading-message';
|
||||||
|
changelogContainer.appendChild(loadingMessage);
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
const response = await fetch(`https://api.github.com/repos/RROrg/rr/releases?page=${page}&per_page=100`);
|
||||||
|
const releases = await response.json();
|
||||||
|
if ((!response.ok) || (releases.length === 0)) {
|
||||||
|
const errorMessage = document.createElement('p');
|
||||||
|
errorMessage.textContent = releases.message;
|
||||||
|
errorMessage.className = 'error-message';
|
||||||
|
changelogContainer.appendChild(errorMessage);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
releases.forEach(release => {
|
||||||
|
const releaseElement = document.createElement('div');
|
||||||
|
releaseElement.innerHTML = `<h2><a href="${release.html_url}" target="_blank">${release.name}</a></h2>${marked.parse(release.body)}`;
|
||||||
|
changelogContainer.appendChild(releaseElement);
|
||||||
|
});
|
||||||
|
page++;
|
||||||
|
}
|
||||||
|
|
||||||
.textarea-style {
|
changelogContainer.removeChild(loadingMessage);
|
||||||
width: 100%;
|
}
|
||||||
}
|
|
||||||
.loading-message {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
||||||
<script>
|
|
||||||
async function fetchChangelog() {
|
|
||||||
let page = 1;
|
|
||||||
const changelogContainer = document.getElementById('changelog');
|
|
||||||
const loadingMessage = document.createElement('p');
|
|
||||||
loadingMessage.textContent = 'Loading...';
|
|
||||||
loadingMessage.className = 'loading-message';
|
|
||||||
changelogContainer.appendChild(loadingMessage);
|
|
||||||
|
|
||||||
while (true) {
|
document.addEventListener('DOMContentLoaded', fetchChangelog);
|
||||||
const response = await fetch(`https://api.github.com/repos/RROrg/rr/releases?page=${page}&per_page=100`);
|
</script>
|
||||||
const releases = await response.json();
|
|
||||||
if (releases.length === 0) break;
|
|
||||||
releases.forEach(release => {
|
|
||||||
const releaseElement = document.createElement('div');
|
|
||||||
releaseElement.innerHTML = `<h2><a href="${release.html_url}" target="_blank">${release.name}</a></h2>${marked.parse(release.body)}`;
|
|
||||||
changelogContainer.appendChild(releaseElement);
|
|
||||||
});
|
|
||||||
page++;
|
|
||||||
}
|
|
||||||
|
|
||||||
changelogContainer.removeChild(loadingMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', fetchChangelog);
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="changelog"></div>
|
<div id="changelog"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
8
guide.md
8
guide.md
@ -318,6 +318,14 @@
|
|||||||
synodsdefault --reinstall # 重装系统
|
synodsdefault --reinstall # 重装系统
|
||||||
synodsdefault --factory-default # 重置系统 (清空全部数据)
|
synodsdefault --factory-default # 重置系统 (清空全部数据)
|
||||||
|
|
||||||
|
# 虚拟机
|
||||||
|
virsh -h # 列出所有虚拟机命令
|
||||||
|
virsh list --all # 列出所有虚拟机
|
||||||
|
virsh console <guest_name> # 进入虚拟机控制台
|
||||||
|
|
||||||
|
etcdctl -h # 列出所有 etcd 命令
|
||||||
|
etcdctl ls /syno/live_cluster/guests/ # 列出所有虚拟机 (etcd)
|
||||||
|
|
||||||
# API
|
# API
|
||||||
# 获取系统信息
|
# 获取系统信息
|
||||||
synowebapi --exec api=SYNO.Core.System method=info
|
synowebapi --exec api=SYNO.Core.System method=info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user