Show ani-cli version in config runtime info

This commit is contained in:
Dymas
2026-05-25 16:10:18 +02:00
parent 58f96cb6dd
commit 8549944be1
7 changed files with 50 additions and 9 deletions
+13 -6
View File
@@ -134,7 +134,7 @@ CONFIG_HTML = r"""<!doctype html>
gap: 20px;
min-width: 0;
align-content: start;
justify-items: start;
justify-items: stretch;
}
h1, h2, p { margin: 0; }
h1 {
@@ -280,17 +280,22 @@ CONFIG_HTML = r"""<!doctype html>
flex-wrap: wrap;
align-items: center;
}
.deps {
justify-items: center;
text-align: center;
}
.deps .chips {
justify-content: center;
}
.settings-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 18px;
align-items: start;
width: 100%;
}
.settings-main, .deps {
width: min(1180px, 100%);
}
.deps {
width: min(1180px, 100%);
width: 100%;
}
@media (max-width: 900px) {
.app { grid-template-columns: 1fr; }
@@ -325,9 +330,10 @@ CONFIG_HTML = r"""<!doctype html>
</div>
</section>
<section class="settings">
<h2>Runtime info</h2>
<h2>Runtime info</h2>
<div class="stack muted">
<p id="versionLine">Loading version...</p>
<p id="aniCliVersionLine">Detecting ani-cli version...</p>
<p>Saved settings live in `.ani-cli-web/config.json` inside this project.</p>
</div>
</section>
@@ -558,6 +564,7 @@ CONFIG_HTML = r"""<!doctype html>
async function loadVersion() {
const data = await api("/api/version");
$("versionLine").textContent = `${data.name} ${data.version}`;
$("aniCliVersionLine").textContent = `ani-cli ${data.ani_cli_version || "Unavailable"}`;
}
$("saveConfigBtn").addEventListener("click", saveConfig);