web/settings: add advanced & debug pages

This commit is contained in:
wukko
2024-07-10 23:35:53 +06:00
parent 49f9057b6b
commit a6ddceb643
7 changed files with 123 additions and 1 deletions

23
web/src/lib/version.ts Normal file
View File

@@ -0,0 +1,23 @@
type VersionResponse = {
commit: string;
branch: string;
remote: string;
version: string;
}
const fetchVersion = async function () {
const response: VersionResponse | undefined = await fetch('/version.json')
.then(r => r.json())
.catch(() => {});
if (!response) return {
commit: "unknown",
branch: "unknown",
remote: "unknown",
version: "unknown"
}
return response;
}
export const version = await fetchVersion();